本文整理汇总了C++中currentRowChanged函数的典型用法代码示例。如果您正苦于以下问题:C++ currentRowChanged函数的具体用法?C++ currentRowChanged怎么用?C++ currentRowChanged使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了currentRowChanged函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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)));
}
开发者ID:timelf123,项目名称:hivemind,代码行数:27,代码来源:ballotvotewindow.cpp
示例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()));
}
开发者ID:devartis,项目名称:chatbot,代码行数:26,代码来源:chathistorywidget.cpp
示例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.");
}
}
开发者ID:bagonzalez,项目名称:SI-BCUES,代码行数:30,代码来源:mantenimientotitulo.cpp
示例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 ();
}
开发者ID:AlexWMF,项目名称:leechcraft,代码行数:27,代码来源:layoutsconfigwidget.cpp
示例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();
}
开发者ID:admiral0,项目名称:clementine,代码行数:33,代码来源:librarysettingspage.cpp
示例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()));
}
开发者ID:BlueIce,项目名称:keepassx,代码行数:32,代码来源:EditEntryWidget.cpp
示例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;
}
开发者ID:josueaqp92,项目名称:ProyFinal-IS2,代码行数:28,代码来源:modulousuarios.cpp
示例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();
}
开发者ID:Tomatix,项目名称:IdealIRC,代码行数:33,代码来源:iconfiglogging.cpp
示例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)));
}
开发者ID:Alicirno,项目名称:pokemon-online,代码行数:9,代码来源:pokechoice.cpp
示例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()));
}
开发者ID:xtuer,项目名称:Qt,代码行数:12,代码来源:NotesDialog.cpp
示例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)));
}
开发者ID:k-a-z-u,项目名称:KSynth,代码行数:49,代码来源:SampleChooserDialog.cpp
示例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();
}
开发者ID:jlublin,项目名称:MuseScore,代码行数:35,代码来源:importmidi_panel.cpp
示例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));
}
开发者ID:Slesa,项目名称:Trinity,代码行数:26,代码来源:packagespage.cpp
示例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)));
}
开发者ID:stijnvermeir,项目名称:mtgcards,代码行数:32,代码来源:poolwindow.cpp
示例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" ) );
}
开发者ID:chungote,项目名称:gestotux,代码行数:34,代码来源:formprefemail.cpp
示例16: updateBuild
void RoomSetting::initTable(){
/*********过道************/
updateBuild();
/*********房间*********/
ui->table2->setSortingEnabled(true);
ui->table2->setItemDelegate(new TrackDelegate(TRACKTYPE::DATA_ROOM));
model_room =Dbconnect::getTbModel("room");
model_room->setSort(model_room->fieldIndex("room_no"),Qt::AscendingOrder);
model_room->setHeaderData(model_room->fieldIndex("build_no"), Qt::Horizontal, "楼栋");
model_room->setHeaderData(model_room->fieldIndex("room_no"), Qt::Horizontal, "房间号");
model_room->setHeaderData(model_room->fieldIndex("is_used"), Qt::Horizontal, "客人入住");
model_room->setHeaderData(model_room->fieldIndex("is_carded"), Qt::Horizontal, "插卡状态");
model_room->setHeaderData(model_room->fieldIndex("is_quiet"), Qt::Horizontal, "安静模式");
model_room->setHeaderData(model_room->fieldIndex("is_need_server"), Qt::Horizontal, "服务请求");
model_room->setHeaderData(model_room->fieldIndex("is_need_clean"), Qt::Horizontal, "清洁请求");
model_room->setHeaderData(model_room->fieldIndex("is_need_repaire"), Qt::Horizontal, "维修请求");
model_room->setHeaderData(model_room->fieldIndex("is_need_help"), Qt::Horizontal, "求助请求");
model_room->setHeaderData(model_room->fieldIndex("air_temp"), Qt::Horizontal, "空调温度");
model_room->setHeaderData(model_room->fieldIndex("light_1"), Qt::Horizontal, "房间主灯");
model_room->setHeaderData(model_room->fieldIndex("light_2"), Qt::Horizontal, "房间次灯");
model_room->setHeaderData(model_room->fieldIndex("light_3"), Qt::Horizontal, "床头灯");
model_room->setHeaderData(model_room->fieldIndex("light_4"), Qt::Horizontal, "浴室灯");
model_room->setHeaderData(model_room->fieldIndex("light_5"), Qt::Horizontal, "阳台灯");
ui->table2->setModel(model_room);
for(int i=2;i<model_room->columnCount();i++){
ui->table2->hideColumn(i);
}
changeBuild();
connect(ui->table1->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(changeBuild()));
}
开发者ID:DingYong4223,项目名称:EConnect,代码行数:34,代码来源:roomsetting.cpp
示例17: QFDialog
QFFitFunctionSelectDialog::QFFitFunctionSelectDialog(QWidget *parent) :
QFDialog(parent),
ui(new Ui::QFFitFunctionSelectDialog)
{
currentFunction="";
setWindowTitle(tr("Select fit model function ..."));
model=NULL;
ui->setupUi(this);
filterModel.setDynamicSortFilter(true);
filterModel.setFilterCaseSensitivity(Qt::CaseInsensitive);
filterModel.setFilterRole(Qt::UserRole+10);
ui->lstModels->setModel(&filterModel);
ui->lstModels->expandAll();
connect(ui->lstModels->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(currentRowChanged(QModelIndex,QModelIndex)));
connect(ui->lstModels, SIGNAL(clicked(QModelIndex)), this, SLOT(currentRowChanged(QModelIndex)));
connect(ui->lstModels, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(currentRowAccepted(QModelIndex)));
ui->splitter->setStretchFactor(0,1);
ui->splitter->setStretchFactor(0,2);
QSettings* set=ProgramOptions::getInstance()->getQSettings();
if (set) {
loadWidgetGeometry(*set, this, pos(), size(), "QFFitFunctionSelectDialog/windowsize");
loadSplitter(*set, ui->splitter, "QFFitFunctionSelectDialog/splitter");
}
setWindowFlags(windowFlags()|Qt::WindowMinMaxButtonsHint);
}
开发者ID:jkriege2,项目名称:QuickFit3,代码行数:26,代码来源:qffitfunctionselectdialog.cpp
示例18: QTreeView
CategoryFilterWidget::CategoryFilterWidget(QWidget *parent)
: QTreeView(parent)
{
CategoryFilterProxyModel *proxyModel = new CategoryFilterProxyModel(this);
proxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
proxyModel->setSourceModel(new CategoryFilterModel(this));
setModel(proxyModel);
setFrameShape(QFrame::NoFrame);
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
setUniformRowHeights(true);
setHeaderHidden(true);
setIconSize(Utils::Misc::smallIconSize());
#if defined(Q_OS_MAC)
setAttribute(Qt::WA_MacShowFocusRect, false);
#endif
setContextMenuPolicy(Qt::CustomContextMenu);
sortByColumn(0, Qt::AscendingOrder);
setCurrentIndex(model()->index(0, 0));
connect(this, SIGNAL(collapsed(QModelIndex)), SLOT(callUpdateGeometry()));
connect(this, SIGNAL(expanded(QModelIndex)), SLOT(callUpdateGeometry()));
connect(this, SIGNAL(customContextMenuRequested(QPoint)), SLOT(showMenu(QPoint)));
connect(selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex))
, SLOT(onCurrentRowChanged(QModelIndex,QModelIndex)));
connect(model(), SIGNAL(modelReset()), SLOT(callUpdateGeometry()));
}
开发者ID:ATGardner,项目名称:qBittorrent,代码行数:28,代码来源:categoryfilterwidget.cpp
示例19: while
void GraffitiTab::SetupViews ()
{
FSModel_->setRootPath (QDir::rootPath ());
FSModel_->setFilter (QDir::Dirs | QDir::NoDotAndDotDot);
FSModel_->setReadOnly (true);
Ui_.DirectoryTree_->setModel (FSModel_);
Ui_.DirectoryTree_->sortByColumn (0, Qt::AscendingOrder);
auto idx = FSModel_->index (QDir::homePath ());
while (idx.isValid ())
{
Ui_.DirectoryTree_->expand (idx);
idx = idx.parent ();
}
Ui_.FilesList_->setModel (FilesModel_);
connect (Ui_.FilesList_->selectionModel (),
SIGNAL (currentRowChanged (QModelIndex, QModelIndex)),
this,
SLOT (currentFileChanged (QModelIndex)));
connect (Ui_.PathLine_,
SIGNAL (activated (QString)),
this,
SLOT (handlePathLine ()));
}
开发者ID:MellonQ,项目名称:leechcraft,代码行数:27,代码来源:graffititab.cpp
示例20: connect
void ResultsPage::setModel(SiteResponseModel* model) {
m_selectedOutput = 0;
m_selectedRow = -1;
// Remove the previous model and delete the selectionModel
if (QItemSelectionModel* m = m_catalogTableView->selectionModel()) {
m_catalogTableView->setModel(0);
delete m;
}
// Need to check if the model has results -- otherwise there is a list of
// outputs with no data associated with them.
if (!model->hasResults())
return;
m_outputCatalog = model->outputCatalog();
m_catalogTableView->setModel(m_outputCatalog);
connect(m_outputCatalog, SIGNAL(enabledChanged(int)),
this, SLOT(enableSelectedCurve(int)));
connect(m_catalogTableView->selectionModel(), SIGNAL(currentRowChanged(QModelIndex,QModelIndex)),
this, SLOT(setSelectedSeries(QModelIndex,QModelIndex)));
m_outputComboBox->clear();
m_outputComboBox->addItems(m_outputCatalog->outputNames());
if (m_outputComboBox->count())
setSelectedOutput(0);
}
开发者ID:arkottke,项目名称:strata,代码行数:29,代码来源:ResultsPage.cpp
注:本文中的currentRowChanged函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论