[Openvas-commits] r9286 - in trunk/gsd: . src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Oct 26 17:13:30 CEST 2010
Author: raimund
Date: 2010-10-26 17:13:29 +0200 (Tue, 26 Oct 2010)
New Revision: 9286
Modified:
trunk/gsd/ChangeLog
trunk/gsd/src/gsd_mainwindow.ui
trunk/gsd/src/gsd_mw.cpp
trunk/gsd/src/gsd_mw.h
Log:
Added function to clear dock widget settings.
* src/gsd_mw.cpp (createConnections): Signal/slot configuration for resetting
dock widget positions.
(clear_dock_widget_settings): New.
* src/gsd_mw.h: Updated prototypes.
* src/gsd_mainwindow.ui: Added menu button.
Modified: trunk/gsd/ChangeLog
===================================================================
--- trunk/gsd/ChangeLog 2010-10-26 14:26:29 UTC (rev 9285)
+++ trunk/gsd/ChangeLog 2010-10-26 15:13:29 UTC (rev 9286)
@@ -1,5 +1,17 @@
2010-10-26 Raimund Renkert <raimund.renkert at greenbone.net>
+ Added function to clear dock widget settings.
+
+ * src/gsd_mw.cpp (createConnections): Signal/slot configuration for resetting
+ dock widget positions.
+ (clear_dock_widget_settings): New.
+
+ * src/gsd_mw.h: Updated prototypes.
+
+ * src/gsd_mainwindow.ui: Added menu button.
+
+2010-10-26 Raimund Renkert <raimund.renkert at greenbone.net>
+
* src/dock_reports.cpp (update): Change threat count to filtered count.
2010-10-26 Raimund Renkert <raimund.renkert at greenbone.net>
Modified: trunk/gsd/src/gsd_mainwindow.ui
===================================================================
--- trunk/gsd/src/gsd_mainwindow.ui 2010-10-26 14:26:29 UTC (rev 9285)
+++ trunk/gsd/src/gsd_mainwindow.ui 2010-10-26 15:13:29 UTC (rev 9286)
@@ -153,6 +153,7 @@
<string>Settings</string>
</property>
<addaction name="actionRefresh_settings" />
+ <addaction name="actionClear_Dock_Settings" />
</widget>
<widget class="QMenu" name="menuView" >
<property name="title" >
@@ -711,6 +712,11 @@
<string>Result</string>
</property>
</action>
+ <action name="actionClear_Dock_Settings" >
+ <property name="text" >
+ <string>Clear Dock Settings</string>
+ </property>
+ </action>
</widget>
<resources>
<include location="img/images.qrc" />
Modified: trunk/gsd/src/gsd_mw.cpp
===================================================================
--- trunk/gsd/src/gsd_mw.cpp 2010-10-26 14:26:29 UTC (rev 9285)
+++ trunk/gsd/src/gsd_mw.cpp 2010-10-26 15:13:29 UTC (rev 9286)
@@ -833,6 +833,10 @@
SIGNAL (triggered (bool)),
this,
SLOT (config_download ()));
+ connect (actionClear_Dock_Settings,
+ SIGNAL (triggered (bool)),
+ this,
+ SLOT (clear_dock_widget_settings ()));
}
@@ -3584,3 +3588,35 @@
}
}
+
+/**
+ * @brief Clears setting for dock widgets.
+ */
+void
+gsd_mw::clear_dock_widget_settings ()
+{
+ foreach (dock_details *widget, details_widgets)
+ {
+ if (widget->isVisible () &&
+ this->dockWidgetArea (widget) != Qt::BottomDockWidgetArea)
+ {
+ bool found = false;
+ QMapIterator <QString, dock_details*> i (details_widgets);
+ while (i.hasNext ())
+ {
+ i.next ();
+ int usedArea = this->dockWidgetArea (i.value ());
+ if (usedArea == Qt::BottomDockWidgetArea &&
+ i.value ()->isVisible ())
+ {
+ this->tabifyDockWidget (i.value (), widget);
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ this->addDockWidget (Qt::BottomDockWidgetArea, widget);
+ }
+ }
+}
+
Modified: trunk/gsd/src/gsd_mw.h
===================================================================
--- trunk/gsd/src/gsd_mw.h 2010-10-26 14:26:29 UTC (rev 9285)
+++ trunk/gsd/src/gsd_mw.h 2010-10-26 15:13:29 UTC (rev 9286)
@@ -231,6 +231,7 @@
const QItemSelection &desel);
void write_settings ();
void read_settings ();
+ void clear_dock_widget_settings ();
protected:
void closeEvent (QCloseEvent *event);
More information about the Openvas-commits
mailing list