void QgsLabelPropertyDialog::on_buttonBox_clicked( QAbstractButton *button ) { if ( buttonBox->buttonRole( button ) == QDialogButtonBox::ApplyRole ) { emit applied(); } }
void PreferencesDialog::accept() { hide(); help_window->hide(); setResult(QDialog::Accepted); emit applied(); }
void QgsMapToolChangeLabelProperties::canvasReleaseEvent( QgsMapMouseEvent* e ) { Q_UNUSED( e ); if ( mLabelRubberBand && mCurrentLabel.valid ) { QString labeltext = QString(); // NULL QString signifies no expression if ( mCurrentLabel.settings.isExpression ) { labeltext = mCurrentLabel.pos.labelText; } QgsLabelPropertyDialog d( mCurrentLabel.pos.layerID, mCurrentLabel.pos.providerID, mCurrentLabel.pos.featureId, mCurrentLabel.pos.labelFont, labeltext, nullptr ); connect( &d, SIGNAL( applied() ), this, SLOT( dialogPropertiesApplied() ) ); if ( d.exec() == QDialog::Accepted ) { applyChanges( d.changedProperties() ); } deleteRubberBands(); } }
void FilePropertiesDialog::accept() { qDebug("FilePropertiesDialog::accept"); hide(); setResult( QDialog::Accepted ); emit applied(); }
void IconApplet::showConfigurationInterface() { KPropertiesDialog *dialog = m_dialog.data(); m_configTarget = m_url; if (m_hasDesktopFile) { const QFileInfo fi(m_url.toLocalFile()); if (!fi.isWritable()) { const QString suggestedName = fi.baseName(); m_configTarget = KService::newServicePath(false, suggestedName); KIO::Job *job = KIO::file_copy(m_url, m_configTarget); job->exec(); } } if (dialog) { KWindowSystem::setOnDesktop(dialog->winId(), KWindowSystem::currentDesktop()); dialog->show(); KWindowSystem::activateWindow(dialog->winId()); } else { dialog = new KPropertiesDialog(m_configTarget, 0 /*no parent widget*/); m_dialog = dialog; connect(dialog, SIGNAL(applied()), this, SLOT(acceptedPropertiesDialog())); connect(dialog, SIGNAL(canceled()), this, SLOT(cancelledPropertiesDialog())); dialog->setAttribute(Qt::WA_DeleteOnClose, true); dialog->setWindowTitle(i18n("%1 Icon Settings", m_configTarget.fileName())); dialog->show(); } }
bool main_window::modules_loaded() { OptionsI *options_i = (OptionsI *)core_i->get_interface(INAME_OPTIONS); QSettings settings; MainWinOptions::Settings s; s.close_to_tray = settings.value("MainWin/CloseToTray", false).toBool(); s.hide_toolbar = settings.value("MainWin/HideToolbar", false).toBool(); s.hide_frame = settings.value("MainWin/HideFrame", false).toBool(); s.tool_window = settings.value("MainWin/ToolWindow", false).toBool(); s.trans_percent = settings.value("MainWin/TransPercent", 0).toInt(); s.round_corners = settings.value("MainWin/RoundCorners", false).toBool(); s.on_top = settings.value("MainWin/OnTop", false).toBool(); if(options_i) { opt = new MainWinOptions(s); connect(opt, SIGNAL(applied()), this, SLOT(options_applied())); options_i->add_page("Appearance/Main Window", opt); } win->set_options(s); win->modules_loaded(); win->restoreHiddenState(); return true; }
bool AutoAway::modules_loaded() { options_i = (OptionsI *)core_i->get_interface(INAME_OPTIONS); QSettings settings; AutoAwayOptions::Settings s; s.enable = settings.value("AutoAway/Enable", true).toBool(); s.min = settings.value("AutoAway/Minutes", 15).toInt(); s.status = (GlobalStatus)settings.value("AutoAway/Status", (int)ST_SHORTAWAY).toInt(); s.restore = settings.value("AutoAway/Restore", true).toBool(); current_settings = s; if(options_i) { opt = new AutoAwayOptions(s); connect(opt, SIGNAL(applied()), this, SLOT(options_applied())); options_i->add_page("Auto Away", opt); } timer.setInterval(5000); connect(&timer, SIGNAL(timeout()), this, SLOT(checkIdle())); timer.start(); last_mouse_pos = QCursor::pos(); idle_time = QDateTime::currentDateTime(); idle = false; return true; }
void KNewFileMenuPrivate::executeOtherDesktopFile(const KNewFileMenuSingleton::Entry& entry) { if (!checkSourceExists(entry.templatePath)) { return; } KUrl::List::const_iterator it = m_popupFiles.constBegin(); for (; it != m_popupFiles.constEnd(); ++it) { QString text = entry.text; text.remove("..."); // the ... is fine for the menu item but not for the default filename text = text.trimmed(); // In some languages, there is a space in front of "...", see bug 268895 // KDE5 TODO: remove the "..." from link*.desktop files and use i18n("%1...") when making // the action. KUrl defaultFile(*it); defaultFile.addPath(KIO::encodeFileName(text)); if (defaultFile.isLocalFile() && QFile::exists(defaultFile.toLocalFile())) text = KIO::RenameDialog::suggestName(*it, text); const KUrl templateUrl(entry.templatePath); KDialog* dlg = new KPropertiesDialog(templateUrl, *it, text, m_parentWidget); dlg->setModal(q->isModal()); dlg->setAttribute(Qt::WA_DeleteOnClose); QObject::connect(dlg, SIGNAL(applied()), q, SLOT(_k_slotOtherDesktopFile())); dlg->show(); } // We don't set m_src here -> there will be no copy, we are done. }
bool AutoAwayOptions::apply() { current_settings.enable = ui.chkEnable->isChecked(); current_settings.min = ui.spnMin->value(); current_settings.restore = ui.chkRestore->isChecked(); current_settings.status = (GlobalStatus)ui.cmbStatus->currentIndex(); emit applied(); return true; }
void LauncherApplet::slotShowPreferences() { // Will delete itself... KPropertiesDialog *pDlg = new KPropertiesDialog(_fileItem, 0L, 0L, false, false); pDlg->setFileNameReadOnly(true); connect(pDlg, SIGNAL(applied()), SLOT(slotSettingsChanged())); pDlg->show(); }
void SettingsPage::apply() { for(int i = 0; i < m_ui->treeWidget->topLevelItemCount(); ++i) { QTreeWidgetItem *item = m_ui->treeWidget->topLevelItem(i); core()->setSetting(item->text(1), item->text(2)); } emit applied(); }
bool accounts::modules_loaded() { OptionsI *options_i = (OptionsI *)core_i->get_interface(INAME_OPTIONS); if(options_i) options_i->add_page("Accounts", options = new AccountsOptions(this)); connect(options, SIGNAL(applied()), this, SLOT(save_data())); read_data(); if(account_list.size() == 0) options_i->show_options("Accounts"); return true; }
MeasureConfigDialog::MeasureConfigDialog(QDialog *parent) : QDialog(parent), ui(new Ui::MeasureConfigDialog) { ui->setupUi(this); QPushButton *apply = ui->m_buttonBox->button(QDialogButtonBox::Apply); connect(apply, SIGNAL(clicked()), this, SIGNAL(applied())); connect(ui->m_modeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateTabs())); connect(ui->m_modeCombo, SIGNAL(currentIndexChanged(int)), ui->tabWidget, SLOT(setCurrentIndex(int))); }
/** Bring up the properites dialog, and extend it for files */ void BaseTreeView::slotProperties() { if (! currentKFileTreeViewItem()) return; propDlg = new KPropertiesDialog(currentKFileTreeViewItem()->fileItem(), this, 0L, false, false); //autodeletes itself fileInfoDlg = 0L; if (!currentKFileTreeViewItem()->isDir()) { fileInfoDlg = addFileInfoPage(propDlg); } connect(propDlg, SIGNAL( applied() ), this, SLOT( slotPropertiesApplied()) ); propDlg->exec(); }
Preferences::Preferences(const QString& currentVariant, QWidget *parent) : QDialog(parent) { setupUi(this); setWindowIcon(KIcon("tagua")); connect(buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(apply())); pagePref->hide(); PrefBase *b; KPageWidgetItem *i; b = new PrefWrapper<PrefBoard>(currentVariant, this); connect(this, SIGNAL(applied()), b, SLOT(apply())); i = pagePref->addPage(b, "Board"); i->setHeader("Board preferences:"); i->setIcon(KIcon("games-config-board")); b = new PrefWrapper<PrefMoveList>(currentVariant, this); connect(this, SIGNAL(applied()), b, SLOT(apply())); i = pagePref->addPage(b, "Move list"); i->setHeader("Move list preferences:"); i->setIcon(KIcon("view-list-tree")); b = new PrefWrapper<PrefTheme>(currentVariant, this); connect(this, SIGNAL(applied()), b, SLOT(apply())); i = pagePref->addPage(b, "Theme"); i->setHeader("Pieces & squares theme:"); i->setIcon(KIcon("games-config-theme")); pagePref->show(); b = new PrefWrapper<PrefEngines>(currentVariant, this); connect(this, SIGNAL(applied()), b, SLOT(apply())); i = pagePref->addPage(b, "Engines"); i->setHeader("Engines:"); i->setIcon(KIcon("help-hint")); pagePref->show(); }
QWidget * DownloadRegionDialog::Private::createOkCancelButtonBox() { QDialogButtonBox * const buttonBox = new QDialogButtonBox; m_okButton = buttonBox->addButton( QDialogButtonBox::Ok ); m_applyButton = buttonBox->addButton( QDialogButtonBox::Apply ); if ( MarbleGlobal::getInstance()->profiles() & MarbleGlobal::SmallScreen ) { buttonBox->removeButton( m_applyButton ); m_applyButton->setVisible( false ); } buttonBox->addButton( QDialogButtonBox::Cancel ); connect( buttonBox, SIGNAL(accepted()), m_dialog, SLOT(accept()) ); connect( buttonBox, SIGNAL(rejected()), m_dialog, SLOT(reject()) ); connect( m_applyButton, SIGNAL(clicked()), m_dialog, SIGNAL(applied()) ); return buttonBox; }
int Dialog2::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = MyDialog::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: changeAtom1((*reinterpret_cast< int(*)>(_a[1]))); break; case 1: changeAtom2((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: applied(); break; default: ; } _id -= 3; } return _id; }
JuffEd::JuffEd() : Juff::PluginNotifier(), Juff::DocHandlerInt() { mw_ = new JuffMW(); initActions(); viewer_ = new Juff::DocViewer(this); mw_->setMainWidget(viewer_); settingsDlg_ = new SettingsDlg(mw_); connect(settingsDlg_, SIGNAL(applied()), SLOT(onSettingsApplied())); connect(viewer_, SIGNAL(docActivated(Juff::Document*)), SLOT(onDocActivated(Juff::Document*))); connect(mw_, SIGNAL(closeRequested(bool&)), SLOT(onCloseRequested(bool&))); // UI must be initialized before engines and plugins because // we need menus to be already created when loading engines and plugins. initUI(); loadEngines(); pluginMgr_ = new PluginManager(this, this); // buildUI() *must* go before loadPlugins() because // it creates structures and widgets expected by loadPlugins() buildUI(); loadPlugins(); search_ = new SearchEngine(this, mw_); setSessionName( MainSettings::get( MainSettings::LastSession ) ); if ( !loadSession() ) { slotFileNew(); } if ( viewer_->docCount(Juff::PanelAll) == 0 ) { openDoc("", Juff::PanelLeft); viewer_->hidePanel(Juff::PanelRight); } else if ( viewer_->docCount(Juff::PanelLeft) == 0 ) { viewer_->hidePanel(Juff::PanelLeft); } else if ( viewer_->docCount(Juff::PanelRight) == 0 ) { viewer_->hidePanel(Juff::PanelRight); } onSettingsApplied(); mw_->restoreState(); }
void KMixApplet::preferences() { if ( !m_pref ) { m_pref = new AppletConfigDialog( this ); connect(m_pref, SIGNAL(finished()), SLOT(preferencesDone())); connect( m_pref, SIGNAL(applied()), SLOT(applyPreferences()) ); m_pref->setActiveColors(_colors.high , _colors.low , _colors.back); m_pref->setMutedColors (_colors.mutedHigh, _colors.mutedLow, _colors.mutedBack); m_pref->setUseCustomColors( _customColors ); } m_pref->show(); m_pref->raise(); }
void AppletConfigDialog::slotApply() { emit applied(); }
KstApp::KstApp(QWidget *parent, const char* name) : KMainWindow(parent, name) { clearWFlags(WDestructiveClose); stopping = false; config = kapp->config(); initStatusBar(); initDocument(); initView(); /* create dialogs */ debugDialog = new KstDebugDialogI(this); plotDialog = new KstPlotDialogI(doc, this); dataManager = new KstDataManagerI(doc, this); filterListEditor = new FilterListEditor(this); viewScalarsDialog = new KstViewScalarsDialogI(this); viewVectorsDialog = new KstViewVectorsDialogI(this); changeFileDialog = new KstChangeFileDialogI(this); changeNptsDialog = new KstChangeNptsDialogI(this); quickCurvesDialog = new KstQuickCurvesDialogI(this); quickPSDDialog = new KstQuickPSDDialogI(this); graphFileDialog = new KstGraphFileDialogI(this); vectorSaveDialog = new VectorSaveDialog(this); connect(KstVectorDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified())); connect(KstCurveDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified())); connect(KstEqDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified())); connect(KstHsDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified())); connect(KstPsdDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified())); connect(KstPluginDialogI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified())); connect(KstEventMonitorI::globalInstance(), SIGNAL(modified()), doc, SLOT(wasModified())); initActions(); readOptions(); _updateThread = new UpdateThread(doc); _updateThread->setUpdateTime(KstSettings::globalSettings()->plotUpdateTimer); _updateThread->start(); connect(doc, SIGNAL(newFrameMsg(int)), this, SLOT(slotUpdateFrameMsg(int))); connect(view, SIGNAL(newStatusMsg(const QString &)), this, SLOT(slotUpdateStatusMsg(const QString &))); connect(view, SIGNAL(newDataMsg(const QString &)), this, SLOT(slotUpdateDataMsg(const QString &))); /*** Plot Dialog signals */ connect(changeFileDialog, SIGNAL(docChanged()), this, SLOT(registerDocChange())); connect(changeNptsDialog, SIGNAL(docChanged()), this, SLOT(registerDocChange())); connect(quickCurvesDialog,SIGNAL(docChanged()), this, SLOT(registerDocChange())); connect(quickPSDDialog, SIGNAL(docChanged()), this, SLOT(registerDocChange())); connect(filterListEditor, SIGNAL(docChanged()), this, SLOT(registerDocChange())); connect(graphFileDialog, SIGNAL(graphFileReq(const QString &,int,int)), view, SLOT(printToGraphicsFile(const QString &,int,int))); /*** label dialog ***/ connect(view->labelDialog, SIGNAL(applied()), this, SLOT(registerDocChange())); /*** plot dialog ***/ connect(plotDialog, SIGNAL(docChanged()), this, SLOT(registerDocChange())); /*** ***/ connect(doc, SIGNAL(dataChanged()), this, SLOT(updateDialogs())); connect(dataManager, SIGNAL(editDataVector(const QString &)), KstVectorDialogI::globalInstance(), SLOT(show_I(const QString &))); connect(dataManager->OpenPlotDialog, SIGNAL(clicked()), this, SLOT(showPlotDialog())); setAutoSaveSettings("KST-KMainWindow", true); _dcopIface = new KstIfaceImpl(doc, this); view->forceUpdate(); connect(this, SIGNAL(settingsChanged()), this, SLOT(slotSettingsChanged())); QTimer::singleShot(0, this, SLOT(updateActions())); // Load any extensions ExtensionMgr *mgr = ExtensionMgr::self(); mgr->setWindow(this); KService::List sl = KServiceType::offers("Kst Extension"); for (KService::List::ConstIterator it = sl.begin(); it != sl.end(); ++it) { KService::Ptr service = *it; QString name = service->property("Name").toString(); if (!mgr->enabled(name) && !service->property("X-Kst-Enabled").toBool()) { continue; } mgr->loadExtension(service); } }
void MainConfigurationWindow::init() { setWindowRole("kadu-configuration"); widget()->appendUiFile(m_pathsProvider->dataPath() + QStringLiteral("configuration/dialog.ui")); #ifndef Q_OS_WIN widget()->widgetById("startup")->hide(); widget()->widgetById("hideMainWindowFromTaskbar")->hide(); #endif #if !defined(Q_OS_UNIX) widget()->widgetById("windowActivationMethod")->hide(); #endif #if defined(Q_OS_UNIX) && !defined(Q_OS_WIN) widget()->widgetById("notify/fullscreenSilentMode")->hide(); #endif #if !defined(Q_OS_UNIX) widget()->widgetById("useTransparency")->hide(); widget()->widgetById("userboxTransparency")->hide(); widget()->widgetById("userboxAlpha")->hide(); widget()->widgetById("userboxBlur")->hide(); #endif onStartupSetLastDescription = static_cast<QCheckBox *>(widget()->widgetById("onStartupSetLastDescription")); disconnectDescription = static_cast<QLineEdit *>(widget()->widgetById("disconnectDescription")); onStartupSetDescription = static_cast<QLineEdit *>(widget()->widgetById("onStartupSetDescription")); Account account = m_accountManager->defaultAccount(); if (!account.isNull() && account.protocolHandler()) { disconnectDescription->setMaxLength(account.statusContainer()->maxDescriptionLength()); onStartupSetDescription->setMaxLength(account.statusContainer()->maxDescriptionLength()); } connect( widget()->widgetById("disconnectWithCurrentDescription"), SIGNAL(activated(int)), this, SLOT(onChangeShutdownStatus(int))); connect(onStartupSetLastDescription, SIGNAL(activated(int)), this, SLOT(onChangeStartupDescription(int))); connect(widget()->widgetById("startupStatus"), SIGNAL(activated(int)), this, SLOT(onChangeStartupStatus(int))); connect(widget()->widgetById("lookChatAdvanced"), SIGNAL(clicked()), this, SLOT(showLookChatAdvanced())); connect(widget()->widgetById("installIconTheme"), SIGNAL(clicked()), this, SLOT(installIconTheme())); Preview *infoPanelSyntaxPreview = static_cast<Preview *>(widget()->widgetById("infoPanelSyntaxPreview")); connect( infoPanelSyntaxPreview, SIGNAL(needFixup(QString &)), m_kaduWindowService->kaduWindow()->infoPanel(), SLOT(styleFixup(QString &))); connect( widget()->widgetById("infoPanelSyntax"), SIGNAL(syntaxChanged(const QString &)), infoPanelSyntaxPreview, SLOT(syntaxChanged(const QString &))); widget()->widgetById("parseStatus")->setToolTip(QCoreApplication::translate("@default", SyntaxText)); (static_cast<ConfigSyntaxEditor *>(widget()->widgetById("infoPanelSyntax"))) ->setSyntaxHint(QCoreApplication::translate("@default", SyntaxText)); userboxTransparency = static_cast<QCheckBox *>(widget()->widgetById("userboxTransparency")); userboxAlpha = static_cast<QSlider *>(widget()->widgetById("userboxAlpha")); userboxBlur = static_cast<QCheckBox *>(widget()->widgetById("userboxBlur")); buddyColors = new BuddyListBackgroundColorsWidget(this); PluginList = injectedFactory()->makeInjected<PluginListWidget>(this); PluginList->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum); connect(this, SIGNAL(configurationWindowApplied()), this, SLOT(applied())); connect( m_configurationUiHandlerRepository, SIGNAL(configurationUiHandlerAdded(ConfigurationUiHandler *)), this, SLOT(configurationUiHandlerAdded(ConfigurationUiHandler *))); connect( m_configurationUiHandlerRepository, SIGNAL(configurationUiHandlerRemoved(ConfigurationUiHandler *)), this, SLOT(configurationUiHandlerRemoved(ConfigurationUiHandler *))); triggerCompositingStateChanged(); }
bool StylesOptions::apply() { emit applied(); savedStyle = qApp->styleSheet(); return true; }
// Make a popup dialog box SpinBoard::SpinBoard(MainForm *mainForm, QWidget * parent) : QDialog(parent), mainForm(mainForm) { setWindowTitle( "AViz: Set Spins" ); { // Create a hboxlayout that will fill the first row hb1 = new QWidget(this); // Create a combo box that will go into the // second column; entries in the combo box will // be made later spinCob = new QComboBox(); connect( spinCob, SIGNAL(activated(int)), SLOT(setSpin()) ); // Add a check box button showSpinCb = new QCheckBox("Show Spins"); showSpinCb->setChecked(true); // Define a callback for this toggle switch connect( showSpinCb, SIGNAL(clicked()), this, SLOT(adjustSpin()) ); QHBoxLayout *hbox = new QHBoxLayout(hb1); hbox->addWidget(new QLabel(" Type: ")); hbox->addWidget(spinCob); hbox->addStretch(1); hbox->addWidget(showSpinCb); } { // Create a hboxlayout that will fill the next row hb2 = new QWidget(this); // Add color labels colorLabel0 = new ColorLabel(hb2); colorLabel1 = new ColorLabel(hb2); colorLabel2 = new ColorLabel(hb2); colorLabel3 = new ColorLabel(hb2); colorLabel4 = new ColorLabel(hb2); colorLabel5 = new ColorLabel(hb2); colorLabel0->setFixedHeight( LABEL_HEIGHT ); colorLabel1->setFixedHeight( LABEL_HEIGHT ); colorLabel2->setFixedHeight( LABEL_HEIGHT ); colorLabel3->setFixedHeight( LABEL_HEIGHT ); colorLabel4->setFixedHeight( LABEL_HEIGHT ); colorLabel5->setFixedHeight( LABEL_HEIGHT ); // Add a push button colorButton = new QPushButton("Set Color..."); // Define a callback for this button connect(colorButton, SIGNAL(clicked()), SLOT(setColorCb())); QHBoxLayout *hbox = new QHBoxLayout(hb2); hbox->setSpacing(0); hbox->addWidget(new QLabel(" Color: ")); hbox->addWidget(colorLabel0); hbox->addWidget(colorLabel1); hbox->addWidget(colorLabel2); hbox->addWidget(colorLabel3); hbox->addWidget(colorLabel4); hbox->addWidget(colorLabel5); hbox->addWidget(colorButton); } // Create a hboxlayout that will fill the next row sizeBox = new SizeBox(this); { // Create a hboxlayout that will fill the next row hb4 = new QWidget(this); // Add radiobuttons and a label modeL = new QLabel(" Color Criterion: "); colorMode = new QGroupBox(); QHBoxLayout *colorModeLayout = new QHBoxLayout(colorMode); colorMode0 = new QRadioButton("Type"); colorMode1 = new QRadioButton("Position"); colorMode2 = new QRadioButton("Property"); colorMode3 = new QRadioButton("ColorCode"); colorModeLayout->addWidget(colorMode0); colorModeLayout->addWidget(colorMode1); colorModeLayout->addWidget(colorMode2); colorModeLayout->addWidget(colorMode3); QButtonGroup *colorModeButtonGroup = new QButtonGroup(this); colorModeButtonGroup->addButton(colorMode0); colorModeButtonGroup->addButton(colorMode1); colorModeButtonGroup->addButton(colorMode2); colorModeButtonGroup->addButton(colorMode3); // Define a callback for these radio buttons connect(colorModeButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(adjustCriterion()) ); QHBoxLayout *hBox = new QHBoxLayout(hb4); hBox->addWidget(modeL); hBox->addWidget(colorMode); } // Create hboxlayouts that will fill the next row; these // are shown only when appropriate positionBox = new PositionBox(this); propertyBox = new PropertyBox(this); codeBox = new CodeBox(this); // Create a box that will fill the next row lineTypeBox = new LineTypeBox( this ); { hb5 = new DoneApplyCancelWidget(this); connect(hb5, SIGNAL(done()), this, SLOT(bdone()) ); connect(hb5, SIGNAL(applied()), this, SLOT(bapply()) ); connect(hb5, SIGNAL(canceled()), this, SLOT(bcancel())); } // Clear the board pointer spinBox = NULL; // Clear the color board pointer cb = NULL; // Clear internal variables colors = 1; colorPosX = colorPosY = 0; showColorBoard = false; spinRenderStyle = SLINE; renderQuality = LOW; // Set defaults lineTypeBox->setDisabled(true); // Set defaults appropriate for startup without data colorButton->setDisabled(true); sizeBox->setDisabled(true); modeL->setDisabled(true); colorMode->setDisabled(true); colorMode0->setChecked(true); // Build default layout this->buildLayout( TYPE ); }
bool MenusOptions::apply() { emit applied(); return true; }
void Preferences::apply() { applied(); settings().changed(); }
bool FileTransferOptions::apply() { emit applied(); return true; }
ConfigDialog::ConfigDialog(QWidget* parent) : QDialog(parent) { setupUi(this); _buttonBox->button(QDialogButtonBox::Apply)->setFocusPolicy(Qt::NoFocus); _buttonBox->button(QDialogButtonBox::Ok)->setFocusPolicy(Qt::NoFocus); _buttonBox->button(QDialogButtonBox::Cancel)->setFocusPolicy(Qt::NoFocus); connect(_buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SIGNAL(applied())); connect(_buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(ok())); connect(_buttonBox->button(QDialogButtonBox::Cancel), SIGNAL(clicked()), this, SLOT(hide())); _comboBoxVo->setSizeAdjustPolicy(QComboBox::AdjustToContents); _comboBoxVoClipping->setSizeAdjustPolicy(QComboBox::AdjustToContents); _comboBoxAo->setSizeAdjustPolicy(QComboBox::AdjustToContents); QString voToolTip = tr( "使用するビデオドライバになります。\n" "初期設定は「%1」になります。"); QString voNameDefault = ConfigData::VONAME_DEFAULT; if( voNameDefault.isEmpty() ) voNameDefault = tr("指定無し"); _comboBoxVo->setToolTip(voToolTip.arg(voNameDefault)); QString voClippingToolTip = tr( "クリッピング機能使用時に自動で切り替えるビデオドライバになります。\n" "クリッピングが正常に機能するかは、選択するビデオドライバに依存します。\n" "初期設定は「%1」になります。"); QString voNameForClippingDefault = ConfigData::VONAME_FOR_CLIPPING_DEFAULT; if( voNameForClippingDefault.isEmpty() ) voNameForClippingDefault = tr("指定無し"); _comboBoxVoClipping->setToolTip(voClippingToolTip.arg(voNameForClippingDefault)); QString aoToolTip = tr( "使用するオーディオドライバになります。\n" "初期設定は「%1」になります。"); QString aoNameDefault = ConfigData::AONAME_DEFAULT; if( aoNameDefault.isEmpty() ) aoNameDefault = tr("指定無し"); _comboBoxAo->setToolTip(aoToolTip.arg(aoNameDefault)); #ifdef Q_OS_LINUX #ifdef QT_NO_DEBUG_OUTPUT _checkBoxSoftVideoEq->setEnabled(false); #else connect(_checkBoxSoftVideoEq, SIGNAL(clicked(bool)), this, SLOT(checkBoxSoftVideoEq_clicked(bool))); #endif // QT_NO_DEBUG_OUTPUT #else _checkBoxSoftVideoEq->setEnabled(false); #endif // Q_OS_LINUX _groupBoxCacheSize->setFocusPolicy(Qt::NoFocus); // qtデザイナでは効果無し、ここで指定 connect(_groupBoxCacheSize, SIGNAL(toggled(bool)), // checkBoxを切り替えた時のspinBoxの選択状態を解除する this, SLOT(groupBoxCacheSize_toggled(bool))); _groupBoxScreenshotPath->setFocusPolicy(Qt::NoFocus); _groupBoxMplayerPath->setFocusPolicy(Qt::NoFocus); _groupBoxLimitLogLine->setFocusPolicy(Qt::NoFocus); connect(_groupBoxLimitLogLine, SIGNAL(toggled(bool)), this, SLOT(groupBoxLimitLogLine_toggled(bool))); _groupBoxContactUrlPath->setFocusPolicy(Qt::NoFocus); QPalette palette = _groupBoxCacheSize->palette(); QColor colorText = palette.color(QPalette::Text); palette.setColor(QPalette::Active, QPalette::Text, palette.color(QPalette::WindowText)); palette.setColor(QPalette::Inactive, QPalette::Text, palette.color(QPalette::WindowText)); _groupBoxCacheSize->setPalette(palette); _groupBoxScreenshotPath->setPalette(palette); _groupBoxMplayerPath->setPalette(palette); _groupBoxContactUrlPath->setPalette(palette); palette.setColor(QPalette::Active, QPalette::Text, colorText); palette.setColor(QPalette::Inactive, QPalette::Text, colorText); _spinBoxCacheStream->setPalette(palette); _lineEditScreenshotPath->setPalette(palette); _lineEditMplayerPath->setPalette(palette); _lineEditContactUrlPath->setPalette(palette); _lineEditContactUrlArg->setPalette(palette); connect(_buttonScreenshotPath, SIGNAL(clicked()), this, SLOT(setScreenshotPathFromDialog())); connect(_buttonMplayerPath, SIGNAL(clicked()), this, SLOT(setMplayerPathFromDialog())); connect(_buttonContactUrlPath, SIGNAL(clicked()), this, SLOT(setContactUrlPathFromDialog())); connect(_buttonContactUrlArg, SIGNAL(clicked()), this, SLOT(buttonContactUrlArg_clicked())); // コンタクトURLパス指定部のエディットボックスの幅設定 int w = _lineEditContactUrlArg->fontMetrics().width(ConfigData::CONTACTURL_ARG_DEFAULT) + 20; _lineEditContactUrlArg->setMinimumWidth(w); _lineEditContactUrlPath->setMinimumWidth(w); // コンタクトURLパス選択ボタン、引数ボタンの幅設定 w = _buttonContactUrlPath->fontMetrics().width(_buttonContactUrlPath->text()) + 14; if( w < 30 ) w = 30; if( w < _buttonContactUrlPath->sizeHint().width() ) _buttonContactUrlPath->setMaximumWidth(w); w = _buttonContactUrlArg->fontMetrics().width(_buttonContactUrlArg->text()) + 14; if( w < 30 ) w = 30; if( w < _buttonContactUrlArg->sizeHint().width() ) _buttonContactUrlArg->setMaximumWidth(w); resize(10,10); }
bool CListOptions::apply() { current_settings.hide_offline = ui.chkHideOffline->isChecked(); current_settings.hide_empty_groups = ui.chkHideEmptyGroups->isChecked(); emit applied(); return true; }
void PreferencesDialog::apply() { setResult( QDialog::Accepted ); emit applied(); }