void QDesignerSettings::setToolWindowFont(const ToolWindowFontSettings &fontSettings) { QDesignerSettingsInterface *s = settings(); s->beginGroup(QLatin1String("UI")); s->setValue(QLatin1String("font"), fontSettings.m_font); s->setValue(QLatin1String("useFont"), fontSettings.m_useFont); s->setValue(QLatin1String("writingSystem"), fontSettings.m_writingSystem); s->endGroup(); }
void QDesignerSettings::saveGeometryFor(const QWidget *w) { Q_ASSERT(w && !w->objectName().isEmpty()); QDesignerSettingsInterface *s = settings(); const bool visible = w->isVisible(); if (debugSettings) qDebug() << Q_FUNC_INFO << w << "visible=" << visible; s->beginGroup(w->objectName()); s->setValue(QLatin1String("visible"), visible); s->setValue(QLatin1String("geometry"), w->saveGeometry()); s->endGroup(); }
void WidgetBoxTreeWidget::saveExpandedState() const { QStringList closedCategories; if (const int numCategories = categoryCount()) { for (int i = 0; i < numCategories; ++i) { const QTreeWidgetItem *cat_item = topLevelItem(i); if (!isItemExpanded(cat_item)) closedCategories.append(cat_item->text(0)); } } QDesignerSettingsInterface *settings = m_core->settingsManager(); settings->beginGroup(QLatin1String(widgetBoxRootElementC)); settings->setValue(QLatin1String("Closed categories"), closedCategories); settings->setValue(QLatin1String("View mode"), m_iconMode); settings->endGroup(); }
void QDesignerSettings::setUiMode(UIMode mode) { QDesignerSettingsInterface *s = settings(); s->beginGroup(QLatin1String("UI")); s->setValue(QLatin1String("currentMode"), mode); s->endGroup(); }
StyleSheetEditorDialog::~StyleSheetEditorDialog() { QDesignerSettingsInterface *settings = m_core->settingsManager(); settings->beginGroup(QLatin1String(StyleSheetDialogC)); settings->setValue(QLatin1String(Geometry), saveGeometry()); settings->endGroup(); }
void QDesignerSettings::setBackup(const QMap<QString, QString> &map) { const QStringList org = map.keys(); const QStringList bak = map.values(); QDesignerSettingsInterface *s = settings(); s->setValue(QLatin1String(backupOrgListKey), org); s->setValue(QLatin1String(backupBakListKey), bak); }
void PropertyEditor::saveSettings() const { QDesignerSettingsInterface *settings = m_core->settingsManager(); settings->beginGroup(QLatin1String(SettingsGroupC)); #if QT_VERSION >= 0x040500 settings->setValue(QLatin1String(ViewKeyC), QVariant(m_treeAction->isChecked() ? TreeView : ButtonView)); #endif settings->setValue(QLatin1String(ColorKeyC), QVariant(m_coloring)); settings->setValue(QLatin1String(SortedKeyC), QVariant(m_sorting)); // Save last expansionState as QVariant map QVariantMap expansionState; if (!m_expansionState.empty()) { const QMap<QString, bool>::const_iterator cend = m_expansionState.constEnd(); for (QMap<QString, bool>::const_iterator it = m_expansionState.constBegin(); it != cend; ++it) expansionState.insert(it.key(), QVariant(it.value())); } settings->setValue(QLatin1String(ExpansionKeyC), expansionState); settings->endGroup(); }
void QtResourceViewPrivate::saveSettings() { if (m_settingsKey.isEmpty()) return; QDesignerSettingsInterface *settings = m_core->settingsManager(); settings->beginGroup(m_settingsKey); settings->setValue(QLatin1String(SplitterPosition), m_splitter->saveState()); settings->endGroup(); }