Ejemplo n.º 1
0
void LanguageSettings::prompt(bool force)
{
    d.Init();
    // Ask for language if we don't already know.
    if (force || d.m_language.isEmpty())
    {
        ConfigurationDialog langEdit;
        langEdit.addChild(new LangEditorSetting());
        langEdit.exec();
    }
    // Always update the database, even if there's
    // no change -- during bootstrapping, we don't
    // actually get to write to the database until
    // a later run, so do it every time.
    gContext->SaveSetting("Language", d.m_language);
}
Ejemplo n.º 2
0
void ConfigDialogManager::run()
{
    ConfigurationDialog config;

    for(auto& tab: m_tabs)
    {
        IConfigTab* confTab = tab.second;

        QWidget* w = confTab->constructTab();
        const QString name = confTab->tabName();

        config.addTab(name, w);
    }

    connect(&config, &ConfigurationDialog::saveData, this, &ConfigDialogManager::applyConfiguration);

    config.exec();
}
Ejemplo n.º 3
0
void ConfigurationPanel::edit()
{
    const QString key = ui->configurations->currentText();
    ConfigurationDialog dialog;
    dialog.setWindowTitle(tr("Edit Configuration"));
    dialog.setSettings(m_settings);
    dialog.setKey(key);
    if (dialog.exec() == QDialog::Accepted) {
        const QString newKey = dialog.key();
        if (newKey == key) {
            m_settings->setStyle(key, dialog.value());
        } else {
            m_settings->replaceStyle(key, newKey, dialog.value());
            ui->configurations->setItemText(ui->configurations->currentIndex(), newKey);
        }
    }
}
Ejemplo n.º 4
0
void ConfigurationPanel::add()
{
    ConfigurationDialog dialog;
    dialog.setWindowTitle(tr("Add Configuration"));
    dialog.setSettings(m_settings);
    if (dialog.exec() == QDialog::Accepted) {
        const QString key = dialog.key();
        m_settings->setStyle(key, dialog.value());
        populateConfigurations(key);
    }
}
Ejemplo n.º 5
0
void Plugin::configure()
{
	ConfigurationDialog* dialog = new ConfigurationDialog(this);
	g_signal_connect_slot<GtkObject*>(dialog->get_widget(), "destroy", &Plugin::save, this);
}
void HoIModDesigner::OpenConfigurationDialog()
{
	ConfigurationDialog dialog;
	dialog.exec();
}
Ejemplo n.º 7
0
void MainWindow::getConfiguration()
{
    ConfigurationDialog dialog;
    dialog.getConfiguration();
}