void SpellChecker::mainConfigurationWindowCreated(MainConfigurationWindow *mainConfigurationWindow) { connect(mainConfigurationWindow, SIGNAL(configurationWindowApplied()), this, SLOT(configurationWindowApplied())); ConfigGroupBox *optionsGroupBox = mainConfigurationWindow->widget()->configGroupBox("Chat", "SpellChecker", tr("ASpell options")); QWidget *options = new QWidget(optionsGroupBox->widget()); QGridLayout *optionsLayout = new QGridLayout(options); availList = new QListWidget(options); QPushButton *moveToCheckList = new QPushButton(tr("Move to 'Checked'"), options); optionsLayout->addWidget(new QLabel(tr("Available languages"), options), 0, 0); optionsLayout->addWidget(availList, 1, 0); optionsLayout->addWidget(moveToCheckList, 2, 0); checkList = new QListWidget(options); QPushButton *moveToAvailList = new QPushButton(tr("Move to 'Available languages'"), options); optionsLayout->addWidget(new QLabel(tr("Checked"), options), 0, 1); optionsLayout->addWidget(checkList, 1, 1); optionsLayout->addWidget(moveToAvailList, 2, 1); connect(moveToCheckList, SIGNAL(clicked()), this, SLOT(configForward())); connect(moveToAvailList, SIGNAL(clicked()), this, SLOT(configBackward())); connect(checkList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(configBackward2(QListWidgetItem *))); connect(availList, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(configForward2(QListWidgetItem*))); optionsGroupBox->addWidgets(0, options); availList->setSelectionMode(QAbstractItemView::SingleSelection); checkList->setSelectionMode(QAbstractItemView::SingleSelection); availList->addItems(notCheckedLanguages()); checkList->addItems(checkedLanguages()); }
BuddyListBackgroundColorsWidget::BuddyListBackgroundColorsWidget(MainConfigurationWindow* mainWindow) { createGui(mainWindow); loadConfiguration(); connect(mainWindow, SIGNAL(configurationWindowApplied()), this, SLOT(configurationApplied())); }
void ConfigurationWindow::updateConfig() { emit configurationWindowApplied(); configurationWidget->saveConfiguration(); emit configurationSaved(); ConfigurationAwareObject::notifyAll(); m_configurationManager->flush(); }
void AntistringConfigurationUiHandler::mainConfigurationWindowCreated(MainConfigurationWindow *mainConfigurationWindow) { ConfigGroupBox *groupBox = mainConfigurationWindow->widget()->configGroupBox("Chat", "Antistring", "Conditions"); QWidget *widget = new QWidget(groupBox->widget()); widget->setContentsMargins(0, 0, 0, 0); QGridLayout *layout = new QGridLayout(widget); ConditionListWidget = new QListWidget(widget); layout->addWidget(ConditionListWidget, 0, 0, 1, 4); ConditionWidget = new QLineEdit(widget); layout->addWidget(new QLabel(tr("Condition"), widget), 1, 0); layout->addWidget(ConditionWidget, 1, 1, 1, 3); FactorWidget = new QSpinBox(widget); FactorWidget->setMinimum(0); FactorWidget->setMaximum(5); FactorWidget->setSpecialValueText(tr("Don't use")); layout->addWidget(new QLabel(tr("Factor"), widget), 2, 0); layout->addWidget(FactorWidget, 2, 1, 1, 3); QPushButton *addConditionButton = new QPushButton(tr("Add"), widget); QPushButton *changeConditionButton = new QPushButton(tr("Change"), widget); QPushButton *deleteConditionButton = new QPushButton(tr("Delete"), widget); layout->addWidget(addConditionButton, 3, 1); layout->addWidget(changeConditionButton, 3, 2); layout->addWidget(deleteConditionButton, 3, 3); groupBox->addWidget(widget); connect(ConditionListWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(wordSelected(QListWidgetItem *))); connect(addConditionButton, SIGNAL(clicked()), this, SLOT(addCondition())); connect(changeConditionButton, SIGNAL(clicked()), this, SLOT(changeCondition())); connect(deleteConditionButton, SIGNAL(clicked()), this, SLOT(deleteCondition())); updateConditionList(); connect(mainConfigurationWindow, SIGNAL(configurationWindowApplied()), this, SLOT(applyConfiguration())); }
void MPRISPlayerConfigurationUiHandler::mainConfigurationWindowCreated(MainConfigurationWindow *mainConfigurationWindow) { ConfigGroupBox *optionsGroupBox = mainConfigurationWindow->widget()->configGroupBox("MediaPlayer", "General", "MPRIS Player"); QWidget *options = new QWidget(optionsGroupBox->widget()); QGridLayout *selectionLayout = new QGridLayout(options); QGridLayout *buttonsLayout = new QGridLayout(); QLabel *label = new QLabel(tr("Select Player:"), options); PlayersBox = new QComboBox(options); QPushButton *add = new QPushButton(tr("Add Player"), options); QPushButton *edit = new QPushButton(tr("Edit Player"), options); QPushButton *del = new QPushButton(tr("Delete Player"), options); selectionLayout->addWidget(label, 0, 0); selectionLayout->addWidget(PlayersBox, 0, 1, 1, 5); buttonsLayout->addWidget(add, 0, 0); buttonsLayout->addWidget(edit, 0, 1); buttonsLayout->addWidget(del, 0, 2); selectionLayout->addLayout(buttonsLayout, 1, 0, 1, 6); optionsGroupBox->addWidgets(0, options); loadPlayersListFromFile(); fillPlayersBox(); PlayersBox->setCurrentIndex( PlayersBox->findText(m_configuration->deprecatedApi()->readEntry("MPRISPlayer", "Player"))); connect(add, SIGNAL(clicked()), this, SLOT(addPlayer())); connect(edit, SIGNAL(clicked()), this, SLOT(editPlayer())); connect(del, SIGNAL(clicked()), this, SLOT(delPlayer())); connect(mainConfigurationWindow, SIGNAL(configurationWindowApplied()), this, SLOT(configurationApplied())); }
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(); }