• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ currentRow函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: currentRow

void Spreadsheet::findPrevious(const QString &str, Qt::CaseSensitivity cs)
{
    int row = currentRow();
    int column = currentColumn() - 1;

    while(row >= 0)
    {
        while(column >= 0)
        {
            if(text(row, column).contains(str, cs))
            {
                clearSelection();
                setCurrentCell(row, column);
                activateWindow();
                return;
            }

            --column;
        }

        column = ColumnCount - 1;
        --row;
    }

    QApplication::beep();
}
开发者ID:KleineKarsten,项目名称:CppGuiWithQt,代码行数:26,代码来源:spreadsheet.cpp


示例17: item

void NShortcutEditorWidget::keyPressEvent(QKeyEvent *e)
{
    QTableWidgetItem *currentItem = item(currentRow(), currentColumn());
    QString text = currentItem->text();

    int keyInt = e->key();
    bool modifiers = e->modifiers() & (Qt::ControlModifier | Qt::ShiftModifier | Qt::AltModifier | Qt::MetaModifier);

    if (!modifiers && (keyInt == Qt::Key_Delete || keyInt == Qt::Key_Backspace)) {
        currentItem->setText("");
        return;
    }

    QString shortcut = keyEventToString(e);
    if (shortcut == "") {
        QTableWidget::keyPressEvent(e);
        return;
    }

    if (text.split(", ").size() >= 3)
        text = "";

    if (!text.isEmpty())
        text += ", ";

    currentItem->setText(text + shortcut);
}
开发者ID:nulloy,项目名称:nulloy,代码行数:27,代码来源:shortcutEditorWidget.cpp


示例18: qDebug

void ViewTableListWidget::showRightMenu( const QPoint & pos)
{

    //显示右键菜单
    qDebug()<<tr("视图菜单")<<pos.x()<<" "<<pos.y();

    QTableWidgetItem *curItem = this->itemAt(pos);



    if(curItem != NULL)
    {
        curindex = currentRow();
        viewfilenames.clear();
        QList<QTableWidgetSelectionRange> rangelist = this->selectedRanges();
        QList<QTableWidgetSelectionRange>::iterator iter = rangelist.begin();
        while(iter != rangelist.end())
        {
            QTableWidgetSelectionRange range = *iter;
            for(int i =range.topRow(); i<=range.bottomRow(); i++ )
                viewfilenames<<item(i,0)->text();
            ++iter;
        }
    }
    qDebug()<<viewfilenames;
    this->createRightMenu((int *)curItem);
}
开发者ID:nhosproject,项目名称:OSProject,代码行数:27,代码来源:viewtablelistwidget.cpp


示例19: switch

void MailListView::keyPressEvent( QKeyEvent *e ) // sharp and phone
{
    switch( e->key() ) {
        case Qt::Key_Space:
        case Qt::Key_Return:
        case Qt::Key_Select:
        case Qt::Key_Enter:
        {
            emit clicked(currentIndex());
        }
        break;
        case Qt::Key_No:
        case Qt::Key_Back:
        case Qt::Key_Backspace:
        {
            //if (!Qtopia::mousePreferred())
                emit backPressed();
            //else
            //    e->ignore();
        }
        break;
        default:  QTableWidget::keyPressEvent( e );
    }
    if (e->key() == Qt::Key_Up || e->key() == Qt::Key_Down) {
        clearSelection();
        selectRow( currentRow() );
    }
}
开发者ID:muromec,项目名称:qtopia-ezx,代码行数:28,代码来源:maillistview.cpp


示例20: GetCurrentModel

QString cCustomTitleModelTable::GetCurrentModel() {
    if (!ModelTable) return "";
    CurrentSel=currentRow()*columnCount()+currentColumn();
    if (CurrentSel>=ModelTable->List.count()) CurrentSel=ModelTable->List.count()-1;
    if ((CurrentSel>=0)&&(CurrentSel<ModelTable->List.count())) return ModelTable->List[CurrentSel]->Name;
    return "";
}
开发者ID:JonasCz,项目名称:ffdiaporama-1604-builds,代码行数:7,代码来源:cCustomTitleModelTable.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ currentRowChanged函数代码示例发布时间:2022-05-30
下一篇:
C++ currentItem函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap