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


C++ settingsChanged函数代码示例

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


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

示例1: QDialog

ShowFuelDeliveriesDialog::ShowFuelDeliveriesDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ShowFuelDeliveriesDialog)
{
    ui->setupUi(this);

    connect(this, SIGNAL(settingsChanged()), this, SLOT(updateSums()));

    /*
     * Configure table 'Fuels' columns
     */

    //A few columns shouldn't be shown
    ui->tableFuels->hideColumn(Column_Date);
    ui->tableFuels->hideColumn(Column_UUID);

    //Fuel
    ComboBoxDelegate *delegateFuel = new ComboBoxDelegate(this);
    QVector<QString> fuels;
    fuels.push_back("Bois déchiqueté");
    fuels.push_back("Granulés");
    fuels.push_back("Fioul");
    fuels.push_back("Propane");
    delegateFuel->setItems(fuels);
    ui->tableFuels->setItemDelegateForColumn(Column_Fuel, delegateFuel);
    ui->tableFuels->setColumnWidth(Column_Fuel, 150);

    //Qauntity
    ui->tableFuels->setColumnWidth(Column_Quantity, 110);

    //Unit
    ComboBoxDelegate *delegateUnit = new ComboBoxDelegate(this);
    QVector<QString> units;
    units.push_back("kg");
    units.push_back("tonnes");
    units.push_back("litres");
    units.push_back("m³");
    units.push_back("MAP");
    units.push_back("kWh");
    units.push_back("MWh");
    delegateUnit->setItems(units);
    ui->tableFuels->setItemDelegateForColumn(Column_Unit, delegateUnit);
    ui->tableFuels->setColumnWidth(Column_Unit, 80);

    //LHV
    DoubleSpinBoxDelegate *delegateLHV = new DoubleSpinBoxDelegate(this);
    delegateLHV->setSuffix(" kWh / unité");
    delegateLHV->setPrecision(4);
    ui->tableFuels->setItemDelegateForColumn(Column_LHV, delegateLHV);
    ui->tableFuels->setColumnWidth(Column_LHV, 140);

    //Moisture
    DoubleSpinBoxDelegate *delegateMoisture = new DoubleSpinBoxDelegate(this);
    delegateMoisture->setSuffix(" %");
    delegateMoisture->setMaximum(100);
    ui->tableFuels->setItemDelegateForColumn(Column_Moisture, delegateMoisture);
    ui->tableFuels->setColumnWidth(Column_Moisture, 80);

    //Energy
    DoubleSpinBoxDelegate *delegateEnergy = new DoubleSpinBoxDelegate(this);
    delegateEnergy->setSuffix(" MWh");
    delegateEnergy->setPrecision(4);
    ui->tableFuels->setItemDelegateForColumn(Column_Energy, delegateEnergy);
    ui->tableFuels->setColumnWidth(Column_Energy, 100);

    //Bill
    DoubleSpinBoxDelegate *delegateBill = new DoubleSpinBoxDelegate(this);
    delegateBill->setSuffix(" €");
    delegateBill->setPrecision(6);
    ui->tableFuels->setItemDelegateForColumn(Column_Bill, delegateBill);
    ui->tableFuels->setColumnWidth(Column_Bill, 110);

    //Energy Price
    DoubleSpinBoxDelegate *delegateEnergyPrice = new DoubleSpinBoxDelegate(this);
    delegateEnergyPrice->setSuffix(" € / MWh");
    delegateEnergyPrice->setPrecision(4);
    ui->tableFuels->setItemDelegateForColumn(Column_EnergyPrice, delegateEnergyPrice);
    ui->tableFuels->setColumnWidth(Column_EnergyPrice, 110);

    //Last column allows user to delete records
    ui->tableFuels->setColumnWidth(Column_Delete, 34);

    /*
     * Configure table 'Natural gas' columns
     */

    //Date shouldn't be shown
    ui->tableWidget_NaturalGas->hideRow(0);

    //Gas index will be edited by a DoubleSpinBox with extra parameters
    DoubleSpinBoxDelegate *delegateIndex_NaturalGas = new DoubleSpinBoxDelegate(this);
    delegateIndex_NaturalGas->setSuffix(" m³");
    delegateIndex_NaturalGas->setPrecision(5);
    ui->tableWidget_NaturalGas->setItemDelegateForRow(1, delegateIndex_NaturalGas);

    /*
     * Configure table 'Electricity' columns
     */

    //Date shouldn't be shown
//.........这里部分代码省略.........
开发者ID:pyridiss,项目名称:suivi-chaufferies,代码行数:101,代码来源:showfueldeliveriesdialog.cpp

示例2: GxsMessageFramePostWidget

/** Constructor */
GxsChannelPostsWidget::GxsChannelPostsWidget(const RsGxsGroupId &channelId, QWidget *parent) :
    GxsMessageFramePostWidget(rsGxsChannels, parent),
    ui(new Ui::GxsChannelPostsWidget)
{
    /* Invoke the Qt Designer generated object setup routine */
    ui->setupUi(this);


    /* Setup UI helper */

    mStateHelper->addWidget(mTokenTypeAllPosts, ui->progressBar, UISTATE_LOADING_VISIBLE);
    mStateHelper->addWidget(mTokenTypeAllPosts, ui->loadingLabel, UISTATE_LOADING_VISIBLE);
    mStateHelper->addWidget(mTokenTypeAllPosts, ui->filterLineEdit);

    mStateHelper->addWidget(mTokenTypePosts, ui->loadingLabel, UISTATE_LOADING_VISIBLE);

    mStateHelper->addLoadPlaceholder(mTokenTypeGroupData, ui->nameLabel);

    mStateHelper->addWidget(mTokenTypeGroupData, ui->postButton);
    mStateHelper->addWidget(mTokenTypeGroupData, ui->logoLabel);
    mStateHelper->addWidget(mTokenTypeGroupData, ui->subscribeToolButton);

    /* Connect signals */
    connect(ui->postButton, SIGNAL(clicked()), this, SLOT(createMsg()));
    connect(ui->subscribeToolButton, SIGNAL(subscribe(bool)), this, SLOT(subscribeGroup(bool)));
    connect(NotifyQt::getInstance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));

    /* add filter actions */
    ui->filterLineEdit->addFilter(QIcon(), tr("Title"), FILTER_TITLE, tr("Search Title"));
    ui->filterLineEdit->addFilter(QIcon(), tr("Message"), FILTER_MSG, tr("Search Message"));
    ui->filterLineEdit->addFilter(QIcon(), tr("Filename"), FILTER_FILE_NAME, tr("Search Filename"));
    connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), ui->feedWidget, SLOT(setFilterText(QString)));
    connect(ui->filterLineEdit, SIGNAL(textChanged(QString)), ui->fileWidget, SLOT(setFilterText(QString)));
    connect(ui->filterLineEdit, SIGNAL(filterChanged(int)), this, SLOT(filterChanged(int)));

    /* Initialize view button */
    //setViewMode(VIEW_MODE_FEEDS); see processSettings
    ui->infoWidget->hide();

    QSignalMapper *signalMapper = new QSignalMapper(this);
    connect(ui->feedToolButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
    connect(ui->fileToolButton, SIGNAL(clicked()), signalMapper, SLOT(map()));
    signalMapper->setMapping(ui->feedToolButton, VIEW_MODE_FEEDS);
    signalMapper->setMapping(ui->fileToolButton, VIEW_MODE_FILES);
    connect(signalMapper, SIGNAL(mapped(int)), this, SLOT(setViewMode(int)));

    /*************** Setup Left Hand Side (List of Channels) ****************/

    ui->loadingLabel->hide();
    ui->progressBar->hide();

    ui->nameLabel->setMinimumWidth(20);

    /* Initialize feed widget */
    ui->feedWidget->setSortRole(ROLE_PUBLISH, Qt::DescendingOrder);
    ui->feedWidget->setFilterCallback(filterItem);

    /* load settings */
    processSettings(true);

    /* Initialize subscribe button */
    QIcon icon;
    icon.addPixmap(QPixmap(":/images/redled.png"), QIcon::Normal, QIcon::On);
    icon.addPixmap(QPixmap(":/images/start.png"), QIcon::Normal, QIcon::Off);
    mAutoDownloadAction = new QAction(icon, "", this);
    mAutoDownloadAction->setCheckable(true);
    connect(mAutoDownloadAction, SIGNAL(triggered()), this, SLOT(toggleAutoDownload()));

    ui->subscribeToolButton->addSubscribedAction(mAutoDownloadAction);

    /* Initialize GUI */
    setAutoDownload(false);
    settingsChanged();
    setGroupId(channelId);
}
开发者ID:G10h4ck,项目名称:RetroShare,代码行数:76,代码来源:GxsChannelPostsWidget.cpp

示例3: Q_UNUSED

void VideoSettings::slotResolutionChanged(int idx)
{
   Q_UNUSED(idx)
   emit settingsChanged();
}
开发者ID:KDE,项目名称:ring-kde,代码行数:5,代码来源:videosettings.cpp

示例4: Q_UNUSED

void DiveProfileItem::settingsToggled(bool toggled)
{
	Q_UNUSED(toggled);
	settingsChanged();
}
开发者ID:ollie314,项目名称:subsurface,代码行数:5,代码来源:diveprofileitem.cpp

示例5: settingsChanged

void CWizPreferenceWindow::on_checkBoxManuallySort_toggled(bool checked)
{
    m_app.userSettings().setManualSortingEnable(checked);
    emit settingsChanged(wizoptionsFolders);
}
开发者ID:mfs6174,项目名称:WizQTClient,代码行数:5,代码来源:wizpreferencedialog.cpp

示例6: setIsDirty

void SettingsPanel::dirtifySettings() {
  if (!m_isLoading) {
    setIsDirty(true);
    emit settingsChanged();
  }
}
开发者ID:martinrotter,项目名称:rssguard,代码行数:6,代码来源:settingspanel.cpp

示例7: settingsChanged

void TodoPlugin::scanningScopeChanged(ScanningScope scanningScope)
{
    Settings newSettings = m_settings;
    newSettings.scanningScope = scanningScope;
    settingsChanged(newSettings);
}
开发者ID:choenig,项目名称:qt-creator,代码行数:6,代码来源:todoplugin.cpp

示例8: applySettings

ImageCache::ImageCache() {
    cachedImages = new QList<CacheObject*>();
    applySettings();
    connect(globalSettings, SIGNAL(settingsChanged()),
            this, SLOT(applySettings()));
}
开发者ID:xchz,项目名称:qimgv,代码行数:6,代码来源:imagecache.cpp

示例9: QMainWindow

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow),
    kwp(this),
    appSettings(new QSettings("vagblocks.ini", QSettings::IniFormat, this)),
    serialConfigured(false),
    storedRow(-1), storedCol(-1),
    currentlyLogging(false)
{
    /*
    QFile roboto(":/resources/Roboto-Regular.ttf");
    roboto.open(QIODevice::ReadOnly);
    if (QFontDatabase::addApplicationFontFromData(roboto.readAll()) < 0) {
        // error
    }
    roboto.close();
    */

    ui->setupUi(this);

    QString svnRev = APP_SVN_REV;
    int colonAt = svnRev.indexOf(":");
    if (colonAt > 0) {
        svnRev = svnRev.mid(colonAt+1);
    }
    QString appVer = APP_VERSION;
    aboutDialog = new about(appVer, svnRev, this);
    serSettings = new serialSettingsDialog(this);
    settingsDialog = new settings(appSettings, this);

    connect(ui->action_About, SIGNAL(triggered()), aboutDialog, SLOT(show()));
    connect(ui->actionApplication_settings, SIGNAL(triggered()), settingsDialog, SLOT(show()));

    setupBlockArray(ui->blocksLayout);

    connect(&kwp, SIGNAL(log(QString, int)), this, SLOT(log(QString, int)));
    connect(&kwp, SIGNAL(newBlockData(int)), this, SLOT(newBlockData(int)));
    connect(&kwp, SIGNAL(blockOpen(int)), this, SLOT(blockOpen(int)));
    connect(&kwp, SIGNAL(blockClosed(int)), this, SLOT(blockClosed(int)));
    connect(&kwp, SIGNAL(channelOpen(bool)), this, SLOT(channelOpen(bool)));
    connect(&kwp, SIGNAL(elmInitialised(bool)), this, SLOT(elmInitialised(bool)));
    connect(&kwp, SIGNAL(portOpened(bool)), this, SLOT(portOpened(bool)));
    connect(&kwp, SIGNAL(portClosed()), this, SLOT(portClosed()));
    connect(&kwp, SIGNAL(newModuleInfo(QStringList)), this, SLOT(moduleInfoReceived(QStringList)));
    connect(&kwp, SIGNAL(newEcuInfo(QStringList)), this, SLOT(ecuInfoReceived(QStringList)));
    connect(ui->pushButton_log, SIGNAL(clicked(bool)), this, SLOT(startLogging(bool)));
    connect(&kwp, SIGNAL(labelsLoaded(bool)), this, SLOT(labelsLoaded(bool)));
    connect(ui->lineEdit_moduleNum, SIGNAL(textChanged(QString)), this, SLOT(clearUI()));
    connect(ui->comboBox_modules, SIGNAL(activated(int)), this, SLOT(selectNewModule(int)));
    connect(&kwp, SIGNAL(moduleListRefreshed()), this, SLOT(refreshModules()));
    connect(ui->pushButton_refresh, SIGNAL(clicked()), &kwp, SLOT(openGW_refresh()));
    connect(&kwp, SIGNAL(sampleFormatChanged()), this, SLOT(sampleFormatChanged()));
    connect(&kwp, SIGNAL(loggingStarted()), this, SLOT(loggingStarted()));
    connect(settingsDialog, SIGNAL(settingsChanged()), this, SLOT(updateSettings()));

    for (int i = 0; i < 16; i++) { // setup running average for sample rate
        avgList.append(0);
    }

    restoreSettings();

    if (serialConfigured) {
        kwp.setSerialParams(serSettings->getSettings());
        QMetaObject::invokeMethod(&kwp, "openPort", Qt::QueuedConnection);
    }

    connect(serSettings, SIGNAL(settingsApplied()), this, SLOT(connectToSerial()));
    refreshModules(true);
}
开发者ID:OwenBrotherwood,项目名称:vag-blocks,代码行数:69,代码来源:mainwindow.cpp

示例10: QDialog

Dialog::Dialog(QWidget *parent) :
QDialog(parent, Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint),
ui(new Ui::Dialog),
mSettings(new LxQt::Settings("lxqt-runner", this)),
mGlobalShortcut(0),
mLockCascadeChanges(false),
mConfigureDialog(0) {
    ui->setupUi(this);
    setWindowTitle("LXDE-Qt Runner");

    connect(LxQt::Settings::globalSettings(), SIGNAL(iconThemeChanged()), this, SLOT(update()));

    connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide()));

    connect(mSettings, SIGNAL(settingsChanged()), this, SLOT(applySettings()));

    ui->commandEd->installEventFilter(this);

    connect(ui->commandEd, SIGNAL(textChanged(QString)), this, SLOT(setFilter(QString)));
    connect(ui->commandEd, SIGNAL(returnPressed()), this, SLOT(runCommand()));

    mCommandItemModel = new CommandItemModel(this);
    ui->commandList->installEventFilter(this);
    ui->commandList->setModel(mCommandItemModel);
    ui->commandList->setEditTriggers(QAbstractItemView::NoEditTriggers);
    connect(ui->commandList, SIGNAL(clicked(QModelIndex)), this, SLOT(runCommand()));
    setFilter("");
    dataChanged();

    ui->commandList->setItemDelegate(new HtmlDelegate(QSize(32, 32), ui->commandList));

    // Popup menu ...............................
    QAction *a = new QAction(XdgIcon::fromTheme("configure"), tr("Configure lxqt-runner"), this);
    connect(a, SIGNAL(triggered()), this, SLOT(showConfigDialog()));
    addAction(a);

    //    a = new QAction(XdgIcon::fromTheme("edit-clear-history"), tr("Clear lxqt-runner History"), this);
    //    connect(a, SIGNAL(triggered()), mCommandItemModel, SLOT(clearHistory()));
    //    addAction(a);

    mPowerManager = new LxQt::PowerManager(this);
    addActions(mPowerManager->availableActions());
    mScreenSaver = new LxQt::ScreenSaver(this);
    addActions(mScreenSaver->availableActions());

    setContextMenuPolicy(Qt::ActionsContextMenu);

    QMenu *menu = new QMenu(this);
    menu->addActions(actions());
    ui->actionButton->setMenu(menu);
    ui->actionButton->setIcon(XdgIcon::fromTheme("configure"));
    // End of popup menu ........................

    applySettings();


    connect(mGlobalShortcut, SIGNAL(activated()), this, SLOT(showHide()));
    connect(mGlobalShortcut, SIGNAL(shortcutChanged(QString, QString)), this, SLOT(shortcutChanged(QString, QString)));

    resize(mSettings->value("dialog/width", 400).toInt(), size().height());


    connect(mCommandItemModel, SIGNAL(layoutChanged()), this, SLOT(dataChanged()));
}
开发者ID:MoonLightDE,项目名称:MoonLightDE,代码行数:64,代码来源:dialog.cpp

示例11: QWidget

PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f)
{
	ui.setupUi(this);

	QSettings s;
	QStringList rebreater_modes;
	s.beginGroup("Planner");
	prefs.last_stop = s.value("last_stop", prefs.last_stop).toBool();
	prefs.verbatim_plan = s.value("verbatim_plan", prefs.verbatim_plan).toBool();
	prefs.display_duration = s.value("display_duration", prefs.display_duration).toBool();
	prefs.display_runtime = s.value("display_runtime", prefs.display_runtime).toBool();
	prefs.display_transitions = s.value("display_transitions", prefs.display_transitions).toBool();
	prefs.deco_mode = deco_mode(s.value("deco_mode", prefs.deco_mode).toInt());
	prefs.safetystop = s.value("safetystop", prefs.safetystop).toBool();
	prefs.reserve_gas = s.value("reserve_gas", prefs.reserve_gas).toInt();
	prefs.ascrate75 = s.value("ascrate75", prefs.ascrate75).toInt();
	prefs.ascrate50 = s.value("ascrate50", prefs.ascrate50).toInt();
	prefs.ascratestops = s.value("ascratestops", prefs.ascratestops).toInt();
	prefs.ascratelast6m = s.value("ascratelast6m", prefs.ascratelast6m).toInt();
	prefs.descrate = s.value("descrate", prefs.descrate).toInt();
	prefs.bottompo2 = s.value("bottompo2", prefs.bottompo2).toInt();
	prefs.decopo2 = s.value("decopo2", prefs.decopo2).toInt();
	prefs.doo2breaks = s.value("doo2breaks", prefs.doo2breaks).toBool();
	prefs.switch_at_req_stop = s.value("switch_at_req_stop", prefs.switch_at_req_stop).toBool();
	prefs.min_switch_duration = s.value("min_switch_duration", prefs.min_switch_duration).toInt();
	prefs.drop_stone_mode = s.value("drop_stone_mode", prefs.drop_stone_mode).toBool();
	prefs.bottomsac = s.value("bottomsac", prefs.bottomsac).toInt();
	prefs.decosac = s.value("decosac", prefs.decosac).toInt();
	plannerModel->getDiveplan().bottomsac = prefs.bottomsac;
	plannerModel->getDiveplan().decosac = prefs.decosac;
	s.endGroup();

	updateUnitsUI();
	ui.lastStop->setChecked(prefs.last_stop);
	ui.verbatim_plan->setChecked(prefs.verbatim_plan);
	ui.display_duration->setChecked(prefs.display_duration);
	ui.display_runtime->setChecked(prefs.display_runtime);
	ui.display_transitions->setChecked(prefs.display_transitions);
	ui.safetystop->setChecked(prefs.safetystop);
	ui.reserve_gas->setValue(prefs.reserve_gas / 1000);
	ui.bottompo2->setValue(prefs.bottompo2 / 1000.0);
	ui.decopo2->setValue(prefs.decopo2 / 1000.0);
	ui.backgasBreaks->setChecked(prefs.doo2breaks);
	ui.drop_stone_mode->setChecked(prefs.drop_stone_mode);
	ui.switch_at_req_stop->setChecked(prefs.switch_at_req_stop);
	ui.min_switch_duration->setValue(prefs.min_switch_duration / 60);
	ui.recreational_deco->setChecked(prefs.deco_mode == RECREATIONAL);
	ui.buehlmann_deco->setChecked(prefs.deco_mode == BUEHLMANN);
	ui.vpmb_deco->setChecked(prefs.deco_mode == VPMB);

	// should be the same order as in dive_comp_type!
	rebreater_modes << tr("Open circuit") << tr("CCR") << tr("pSCR");
	ui.rebreathermode->insertItems(0, rebreater_modes);

	modeMapper = new QSignalMapper(this);
	connect(modeMapper, SIGNAL(mapped(int)) , plannerModel, SLOT(setDecoMode(int)));
	modeMapper->setMapping(ui.recreational_deco, int(RECREATIONAL));
	modeMapper->setMapping(ui.buehlmann_deco, int(BUEHLMANN));
	modeMapper->setMapping(ui.vpmb_deco, int(VPMB));
	
	connect(ui.recreational_deco, SIGNAL(clicked()), modeMapper, SLOT(map()));
	connect(ui.buehlmann_deco, SIGNAL(clicked()), modeMapper, SLOT(map()));
	connect(ui.vpmb_deco, SIGNAL(clicked()), modeMapper, SLOT(map()));
	
	connect(ui.lastStop, SIGNAL(toggled(bool)), plannerModel, SLOT(setLastStop6m(bool)));
	connect(ui.verbatim_plan, SIGNAL(toggled(bool)), plannerModel, SLOT(setVerbatim(bool)));
	connect(ui.display_duration, SIGNAL(toggled(bool)), plannerModel, SLOT(setDisplayDuration(bool)));
	connect(ui.display_runtime, SIGNAL(toggled(bool)), plannerModel, SLOT(setDisplayRuntime(bool)));
	connect(ui.display_transitions, SIGNAL(toggled(bool)), plannerModel, SLOT(setDisplayTransitions(bool)));
	connect(ui.safetystop, SIGNAL(toggled(bool)), plannerModel, SLOT(setSafetyStop(bool)));
	connect(ui.reserve_gas, SIGNAL(valueChanged(int)), plannerModel, SLOT(setReserveGas(int)));
	connect(ui.ascRate75, SIGNAL(valueChanged(int)), this, SLOT(setAscRate75(int)));
	connect(ui.ascRate75, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.ascRate50, SIGNAL(valueChanged(int)), this, SLOT(setAscRate50(int)));
	connect(ui.ascRate50, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.ascRateStops, SIGNAL(valueChanged(int)), this, SLOT(setAscRateStops(int)));
	connect(ui.ascRateStops, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.ascRateLast6m, SIGNAL(valueChanged(int)), this, SLOT(setAscRateLast6m(int)));
	connect(ui.ascRateLast6m, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.descRate, SIGNAL(valueChanged(int)), this, SLOT(setDescRate(int)));
	connect(ui.descRate, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
	connect(ui.bottompo2, SIGNAL(valueChanged(double)), this, SLOT(setBottomPo2(double)));
	connect(ui.decopo2, SIGNAL(valueChanged(double)), this, SLOT(setDecoPo2(double)));
	connect(ui.drop_stone_mode, SIGNAL(toggled(bool)), plannerModel, SLOT(setDropStoneMode(bool)));
	connect(ui.bottomSAC, SIGNAL(valueChanged(double)), this, SLOT(bottomSacChanged(double)));
	connect(ui.decoStopSAC, SIGNAL(valueChanged(double)), this, SLOT(decoSacChanged(double)));
	connect(ui.gfhigh, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFHigh(int)));
	connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
	connect(ui.gfhigh, SIGNAL(editingFinished()), plannerModel, SLOT(triggerGFHigh()));
	connect(ui.gflow, SIGNAL(editingFinished()), plannerModel, SLOT(triggerGFLow()));
	connect(ui.backgasBreaks, SIGNAL(toggled(bool)), this, SLOT(setBackgasBreaks(bool)));
	connect(ui.switch_at_req_stop, SIGNAL(toggled(bool)), plannerModel, SLOT(setSwitchAtReqStop(bool)));
	connect(ui.min_switch_duration, SIGNAL(valueChanged(int)), plannerModel, SLOT(setMinSwitchDuration(int)));
	connect(ui.rebreathermode, SIGNAL(currentIndexChanged(int)), plannerModel, SLOT(setRebreatherMode(int)));
	connect(plannerModel, SIGNAL(recreationChanged(bool)), this, SLOT(disableDecoElements(bool)));

	settingsChanged();
	ui.gflow->setValue(prefs.gflow);
	ui.gfhigh->setValue(prefs.gfhigh);

//.........这里部分代码省略.........
开发者ID:20150,项目名称:subsurface,代码行数:101,代码来源:diveplanner.cpp

示例12: switch


//.........这里部分代码省略.........
			applyProxy();

			if (page1->trayNotifiesDefault)
				Notifies::setNativeFirst(!page1->trayNotifiesDefault->isChecked());

			QSettings profileSettings(QMPlay2Core.getSettingsDir() + "Profile.ini", QSettings::IniFormat);
			const QString selectedProfile = getSelectedProfile();
			if (selectedProfile != profileSettings.value("Profile", "/").toString())
			{
				profileSettings.setValue("Profile", selectedProfile);
				restartApp();
			}
		} break;
		case 2:
		{
			QMPSettings.set("ShortSeek", page2->shortSeekB->value());
			QMPSettings.set("LongSeek", page2->longSeekB->value());
			QMPSettings.set("AVBufferLocal", page2->bufferLocalB->value());
			QMPSettings.set("AVBufferNetwork", page2->bufferNetworkB->value());
			QMPSettings.set("BackwardBuffer", page2->backwardBufferNetworkB->currentIndex());
			QMPSettings.set("PlayIfBuffered", page2->playIfBufferedB->value());
			QMPSettings.set("ForceSamplerate", page2->forceSamplerate->isChecked());
			QMPSettings.set("Samplerate", page2->samplerateB->value());
			QMPSettings.set("MaxVol", page2->maxVolB->value());
			QMPSettings.set("ForceChannels", page2->forceChannels->isChecked());
			QMPSettings.set("Channels", page2->channelsB->value());
			QMPSettings.set("ReplayGain/Enabled", page2->replayGain->isChecked());
			QMPSettings.set("ReplayGain/Album", page2->replayGainAlbum->isChecked());
			QMPSettings.set("ReplayGain/PreventClipping", page2->replayGainPreventClipping->isChecked());
			QMPSettings.set("ReplayGain/Preamp", page2->replayGainPreamp->value());
			QMPSettings.set("WheelAction", page2->wheelActionB->isChecked());
			QMPSettings.set("WheelSeek", page2->wheelSeekB->isChecked());
			QMPSettings.set("WheelVolume", page2->wheelVolumeB->isChecked());
			QMPSettings.set("ShowBufferedTimeOnSlider", page2->showBufferedTimeOnSlider->isChecked());
			QMPSettings.set("SavePos", page2->savePos->isChecked());
			QMPSettings.set("KeepZoom", page2->keepZoom->isChecked());
			QMPSettings.set("KeepARatio", page2->keepARatio->isChecked());
			QMPSettings.set("KeepSubtitlesDelay", page2->keepSubtitlesDelay->isChecked());
			QMPSettings.set("KeepSubtitlesScale", page2->keepSubtitlesScale->isChecked());
			QMPSettings.set("KeepVideoDelay", page2->keepVideoDelay->isChecked());
			QMPSettings.set("KeepSpeed", page2->keepSpeed->isChecked());
			QMPSettings.set("SyncVtoA", page2->syncVtoA->isChecked());
			QMPSettings.set("Silence", page2->silence->isChecked());
			QMPSettings.set("RestoreVideoEqualizer", page2->restoreVideoEq->isChecked());
			QMPSettings.set("IgnorePlaybackError", page2->ignorePlaybackError->isChecked());
			QMPSettings.set("LeftMouseTogglePlay", page2->leftMouseTogglePlay->checkState());
			QMPSettings.set("AccurateSeek", page2->accurateSeekB->checkState());
			QMPSettings.set("UnpauseWhenSeeking", page2->unpauseWhenSeekingB->isChecked());
			QMPSettings.set("StoreARatioAndZoom", page2->storeARatioAndZoomB->isChecked());

			QStringList videoWriters, audioWriters, decoders;
			for (QListWidgetItem *wI : page2ModulesList[0]->list->findItems(QString(), Qt::MatchContains))
				videoWriters += wI->text();
			for (QListWidgetItem *wI : page2ModulesList[1]->list->findItems(QString(), Qt::MatchContains))
				audioWriters += wI->text();
			for (QListWidgetItem *wI : page2ModulesList[2]->list->findItems(QString(), Qt::MatchContains))
				decoders += wI->text();
			QMPSettings.set("videoWriters", videoWriters);
			QMPSettings.set("audioWriters", audioWriters);
			QMPSettings.set("decoders", decoders);
			tabCh(2);
			tabCh(1);

			emit setWheelStep(page2->shortSeekB->value());
			emit setVolMax(page2->maxVolB->value());

			SetAudioChannelsMenu();
		} break;
		case 3:
			if (page3->module && page3->scrollA->widget())
			{
				Module::SettingsWidget *settingsWidget = (Module::SettingsWidget *)page3->scrollA->widget();
				settingsWidget->saveSettings();
				settingsWidget->flushSettings();
				page3->module->setInstances(page3Restart);
				chModule(page3->listW->currentItem());
			}
			break;
		case 4:
			page4->writeSettings();
			QMPSettings.set("ApplyToASS/ColorsAndBorders", page4->colorsAndBordersB->isChecked());
			QMPSettings.set("ApplyToASS/MarginsAndAlignment", page4->marginsAndAlignmentB->isChecked());
			QMPSettings.set("ApplyToASS/FontsAndSpacing", page4->fontsB->isChecked());
			QMPSettings.set("ApplyToASS/OverridePlayRes", page4->overridePlayResB->isChecked());
			QMPSettings.set("ApplyToASS/ApplyToASS", page4->toAssGB->isChecked());
			break;
		case 5:
			QMPSettings.set("OSD/Enabled", page5->enabledB->isChecked());
			page5->writeSettings();
			break;
		case 6:
			page6->deintSettingsW->writeSettings();
			if (page6->otherVFiltersW)
				page6->otherVFiltersW->writeSettings();
			break;
	}
	if (page != 3)
		QMPSettings.flush();
	emit settingsChanged(page, page3Restart);
}
开发者ID:arthurzam,项目名称:QMPlay2,代码行数:101,代码来源:SettingsWidget.cpp

示例13: QObject

AbstractProfilePolygonItem::AbstractProfilePolygonItem() : QObject(), QGraphicsPolygonItem(), hAxis(NULL), vAxis(NULL), dataModel(NULL), hDataColumn(-1), vDataColumn(-1)
{
	setCacheMode(DeviceCoordinateCache);
	connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(settingsChanged()));
}
开发者ID:JamesAwesome,项目名称:subsurface,代码行数:5,代码来源:diveprofileitem.cpp

示例14: QMainWindow

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    preferencesDialog = new PreferencesDialog();
    fontDialog = new FontDialog();
    errorMessage = new QErrorMessage();
    sheetNumberLabel = new QLabel("<h2>1</h2>");
    sheetNumberLabel->setToolTip(tr("Number of Current Sheet"));
    sheetNumberLabel->setFrameShape(QFrame::Panel);
    sheetNumberLabel->setFrameShadow(QFrame::Sunken);
    sheetNumberLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
    sheetNumberLabel->setMinimumWidth(ui->toolBar->height());
    errorMessage->setMinimumSize(200, 150);

    //----File----
    connect(ui->actionConvert_to_Handwritten, SIGNAL(triggered()),
            this, SLOT(renderFirstSheet()));
    connect(ui->actionLoad_Text_from_File, SIGNAL(triggered()),
            this, SLOT(loadTextFromFile()));
    connect(ui->actionLoad_Font, SIGNAL(triggered()),
            this, SLOT(loadFont()));
    connect(ui->actionFont_Editor, SIGNAL(triggered()),
            fontDialog, SLOT(exec()));
    connect(ui->actionSave_Current_Sheet_as, SIGNAL(triggered()),
            this, SLOT(saveSheet()));
    connect(ui->actionSave_All_Sheets, SIGNAL(triggered()),
            this, SLOT(saveAllSheets()));
    connect(ui->actionPrint_Current_Sheet, SIGNAL(triggered()),
            this, SLOT(printSheet()));
    connect(ui->actionPrint_All, SIGNAL(triggered()),
            this, SLOT(printAllSheets()));

    //----Edit----
    //connect menu action "Show Toolbar"
    connect(ui->actionShow_ToolBar, SIGNAL(triggered(bool)),
            ui->toolBar, SLOT(setVisible(bool)));
    connect(ui->toolBar, SIGNAL(visibilityChanged(bool)),
            ui->actionShow_ToolBar, SLOT(setChecked(bool)));

    //preferencesDialog connections
    connect(ui->actionPreferences, SIGNAL(triggered()),
            preferencesDialog, SLOT(exec()));
    connect(preferencesDialog, SIGNAL(settingsChanged()),
            this, SLOT(loadSettings()));

    //----Help----
    connect(ui->actionAbout_Scribbler, SIGNAL(triggered()),
            this, SLOT(showAboutBox()));
    connect(ui->actionLicenses_and_Credits, SIGNAL(triggered()),
            this, SLOT(showLicensesBox()));
    connect(ui->actionHowTo, SIGNAL(triggered()),
            this, SLOT(showHowToBox()));

    //----ToolBar----
    //add actions to tool bar and connect them to slots
    connect(ui->toolBar->addAction(QPixmap("://render.png"), tr("Convert to Handwritten")), SIGNAL(triggered(bool)),
            this, SLOT(renderFirstSheet()));
    connect(ui->toolBar->addAction(QPixmap("://printer.png"), tr("Print Sheets")), SIGNAL(triggered(bool)),
            this, SLOT(printAllSheets()));
    connect(ui->toolBar->addAction(QPixmap("://save.png"), tr("Save Sheets")), SIGNAL(triggered(bool)),
            this, SLOT(saveAllSheets()));

    ui->toolBar->addSeparator();

    connect(ui->toolBar->addAction(QPixmap("://left.png"), tr("Previous Sheet")), SIGNAL(triggered(bool)),
            this, SLOT(renderPreviousSheet()));
    ui->toolBar->addWidget(sheetNumberLabel);
    connect(ui->toolBar->addAction(QPixmap("://right.png"), tr("Next Sheet")), SIGNAL(triggered(bool)),
            this, SLOT(renderNextSheet()));

    connect(fontDialog, SIGNAL(fontReady()),
            this, SLOT(updateCurrentSheet()));
    errorMessage->setModal(true);

    ui->toolBar->actions()[ToolButton::Render]->setShortcut(Qt::ControlModifier + Qt::Key_R);
    ui->toolBar->actions()[ToolButton::Print]->setShortcut(Qt::ControlModifier + Qt::Key_P);
    ui->toolBar->actions()[ToolButton::Save]->setShortcut(Qt::ControlModifier + Qt::Key_S);
    ui->toolBar->actions()[ToolButton::Next]->setShortcut(Qt::ControlModifier + Qt::Key_Right);
    ui->toolBar->actions()[ToolButton::Previous]->setShortcut(Qt::ControlModifier + Qt::Key_Left);
    ui->textEdit->installEventFilter(this);
    ui->toolBar->actions()[ToolButton::Next]->setDisabled(true);
    ui->toolBar->actions()[ToolButton::Previous]->setDisabled(true);

    //initialize some class members
    sheetPointers.push_back(0);
    currentSheetNumber = 0;

    preferencesDialog->loadSettingsFromFile();
    preferencesDialog->loadSettingsToFile();
}
开发者ID:aizenbit,项目名称:Scribbler,代码行数:92,代码来源:mainwindow.cpp

示例15: connect

void MLocale::connectSettings()
{
    d_ptr->pLocale->connectSettings();
    connect( d_ptr->pLocale, SIGNAL( settingsChanged() ),
             this, SIGNAL( settingsChanged() ) );
}
开发者ID:arcean,项目名称:libmeegotouch-framework,代码行数:6,代码来源:mlocale_proxy.cpp


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