本文整理汇总了C++中QDesignerSettingsInterface::setValue方法的典型用法代码示例。如果您正苦于以下问题:C++ QDesignerSettingsInterface::setValue方法的具体用法?C++ QDesignerSettingsInterface::setValue怎么用?C++ QDesignerSettingsInterface::setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QDesignerSettingsInterface
的用法示例。
在下文中一共展示了QDesignerSettingsInterface::setValue方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setToolWindowFont
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();
}
示例2: saveGeometryFor
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();
}
示例3: saveExpandedState
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();
}
示例4: setUiMode
void QDesignerSettings::setUiMode(UIMode mode)
{
QDesignerSettingsInterface *s = settings();
s->beginGroup(QLatin1String("UI"));
s->setValue(QLatin1String("currentMode"), mode);
s->endGroup();
}
示例5: saveGeometry
StyleSheetEditorDialog::~StyleSheetEditorDialog()
{
QDesignerSettingsInterface *settings = m_core->settingsManager();
settings->beginGroup(QLatin1String(StyleSheetDialogC));
settings->setValue(QLatin1String(Geometry), saveGeometry());
settings->endGroup();
}
示例6: setBackup
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);
}
示例7: saveSettings
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();
}
示例8: saveSettings
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();
}