当前位置: 首页>>代码示例>>C++>>正文


C++ currentRow函数代码示例

本文整理汇总了C++中currentRow函数的典型用法代码示例。如果您正苦于以下问题:C++ currentRow函数的具体用法?C++ currentRow怎么用?C++ currentRow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了currentRow函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: file

void MusicSongsListWidget::musicFileInformation()
{
    if(rowCount() == 0 || currentRow() < 0 )
    {
        return;
    }


    MusicFileInformationWidget file(this);
    QString path = !m_musicSongs->isEmpty() ? m_musicSongs->at(currentRow()).getMusicPath() : QString();
    file.setFileInformation(path);
    file.exec();
}
开发者ID:DchunWang,项目名称:TTKMusicplayer,代码行数:13,代码来源:musicsongslistwidget.cpp

示例2: currentRow

void QListWidgetWithDrop::dropEvent(QDropEvent *e)
{
	int fromRow = currentRow();
	QListWidget::dropEvent(e);
	int toRow = currentRow();

	for (int i = 0; i < count(); i++){
		FilterButton *fb = (FilterButton*) itemWidget(this->item(i));
		fb->setName(QString::number(i+1));
	}

	emit listItemMoved(fromRow, toRow);
}
开发者ID:jonongjs,项目名称:auv-vision-system,代码行数:13,代码来源:QListWidgetWithDrop.cpp

示例3: QString

void MusicSongsListWidget::musicOpenFileDir()
{
    if(rowCount() == 0 || currentRow() < 0)
    {
        return;
    }

    QString path = !m_musicSongs->isEmpty() ?m_musicSongs->at(currentRow()).getMusicPath() : QString();
    if(!QDesktopServices::openUrl(QUrl(QFileInfo(path).absolutePath(), QUrl::TolerantMode)))
    {
        MusicMessageBox message;
        message.setText(tr("The origin one does not exsit!"));
        message.exec();
    }
}
开发者ID:karllen,项目名称:TTKMusicplayer,代码行数:15,代码来源:musicsongslistwidget.cpp

示例4: musicOpenFileDir

void MusicMyDownloadRecordWidget::musicOpenFileDir()
{
    if(rowCount() == 0 || currentRow() < 0)
    {
        return;
    }

    if(!QDesktopServices::openUrl(QUrl(QFileInfo(m_musicRecord.m_paths[currentRow()]).absolutePath(),
                                  QUrl::TolerantMode)))
    {
        MusicMessageBox message;
        message.setText(tr("The origin one does not exsit!"));
        message.exec();
    }
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:15,代码来源:musicmydownloadrecordwidget.cpp

示例5: currentRow

void MusicQueryTableWidget::createContextMenu(QMenu &menu)
{
    menu.setStyleSheet(MusicUIObject::MMenuStyle02);
    m_actionGroup->addAction(menu.addAction(tr("musicDownload")));

    menu.addSeparator();

    QString songName = currentRow() != -1 && rowCount() > 0 ?
                item(currentRow(), 1)->text() : QString();
    QString artistName = currentRow() != -1 && rowCount() > 0 ?
                item(currentRow(), 2)->text() : QString();
    m_actionGroup->addAction(menu.addAction(tr("search '%1'").arg(songName)));
    m_actionGroup->addAction(menu.addAction(tr("search '%1'").arg(artistName)));
    m_actionGroup->addAction(menu.addAction(tr("search '%1 - %2'").arg(songName).arg(artistName)));
}
开发者ID:azureidea,项目名称:TTKMusicplayer,代码行数:15,代码来源:musicquerytablewidget.cpp

示例6: recalculate

void UISpreadsheet::somethingChanged()
{
    /*
    if (autoRecalc)
        recalculate();
        */
  //  emit modified();

   UICell *c = cell(currentRow(),currentColumn());
   c->setCell(spreadSheet->getCell(currentRow(),currentColumn()));
   c->setWidget(this);
   c->update();
   cout<<"something changeeeeeeeeeeeeeeeeeeeeeeeeeeee"<<endl;
  // this->setCurrentCell(currentRow()+1,currentColumn());

}
开发者ID:CS-UNSA,项目名称:CS102O-AlisonTorresAguilar-EdwinCornejoMayta,代码行数:16,代码来源:uispreadsheet.cpp

示例7: closePersistentEditor

void MusicSongsListWidget::mousePressEvent(QMouseEvent *event)
{
    QTableWidget::mousePressEvent(event);
    //just close the rename edittext;
    if(m_renameActived)
    {
        closePersistentEditor(m_renameItem);
    }
    //it may be a bug in closePersistentEditor,so we select
    //the two if function to deal with
    if(m_renameActived)
    {
        (*m_musicSongs)[m_renameItem->row()].setMusicName(m_renameItem->text());
        m_renameItem->setText(QFontMetrics(font()).elidedText(
                       m_renameItem->text(), Qt::ElideRight, 243));
        m_renameActived = false;
    }

    if( event->button() == Qt::LeftButton )//Press the left key
    {
        m_leftButtonPressed = true;
        m_dragStartIndex = currentRow();
        m_dragStartPoint = event->pos();
    }
}
开发者ID:karllen,项目名称:TTKMusicplayer,代码行数:25,代码来源:musicsongslistwidget.cpp

示例8: rectBu

bool ButtonDelegate::editorEvent(QEvent *event, QAbstractItemModel *, const QStyleOptionViewItem &option, const QModelIndex &index)
{
    QRect rect = option.rect;
    QRect rectBu(rect.left() + rect.width()/2 - 15,
                 rect.top() + rect.height()/2 - 5,
                 30, 15);

    if (event->type() == QEvent::MouseMove) {
        QMouseEvent* e =(QMouseEvent*)event;

        if (rectBu.contains(e->x(), e->y())) {

        }
    }

    if (event->type() == QEvent::MouseButtonRelease) {
        QMouseEvent* e =(QMouseEvent*)event;
        if (rectBu.contains(e->x(), e->y())) {
            int row = index.row();
            emit currentRow(row);
            return true;
        }
    }
    return false;
}
开发者ID:JinduYin,项目名称:YQCSongsMaintain,代码行数:25,代码来源:yqcdelegate.cpp

示例9:

void favorites2::toggleAutoMount()
{
	auto table = m_ui->tableWidget ;

	if( table->rowCount() > 0 ){

		auto row = table->currentRow() ;

		auto e = this->getEntry( row ) ;

		if( !e.volumePath.isEmpty() ){

			auto f = e ;

			if( f.autoMountVolume == "true" ){

				f.autoMountVolume = "false" ;
			}else{
				f.autoMountVolume = "true" ;
			}

			m_ui->textEditAutoMount->setText( f.autoMountVolume ) ;

			m_settings.replaceFavorite( e,f ) ;
		}
	}
}
开发者ID:mhogomchungu,项目名称:SiriKali,代码行数:27,代码来源:favorites2.cpp

示例10: currentPlaylistWidget

void PlaylistWindow::selectNext()
{
    auto qdp = currentPlaylistWidget();
    int index = qdp->currentRow();
    if (index < qdp->count())
        qdp->setCurrentRow(index + 1);
}
开发者ID:Frechdachs,项目名称:mpc-qt,代码行数:7,代码来源:playlistwindow.cpp

示例11: item

void UTableNotes::clickActionHide()
{
    QTableWidgetItem *curItem = item(currentRow(), indexColumnVisible);
    curItem->setData(pointerOnDataColumnVisible, false);
    curItem->setIcon(QIcon(IconHide));
    emit clickActionHideItem();
}
开发者ID:gil9red,项目名称:Note,代码行数:7,代码来源:TablesManager.cpp

示例12: currentRow

bool
wDBTable::searchColumn( const QString & text, bool FromCurrent, bool Forward )
{

	QString s;
	uint curr = currentRow(), curc=currentColumn(), row = 0, idx;
	bool found = FALSE;
	aSQLTable *t = ( aSQLTable *) sqlCursor();

	if ( FromCurrent ) row = curr;
	if ( Forward ) row++; else row--;
	idx = indexOf( curc );

	while ( t->seek( row ) ){
		s = t->value( idx ).toString();
		if ( s.left( text.length() ) == text ) {
			found = TRUE;
			break;
		}
		if ( Forward ) row++; else row--;
	}
	if ( found ) {
		setCurrentCell( row, curc );
	};
	return found;
}
开发者ID:K-Be,项目名称:ananas-labs-qt4,代码行数:26,代码来源:wdbtable.cpp

示例13: delete

void ContactListWidget::del_contact()
{
QMessageBox mbx;
mbx.setText(QString(tr("Are you sure you want to remove user \"%1\" from your contact list?")).arg(currentItem()->text()));
mbx.setIcon(QMessageBox::Question);
mbx.addButton(QMessageBox::Yes);
mbx.addButton(QMessageBox::No);
mbx.setDefaultButton(QMessageBox::No);

if (QMessageBox::Yes==mbx.exec())
    {
        QByteArray rm_id;
        QListWidgetItem *rm_ptr;

        storage->Delete(rm_id = wgitem_to_recs[currentItem()]->id);
        delete (rm_ptr=takeItem(currentRow()));

        for(int i=0;i<contact_records.size();i++)
        {
            if (contact_records[i].id==rm_id)
            {
                contact_records.removeAt(i);
                break;
            }
        }

        wgitem_to_recs.remove(rm_ptr);
    }

}
开发者ID:NePank,项目名称:pica-pica,代码行数:30,代码来源:contactlistwidget.cpp

示例14: slotMount

void MainWindow::slotMount()
{
	auto table = m_ui->tableWidget ;
	int row = table->currentRow() ;

	this->mount( volumeEntryProperties( tablewidget::tableRowEntries( table,row ) ) ) ;
}
开发者ID:joachimdostal,项目名称:zuluCrypt,代码行数:7,代码来源:mainwindow.cpp

示例15: currentColumn

void MTable::stopEditing()
{
     int cCol = currentColumn();
     int cRow = currentRow();

     endEdit( cRow, cCol, TRUE, TRUE );
}
开发者ID:Klunkerball,项目名称:EGSnrc,代码行数:7,代码来源:mtable.cpp


注:本文中的currentRow函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。