本文整理汇总了C++中currentRowChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ currentRowChanged函数的具体用法?C++ currentRowChanged怎么用?C++ currentRowChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了currentRowChanged函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BallotVoteFilterProxyModel
void BallotVoteWindow::setModel(WalletModel *model)
{
if (!model)
return;
tableModel = model->getBallotVoteTableModel();
if (!tableModel)
return;
proxyModel = new BallotVoteFilterProxyModel(this);
proxyModel->setSourceModel(tableModel);
tableView->setModel(proxyModel);
tableView->setAlternatingRowColors(true);
tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
tableView->setSelectionMode(QAbstractItemView::ExtendedSelection);
tableView->setSortingEnabled(true);
tableView->sortByColumn(BallotVoteTableModel::Height, Qt::AscendingOrder);
tableView->verticalHeader()->hide();
tableView->setColumnWidth(BallotVoteTableModel::Height, HEIGHT_COLUMN_WIDTH);
tableView->setColumnWidth(BallotVoteTableModel::Address, ADDRESS_COLUMN_WIDTH);
connect(tableView->selectionModel(),
SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(currentRowChanged(QModelIndex, QModelIndex)));
}
示例2: connect
void Lvk::FE::ChatHistoryWidget::connectSignals()
{
connect(ui->dateContactTable->selectionModel(),
SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
SLOT(onDateContactRowChanged(QModelIndex,QModelIndex)));
connect(ui->conversationTable->selectionModel(),
SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
SLOT(onConversationRowChanged(QModelIndex,QModelIndex)));
connect(ui->conversationTable,
SIGNAL(cellDoubleClicked(int,int)),
SLOT(onCellDoubleClicked(int,int)));
connect(ui->filter,
SIGNAL(textChanged(QString)),
SLOT(onFilterTextChanged(QString)));
// Toolbar signals
connect(ui->teachRuleButton, SIGNAL(clicked()), SLOT(onTeachRuleClicked()));
connect(ui->showRuleButton, SIGNAL(clicked()), SLOT(onShowRuleClicked()));
connect(ui->removeHistoryButton, SIGNAL(clicked()), SLOT(removeSelectedWithDialog()));
connect(ui->removeAllAction, SIGNAL(triggered()), SLOT(removeAllWithDialog()));
connect(ui->removeSelAction, SIGNAL(triggered()), SLOT(removeSelectedWithDialog()));
}
示例3: QSqlQueryModel
void mantenimientoTitulo::on_btmBuscar_clicked()
{
if(m_ui->btmTitulo->isChecked()) {
QSqlQueryModel *model = new QSqlQueryModel(m_ui->titulos);
model->setQuery("SELECT tituloObra, isbn FROM titulo WHERE tituloObra LIKE '%"+m_ui->busqueda->text()+"%';", QSqlDatabase::database("sibcues"));
if (model->lastError().isValid())
qDebug() << model->lastError();
model->setHeaderData(0, Qt::Horizontal, QObject::tr("Titulo Material Bibliografico"));
model->setHeaderData(1, Qt::Horizontal, QObject::tr("ISBN"));
m_ui->titulos->setModel(model);
connect(m_ui->titulos->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), this, SLOT(on_titulos_activated(QModelIndex)));
m_ui->labelTitulo->setText("Titulos: "+QString::number(model->rowCount())+" resultados.");
}
else {
QSqlQueryModel *model = new QSqlQueryModel(m_ui->titulos);
model->setQuery("SELECT titulo.tituloObra, titulo.isbn FROM obrade left join titulo on titulo.idTitulo=obrade.idTitulo left join autor on obrade.idAutor=autor.idAutor WHERE autor.nombreAutor LIKE '%"+m_ui->busqueda->text()+"%';", QSqlDatabase::database("sibcues"));
if (model->lastError().isValid())
qDebug() << model->lastError();
model->setHeaderData(0, Qt::Horizontal, QObject::tr("Titulo Material Bibliografico"));
model->setHeaderData(1, Qt::Horizontal, QObject::tr("ISBN"));
m_ui->titulos->setModel(model);
connect(m_ui->titulos->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), this, SLOT(on_titulos_activated(QModelIndex)));
m_ui->labelTitulo->setText("Titulos: "+QString::number(model->rowCount())+" resultados.");
}
}
示例4: QWidget
LayoutsConfigWidget::LayoutsConfigWidget (QWidget *parent)
: QWidget (parent)
, AvailableModel_ (new QStandardItemModel (this))
, EnabledModel_ (new QStandardItemModel (this))
{
QStringList availHeaders { tr ("Code"), tr ("Description") };
AvailableModel_->setHorizontalHeaderLabels (availHeaders);
EnabledModel_->setHorizontalHeaderLabels (availHeaders << tr ("Variant"));
FillModels ();
Ui_.setupUi (this);
Ui_.AvailableView_->setModel (AvailableModel_);
Ui_.EnabledView_->setModel (EnabledModel_);
Ui_.EnabledView_->setItemDelegate (new EnabledItemDelegate (Ui_.EnabledView_));
connect (Ui_.AvailableView_->selectionModel (),
SIGNAL (currentRowChanged (QModelIndex, QModelIndex)),
this,
SLOT (updateActionsState ()));
connect (Ui_.EnabledView_->selectionModel (),
SIGNAL (currentRowChanged (QModelIndex, QModelIndex)),
this,
SLOT (updateActionsState ()));
updateActionsState ();
}
示例5: disconnect
void LibrarySettingsPage::Load() {
if (!initialised_model_) {
if (ui_->list->selectionModel()) {
disconnect(ui_->list->selectionModel(),
SIGNAL(currentRowChanged(QModelIndex, QModelIndex)),
this, SLOT(CurrentRowChanged(QModelIndex)));
}
ui_->list->setModel(dialog()->library_directory_model());
initialised_model_ = true;
connect(ui_->list->selectionModel(),
SIGNAL(currentRowChanged(QModelIndex, QModelIndex)),
SLOT(CurrentRowChanged(QModelIndex)));
}
QSettings s;
s.beginGroup(LibraryView::kSettingsGroup);
ui_->auto_open->setChecked(s.value("auto_open", true).toBool());
ui_->pretty_covers->setChecked(s.value("pretty_covers", true).toBool());
ui_->show_dividers->setChecked(s.value("show_dividers", true).toBool());
s.endGroup();
s.beginGroup(LibraryWatcher::kSettingsGroup);
ui_->startup_scan->setChecked(s.value("startup_scan", true).toBool());
ui_->monitor->setChecked(s.value("monitor", true).toBool());
QStringList filters = s.value("cover_art_patterns",
QStringList() << "front" << "cover").toStringList();
ui_->cover_art_patterns->setText(filters.join(","));
s.endGroup();
}
示例6: add
void EditEntryWidget::setupAutoType()
{
m_autoTypeUi->setupUi(m_autoTypeWidget);
add(tr("Auto-Type"), m_autoTypeWidget);
m_autoTypeDefaultSequenceGroup->addButton(m_autoTypeUi->inheritSequenceButton);
m_autoTypeDefaultSequenceGroup->addButton(m_autoTypeUi->customSequenceButton);
m_autoTypeWindowSequenceGroup->addButton(m_autoTypeUi->defaultWindowSequenceButton);
m_autoTypeWindowSequenceGroup->addButton(m_autoTypeUi->customWindowSequenceButton);
m_autoTypeAssocModel->setAutoTypeAssociations(m_autoTypeAssoc);
m_autoTypeUi->assocView->setModel(m_autoTypeAssocModel);
m_autoTypeUi->assocView->setColumnHidden(1, true);
connect(m_autoTypeUi->enableButton, SIGNAL(toggled(bool)), SLOT(updateAutoTypeEnabled()));
connect(m_autoTypeUi->customSequenceButton, SIGNAL(toggled(bool)),
m_autoTypeUi->sequenceEdit, SLOT(setEnabled(bool)));
connect(m_autoTypeUi->customWindowSequenceButton, SIGNAL(toggled(bool)),
m_autoTypeUi->windowSequenceEdit, SLOT(setEnabled(bool)));
connect(m_autoTypeUi->assocAddButton, SIGNAL(clicked()), SLOT(insertAutoTypeAssoc()));
connect(m_autoTypeUi->assocRemoveButton, SIGNAL(clicked()), SLOT(removeAutoTypeAssoc()));
connect(m_autoTypeUi->assocView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
SLOT(updateAutoTypeEnabled()));
connect(m_autoTypeAssocModel, SIGNAL(modelReset()), SLOT(updateAutoTypeEnabled()));
connect(m_autoTypeUi->assocView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
SLOT(loadCurrentAssoc(QModelIndex)));
connect(m_autoTypeAssocModel, SIGNAL(modelReset()), SLOT(clearCurrentAssoc()));
connect(m_autoTypeUi->windowTitleCombo, SIGNAL(editTextChanged(QString)),
SLOT(applyCurrentAssoc()));
connect(m_autoTypeUi->defaultWindowSequenceButton, SIGNAL(toggled(bool)),
SLOT(applyCurrentAssoc()));
connect(m_autoTypeUi->windowSequenceEdit, SIGNAL(textChanged(QString)),
SLOT(applyCurrentAssoc()));
}
示例7: disconnect
void ModuloUsuarios::Buscar()
{
QItemSelectionModel * sm = ui->list_tableView->selectionModel();
disconnect(sm,SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),this,SLOT(selectionChangedHandle(QModelIndex,QModelIndex)));
ui_BuscarUsuario* b = new ui_BuscarUsuario;
QDialog* dialogBuscar = makeBusquedaDialog(b);
int result = dialogBuscar->exec();
if(result == QDialog::Rejected)
return;
QString query = "nombre_usuario like '%%1%'"
"and nombres like '%%2%' "
"and primer_apellido like '%%3%' "
"and nro_doc like '%%4%'";
query = query.arg(b->ui->le_nick->text())
.arg(b->ui->le_nombre->text())
.arg(b->ui->le_apellido->text())
.arg(b->ui->le_dni->text());
relTableModel->setFilter(query);
relTableModel->select();
if(relTableModel->lastError().isValid())
QMessageBox::critical(this,"Error",relTableModel->lastError().text(),0,0);
ui->list_tableView->setModel(relTableModel);
sm = ui->list_tableView->selectionModel();
connect(sm,SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),this,SLOT(selectionChangedHandle(QModelIndex,QModelIndex)));
ui->list_tableView->hideColumn(0);
ui->list_tableView->hideColumn(17);
delete dialogBuscar;
}
示例8: QWidget
IConfigLogging::IConfigLogging(config *cfg, QWidget *parent) :
QWidget(parent),
ui(new Ui::IConfigLogging),
conf(cfg)
{
ui->setupUi(this);
QList<int> size;
size << 50 << 200;
ui->splitter->setSizes(size);
QFont f( conf->fontName );
f.setPixelSize( conf->fontSize );
ui->logList->setFont(f);
ui->logText->setFont(f);
ui->edLogPath->setText( conf->logPath );
ui->chkEnable->setChecked( conf->logEnabled );
ui->chkChannels->setChecked( conf->logChannel );
ui->chkPrivates->setChecked( conf->logPM );
model = new QStandardItemModel(ui->logList);
ui->logList->setModel(model);
selection = ui->logList->selectionModel();
connect(selection, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(currentRowChanged(QModelIndex,QModelIndex)));
loadFiles();
}
示例9: selectionModel
void TB_PokeChoice::setModel(QAbstractItemModel *model)
{
if (selectionModel()) {
selectionModel()->disconnect(SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),this);
}
QTableView::setModel(model);
connect(selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), SLOT(selectedCell(QModelIndex)));
}
示例10: connect
void NotesDialog::createConnections() {
connect(ui->saveButton, SIGNAL(clicked()), this, SLOT(save()));
connect(ui->openButton, SIGNAL(clicked()), this, SLOT(open()));
connect(ui->appendButton, SIGNAL(clicked()), this, SLOT(append()));
connect(ui->removeButton, SIGNAL(clicked()), this, SLOT(remove()));
connect(ui->editModeCheckBox, SIGNAL(toggled(bool)), this, SLOT(changeEditMode(bool)));
connect(ui->tableView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(currentRowChanged(QModelIndex,QModelIndex)));
connect(ui->textEdit, SIGNAL(textChanged()), this, SLOT(notesChanged()));
connect(data->model, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(notesChanged()));
}
示例11: QDialog
SampleChooserDialog::SampleChooserDialog(const K::File& lastFile, QWidget *parent) :
QDialog(parent), ui(new Ui::SampleChooserDialog) {
ui->setupUi(this);
// create directory model
K::File root("samples");
std::string rootPath = root.getAbsolutePath();
dirModel = new QFileSystemModel(this);
dirModel->setFilter(QDir::NoDotAndDotDot | QDir::Dirs);
ui->treeFolders->setModel(dirModel);
ui->treeFolders->setRootIndex(dirModel->setRootPath( rootPath.c_str() ));
ui->treeFolders->hideColumn(1);
ui->treeFolders->hideColumn(2);
ui->treeFolders->hideColumn(3);
// create file model
fileModel = new QFileSystemModel(this);
fileModel->setFilter(QDir::NoDotAndDotDot | QDir::Files);
ui->listFiles->setModel(fileModel);
//ui->listFiles->setRootIndex(fileModel->setRootPath( rootPath.c_str() ));
// select start path
std::string startPath = "";
std::string startFile = "";
if (lastFile.isFolder()) {
startPath = lastFile.getAbsolutePath();
} else {
startPath = lastFile.getParent().getAbsolutePath();
startFile = lastFile.getAbsolutePath();
}
ui->treeFolders->setCurrentIndex(dirModel->index( startPath.c_str() ));
ui->listFiles->setRootIndex(fileModel->setRootPath( startPath.c_str() ));
if (!startFile.empty()) {
ui->listFiles->setCurrentIndex(fileModel->index( startFile.c_str() ));
}
// signals
connect(ui->btnCancel, SIGNAL(clicked()), this, SLOT(onCancel()));
connect(ui->btnOk, SIGNAL(clicked()), this, SLOT(onOK()));
connect(ui->treeFolders->selectionModel(), SIGNAL(currentRowChanged(QModelIndex, QModelIndex)),
this, SLOT(onFolderSelect(QModelIndex, QModelIndex)));
connect(ui->listFiles->selectionModel(), SIGNAL(currentRowChanged(QModelIndex, QModelIndex)),
this, SLOT(onFileSelect(QModelIndex, QModelIndex)));
}
示例12: connect
void ImportMidiPanel::tweakUi()
{
connect(updateUiTimer, SIGNAL(timeout()), this, SLOT(updateUi()));
connect(ui->pushButtonImport, SIGNAL(clicked()), SLOT(doMidiImport()));
connect(ui->pushButtonUp, SIGNAL(clicked()), SLOT(moveTrackUp()));
connect(ui->pushButtonDown, SIGNAL(clicked()), SLOT(moveTrackDown()));
connect(ui->toolButtonHideMidiPanel, SIGNAL(clicked()), SLOT(hidePanel()));
const QItemSelectionModel *sm = ui->tableViewTracks->selectionModel();
connect(sm, SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
SLOT(onCurrentTrackChanged(QModelIndex)));
connect(ui->treeViewOperations->model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)),
SLOT(onOperationChanged(QModelIndex)));
updateUiTimer->start(100);
updateUi();
ui->tableViewTracks->verticalHeader()->setDefaultSectionSize(22);
ui->tableViewTracks->setHorizontalHeader(new CustomHorizHeaderView());
ui->tableViewTracks->horizontalHeader()->setResizeMode(TrackCol::TRACK_NUMBER,
QHeaderView::ResizeToContents);
ui->tableViewTracks->horizontalHeader()->setResizeMode(TrackCol::DO_IMPORT,
QHeaderView::ResizeToContents);
ui->tableViewTracks->horizontalHeader()->setResizeMode(TrackCol::LYRICS,
QHeaderView::Stretch);
ui->tableViewTracks->horizontalHeader()->setResizeMode(TrackCol::STAFF_NAME,
QHeaderView::Stretch);
ui->tableViewTracks->horizontalHeader()->setResizeMode(TrackCol::INSTRUMENT,
QHeaderView::Stretch);
ui->treeViewOperations->header()->resizeSection(0, 285);
ui->treeViewOperations->setAllColumnsShowFocus(true);
ui->comboBoxCharset->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
fillCharsetList();
}
示例13: QSqlRelationalTableModel
void PackagesPage::createModel()
{
_model = new QSqlRelationalTableModel(_ui->_listPackages);
_model->setEditStrategy(QSqlTableModel::OnManualSubmit);
_model->setTable(PackageTable::tableName);
int idIndex = _model->fieldIndex(PackageTable::fieldId);
_model->setHeaderData(idIndex, Qt::Horizontal, tr("Id"));
int idName = _model->fieldIndex(PackageTable::fieldName);
_model->setHeaderData(idName, Qt::Horizontal, tr("Name"));
int idDescr = _model->fieldIndex(PackageTable::fieldDescr);
_model->setHeaderData(idDescr, Qt::Horizontal, tr("Description"));
if(!_model->select())
{
return;
}
_ui->_listPackages->setModel(_model);
_ui->_listPackages->setColumnHidden(0, true);
_ui->_listPackages->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Stretch);
connect(_ui->_listPackages->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)), SLOT(onCurrentRowChanged(QModelIndex)));
_ui->_listPackages->setCurrentIndex(_model->index(0,0));
}
示例14: QMainWindow
PoolWindow::PoolWindow(QWidget *parent)
: QMainWindow(parent)
, ui_()
, poolTableModel_()
, itemDelegate_(new PoolItemDelegate(poolTableModel_))
, rootFilterNode_()
{
setWindowFlags(Qt::NoDropShadowWindowHint);
ui_.setupUi(this);
ui_.poolTbl_->setItemDelegate(itemDelegate_.data());
ui_.poolTbl_->setModel(&poolTableModel_);
ui_.poolTbl_->setSortingEnabled(true);
ui_.poolTbl_->setSelectionBehavior(QAbstractItemView::SelectRows);
ui_.poolTbl_->horizontalHeader()->setSectionsMovable(true);
ui_.poolTbl_->horizontalHeader()->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui_.poolTbl_->horizontalHeader(), SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(hideColumnsContextMenuRequested(QPoint)));
connect(ui_.poolTbl_->selectionModel(), SIGNAL(currentRowChanged(QModelIndex, QModelIndex)), this, SLOT(currentRowChanged(QModelIndex, QModelIndex)));
connect(ui_.actionAdvancedFilter, SIGNAL(triggered()), this, SLOT(actionAdvancedFilter()));
connect(ui_.actionEnableFilter, SIGNAL(triggered(bool)), this, SLOT(actionEnableFilter(bool)));
connect(ui_.actionAddToCollection, SIGNAL(triggered()), this, SLOT(actionAddToCollection()));
connect(ui_.actionRemoveFromCollection, SIGNAL(triggered()), this, SLOT(actionRemoveFromCollection()));
connect(ui_.actionAddToDeck, SIGNAL(triggered()), this, SLOT(actionAddToDeck()));
connect(ui_.actionRemoveFromDeck, SIGNAL(triggered()), this, SLOT(actionRemoveFromDeck()));
connect(ui_.actionDownloadCardArt, SIGNAL(triggered()), this, SLOT(actionDownloadCardArt()));
connect(ui_.actionFetchOnlineData, SIGNAL(triggered()), this, SLOT(actionFetchOnlineData()));
connect(this, SIGNAL(fontChanged()), ui_.poolTbl_, SLOT(handleFontChanged()));
ui_.statusBar->addPermanentWidget(new QLabel("Search: "));
QLabel* permanentStatusBarLabel = new QLabel();
ui_.statusBar->addPermanentWidget(permanentStatusBarLabel);
connect(ui_.poolTbl_, SIGNAL(searchStringChanged(QString)), permanentStatusBarLabel, SLOT(setText(QString)));
}
示例15: EVentana
FormPrefEmail::FormPrefEmail(QWidget* parent, Qt::WFlags fl)
: EVentana( parent, fl ), Ui::FormPrefEmailBase()
{
setupUi(this);
servidores = new EServidorEmail( LVServidores );
LVServidores->setModel( servidores );
LVServidores->setModelColumn( servidores->fieldIndex( "nombre" ) );
mapeador = new QDataWidgetMapper( this );
mapeador->setModel( servidores );
mapeador->addMapping( LENombre, servidores->fieldIndex( "nombre" ) );
mapeador->addMapping( LEDireccion, servidores->fieldIndex( "direccion" ) );
mapeador->addMapping( SBPuerto, servidores->fieldIndex( "puerto" ) );
mapeador->addMapping( LEUsuario, servidores->fieldIndex( "usuario" ) );
mapeador->addMapping( LEPass, servidores->fieldIndex( "pass" ) );
mapeador->addMapping( CkBPredeterminado, servidores->fieldIndex( "predeterminado" ) );
mapeador->addMapping( LEFrom, servidores->fieldIndex( "de" ) );
mapeador->setSubmitPolicy( QDataWidgetMapper::ManualSubmit );
connect(LVServidores->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
mapeador, SLOT(setCurrentModelIndex(QModelIndex)));
mapeador->toFirst();
connect( PBAgregar, SIGNAL( clicked() ), this, SLOT( agregar() ) );
connect( PBEliminar, SIGNAL( clicked() ), this, SLOT( eliminar() ) );
PBAgregar->setIcon( QIcon( ":/imagenes/add.png" ) );
PBEliminar->setIcon( QIcon( ":/imagenes/stop.png" ) );
this->setWindowTitle( "Servidor [email protected]" );
this->setWindowIcon( QIcon( ":/imagenes/servidor_email.png" ) );
}