PropertyModel::PropertyModel(TracksModel *database, QObject *parent): QAbstractItemModel(parent), mDatabase(database), mRecord(NULL) { connect(mDatabase, SIGNAL(dbChanged()), this, SLOT(updateRowList())); connect(mDatabase, SIGNAL(recordChanged()), this, SLOT(updateRecord())); connect(mDatabase, SIGNAL(recordSelected(Record*)), this, SLOT(setRecord(Record*))); updateRowList(); }
/*! Sets the record to \a record. If the record is set the recordChanged() signal will be emitted. */ void QDeclarativeNdefRecord::setRecord(const QNdefRecord &record) { Q_D(QDeclarativeNdefRecord); if (d->record == record) return; d->record = record; emit recordChanged(); }
/*! Sets the record to \a record. If the record is set the recordChanged() signal will be emitted. */ void QQmlNdefRecord::setRecord(const QNdefRecord &record) { Q_D(QQmlNdefRecord); if (d->record == record) return; d->record = record; emit recordChanged(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), mSelected(NULL) { ui->setupUi(this); connect(ui->findButton, SIGNAL(clicked(bool)), this, SLOT(onLeftButton())); connect(ui->infoButton, SIGNAL(clicked(bool)), this, SLOT(onRightButton())); connect(ui->filterTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onFilterSelected())); connect(ui->filterComboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(onFilterChanged())); connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), this, SLOT(onFilterChanged())); QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName("database.sqlite"); db.open(); mProgress = new QProgressDialog(this); mProgress->setWindowTitle(tr("Resistance is futile")); mPrinter = new PrintHelper(this); mPrintDialog = new PrintSelectDialog(this); mTracks = new TracksModel(this); mFiles = new FilesModel(mTracks, this); mProperties = new PropertyModel(mTracks, this); mTags = new TagsModel(mTracks, this); mFilter = new FilterModel(mTracks, this); mFilter->setSourceModel(mTracks); mSettings = new SettingsDialog(mTracks, this); connect(mTracks, SIGNAL(progressStart(int,QString)), this, SLOT(onProgressInit(int,QString))); connect(mTracks, SIGNAL(progress(int)), mProgress, SLOT(setValue(int))); connect(mTracks, SIGNAL(progressEnd()), mProgress, SLOT(reset())); ui->dbView->setModel(mFilter); connect(ui->dbView->selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SLOT(onTrackSelected(QModelIndex))); connect(mTracks, SIGNAL(recordSelected(Record*)), this, SLOT(onSelected(Record*))); connect(mTracks, SIGNAL(dbChanged()), this, SLOT(onDBChanged())); connect(mTracks, SIGNAL(tagsChanged()), this, SLOT(onTagsChanged())); connect(mTracks, SIGNAL(recordChanged()), this, SLOT(onRecordChanged())); connect(mTracks, SIGNAL(recordSelected(Record*)), this, SLOT(onRecordChanged())); connect(ui->filesView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(onFileActivated(QModelIndex))); connect(ui->actionSaveTrack, SIGNAL(triggered(bool)), mTracks, SLOT(saveRecord())); connect(ui->actionNewTrack, SIGNAL(triggered(bool)), mTracks, SLOT(newRecord())); connect(ui->actionCancelChanges, SIGNAL(triggered(bool)), mTracks, SLOT(revertRecord())); connect(ui->actionPlayTrack, SIGNAL(triggered(bool)), this, SLOT(onPlayPlus())); connect(ui->actionPlayTrackMinus, SIGNAL(triggered(bool)), this, SLOT(onPlayMinus())); connect(ui->actionPrint, SIGNAL(triggered(bool)), this, SLOT(onPrint())); connect(ui->actionAddFolder, SIGNAL(triggered(bool)), this, SLOT(onSetStorage())); connect(ui->actionExport, SIGNAL(triggered(bool)), this, SLOT(onExport())); connect(ui->actionImport, SIGNAL(triggered(bool)), this, SLOT(onImport())); connect(ui->actionSettings, SIGNAL(triggered(bool)), this, SLOT(onSettings())); connect(ui->actionFilterFilesOnly, SIGNAL(toggled(bool)), this, SLOT(onFFilter(bool))); connect(ui->actionFilterFullInfo, SIGNAL(toggled(bool)), this, SLOT(onIFFilter(bool))); connect(ui->actionFilterInfoOnly, SIGNAL(toggled(bool)), this, SLOT(onIFilter(bool))); connect(ui->addTagButton, SIGNAL(clicked(bool)), this, SLOT(onAddTag())); connect(ui->removeTagButton, SIGNAL(clicked(bool)), this, SLOT(onRemoveTag())); connect(ui->addFileButton, SIGNAL(clicked(bool)), this, SLOT(onAddFile())); connect(ui->deleteFileButton, SIGNAL(clicked(bool)), this, SLOT(onDeleteFile())); connect(ui->moveFileButton, SIGNAL(clicked(bool)), this, SLOT(onMoveFile())); connect(ui->autoFileButton, SIGNAL(clicked(bool)), this, SLOT(onAutoFile())); // no logic yet ui->moveFileButton->setVisible(false); ui->filesView->setModel(mFiles); ui->propertyView->setModel(mProperties); ui->propertyView->setItemDelegateForColumn( PropertyModel::valueColumn, new ComboCheckBoxDelegate(this, ", ")); ui->tagsView->setModel(mTags); load(); }
void IniReader::finished() { settings=watcher->result(); emit readConfigChanged(); emit writeConfigChanged(); emit romPathChanged(); emit hashPathChanged(); emit samplePathChanged(); emit artPathChanged(); emit ctrlrPathChanged(); emit iniPathChanged(); emit fontPathChanged(); emit cheatPathChanged(); emit crosshairPathChanged(); emit cfgDirChanged(); emit nvramDirChanged(); emit inputDirChanged(); emit stateDirChanged(); emit snapshotDirChanged(); emit diffDirChanged(); emit commentDirChanged(); emit stateChanged(); emit autoSaveChanged(); emit playbackChanged(); emit recordChanged(); emit mngWriteChanged(); emit aviWriteChanged(); emit wavWriteChanged(); emit snapNameChanged(); emit snapSizeChanged(); emit snapViewChanged(); emit snapBilinearChanged(); emit stateNameChanged(); emit burninChanged(); emit autoFrameSkipChanged(); emit frameSkipChanged(); emit secondsToRunChanged(); emit throttleChanged(); emit sleepChanged(); emit speedChanged(); emit refreshSpeedChanged(); emit rotateChanged(); emit rorChanged(); emit rolChanged(); emit autoRorChanged(); emit autoRolChanged(); emit flipXChanged(); emit flipYChanged(); emit artworkCropChanged(); emit useBackdropsChanged(); emit useOverlaysChanged(); emit useBezelsChanged(); emit useCPanelsChanged(); emit useMarqueesChanged(); emit brightnessChanged(); emit contrastChanged(); emit gammaChanged(); emit effectChanged(); emit beamChanged(); emit flickerChanged(); emit sampleRateChanged(); emit samplesChanged(); emit volumeChanged(); emit coinLockoutChanged(); emit ctrlrChanged(); emit mouseChanged(); emit joystickChanged(); emit lightgunChanged(); emit multiKeyboardChanged(); emit multiMouseChanged(); emit steadyKeyChanged(); emit uiActiveChanged(); emit offScreenReloadChanged(); emit joystickMapChanged(); emit joystickDeadzoneChanged(); emit joystickSaturationChanged(); emit naturalChanged(); emit joystickContradictoryChanged(); emit coinImpulseChanged(); emit paddleDeviceChanged(); emit adstickDeviceChanged(); emit pedalDeviceChanged(); emit dialDeviceChanged(); emit trackballDeviceChanged(); emit lightgunDeviceChanged(); emit positionalDeviceChanged(); emit mouseDeviceChanged(); emit verboseChanged(); emit logChanged(); emit osLogChanged(); emit debugChanged(); emit updateInPauseChanged(); emit debugScriptChanged(); emit sdlVideoFPSChanged(); emit commLocalHostChanged(); emit commLocalPortChanged(); emit commRemoteHostChanged(); emit commRemotePortChanged(); emit antiAliasChanged(); emit drcChanged(); emit drcUseCChanged(); emit drcLogUMLChanged(); emit drcLogNativeChanged(); emit biosChanged(); emit cheatChanged(); emit skipGameInfoChanged(); emit uiFontChanged(); emit ramSizeChanged(); emit confirmQuitChanged(); emit uiMouseChanged(); emit autoBootCommandChanged(); emit autoBootDelayChanged(); emit autoBootScriptChanged(); emit httpChanged(); emit httpPortChanged(); emit httpPathChanged(); emit consoleChanged(); emit multiThreadingChanged(); emit numProcessorsChanged(); emit videoChanged(); emit numScreensChanged(); emit windowChanged(); emit maximizeChanged(); emit keepAspectChanged(); emit unevenStretchChanged(); emit waitVSyncChanged(); emit syncRefreshChanged(); emit screenChanged(); emit aspectChanged(); emit resolutionChanged(); emit viewChanged(); emit switchResChanged(); emit filterChanged(); emit prescaleChanged(); emit glForcePow2TextureChanged(); emit glNoTextureRectChanged(); emit glVboChanged(); emit glPboChanged(); emit glGlslChanged(); emit glGlslFilterChanged(); emit soundChanged(); emit audioLatencyChanged(); emit centerHChanged(); emit centerVChanged(); emit scaleModeChanged(); emit useAllHeadsChanged(); emit keymapChanged(); emit keymapFileChanged(); emit sixAxisChanged(); emit videoDriverChanged(); emit renderDriverChanged(); emit audioDriverChanged(); emit glLibChanged(); }
void IniReader::setRecord(const QString &s){settings.insert("record",s);emit recordChanged();}