2929#include < QList>
3030#include < QSettings>
3131#include " gui/settings/settings_items/settings_item.h"
32+ #include " gui/content_anchor/content_anchor.h"
3233#include " gui/logger/logger_settings.h"
3334#include < QPoint>
3435#include < QSize>
36+ #include < QSplitter>
3537
3638namespace hal
3739{
40+ class ContentWidget ;
41+ struct ContentWidgetPlacement ;
42+
3843 /* *
3944 * @ingroup settings
4045 * @brief Manages and persists the settings on the lowest level.
@@ -91,6 +96,28 @@ namespace hal
9196 */
9297 void mainWindowSaveGeometry (const QPoint& pos, const QSize& size);
9398
99+ /* *
100+ * Write widgets location and geometry to the user settings file.
101+ * @param anchor - One of L(eft), R(ight), B(ottom), T(ab)
102+ * @param widgets - List of widgets in that anchor
103+ */
104+ void widgetsSaveGeometry (ContentLayout::Position anchorPos, QList<const ContentWidget*>& widgets);
105+
106+ /* *
107+ * Returns placement object for widget if info found in setting file.
108+ * The index -1 indicates that the info was not found.
109+ *
110+ * @param cw - Pointer to ContentWidget
111+ * @return Placement structure
112+ */
113+ ContentWidgetPlacement widgetPlacement (ContentWidget* cw) const ;
114+
115+ /* *
116+ * Detach widget and place at screen position if info is given in setting file.
117+ * @param cw - Pointer to ContentWidget
118+ */
119+ void widgetDetach (ContentWidget* cw) const ;
120+
94121 /* *
95122 * Get the value in the user settings file for a given key.
96123 *
@@ -107,6 +134,19 @@ namespace hal
107134 */
108135 QVariant defaultValue (const QString& tag) const ;
109136
137+ /* *
138+ * Save state of splitter in setting file
139+ * @param tag - tag to save parameter
140+ * @param splitter - save settings for this splitter
141+ */
142+ void saveSplitterState (const QString& tag, const QSplitter* splitter);
143+
144+ /* *
145+ * Restore state of splitter from setting file
146+ * @param tag - tag for which the splitter gets restored
147+ * @param splitter - the splitter to be restored
148+ */
149+ void restoreSplitterState (const QString& tag, QSplitter *splitter) const ;
110150
111151 LoggerSettings loggerSettings () const ;
112152
0 commit comments