Commit bbbd3353 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.settings: new setting for pinning

parent 1e3bd18b
......@@ -52,8 +52,9 @@ void DesignerSettings::fromSettings(QSettings *settings)
snapMargin = settings->value(
QLatin1String(QmlDesigner::Constants::QML_SNAPMARGIN_KEY), QVariant(0)).toInt();
enableContextPane = settings->value(
QLatin1String(QmlDesigner::Constants::QML_CONTEXTPANE_KEY), QVariant(1)).toBool();
QLatin1String(QmlDesigner::Constants::QML_CONTEXTPANE_KEY), QVariant(1)).toBool();
pinContextPane = settings->value(
QLatin1String(QmlDesigner::Constants::QML_CONTEXTPANEPIN_KEY), QVariant(0)).toBool();
settings->endGroup();
settings->endGroup();
}
......@@ -66,6 +67,7 @@ void DesignerSettings::toSettings(QSettings *settings) const
settings->setValue(QLatin1String(QmlDesigner::Constants::QML_ITEMSPACING_KEY), itemSpacing);
settings->setValue(QLatin1String(QmlDesigner::Constants::QML_SNAPMARGIN_KEY), snapMargin);
settings->setValue(QLatin1String(QmlDesigner::Constants::QML_CONTEXTPANE_KEY), enableContextPane);
settings->setValue(QLatin1String(QmlDesigner::Constants::QML_CONTEXTPANEPIN_KEY), pinContextPane);
settings->endGroup();
settings->endGroup();
......@@ -76,6 +78,6 @@ bool DesignerSettings::equals(const DesignerSettings &other) const
return openDesignMode == other.openDesignMode
&& snapMargin == other.snapMargin
&& itemSpacing == other.itemSpacing
&& enableContextPane == other.enableContextPane;
&& enableContextPane == other.enableContextPane
&& pinContextPane == other.pinContextPane;
}
......@@ -51,6 +51,7 @@ public:
int itemSpacing;
int snapMargin;
bool enableContextPane;
bool pinContextPane;
};
inline bool operator==(const DesignerSettings &s1, const DesignerSettings &s2)
......
......@@ -62,6 +62,7 @@ const char * const QML_OPENDESIGNMODE_SETTINGS_KEY = "OpenDesignMode";
const char * const QML_ITEMSPACING_KEY = "ItemSpacing";
const char * const QML_SNAPMARGIN_KEY = "SnapMargin";
const char * const QML_CONTEXTPANE_KEY = "ContextPaneEnabled";
const char * const QML_CONTEXTPANEPIN_KEY = "ContextPanePinned";
enum { QML_OPENDESIGNMODE_DEFAULT = 0 }; // 0 for text mode, 1 for design mode
const char * const SETTINGS_CATEGORY_QML_ICON = ":/core/images/category_qml.png";
......
......@@ -107,7 +107,17 @@
<item>
<widget class="QCheckBox" name="textEditHelperCheckBox">
<property name="text">
<string>Text Quick Toolbar</string>
<string>Enable Quick Toolbar</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="textEditHelperCheckBoxPin">
<property name="toolTip">
<string>If enabled the toolbar will remain pinned to an absolute position.</string>
</property>
<property name="text">
<string>Pin Quick Toolbar</string>
</property>
</widget>
</item>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment