changeset 14239:7ecaa8a66d5a gui

GUI: Removed stylesheets from dock widgets and add missing slots.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Sat, 21 Jan 2012 10:40:19 +0100
parents 8b7a98f12c9b
children a9992bc3c3f7
files gui/src/FilesDockWidget.cpp gui/src/HistoryDockWidget.cpp gui/src/HistoryDockWidget.h gui/src/WorkspaceView.cpp gui/src/WorkspaceView.h
diffstat 5 files changed, 38 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/gui/src/FilesDockWidget.cpp	Thu Dec 22 10:33:12 2011 +0100
+++ b/gui/src/FilesDockWidget.cpp	Sat Jan 21 10:40:19 2012 +0100
@@ -98,18 +98,10 @@
     completer = new QCompleter (m_fileSystemModel, this);
   m_currentDirectory->setCompleter (completer);
 
-  connect (this, SIGNAL (visibilityChanged(bool)), this, SLOT(handleVisibilityChanged(bool)));
-
-  setStyleSheet(
-      " QDockWidget { "
-      "   border:1px solid rgba(200, 200, 200, 255); "
-      "   background-color: qlineargradient(spread:pad, "
-      "   x1:0.1, y1:0, x2:0.9, y2:1, "
-      "   stop:0.256444 rgba(215, 215, 255, 255), "
-      "   stop:0.550888 rgba(255, 255, 255, 255), "
-      "   stop:0.780424 rgba(215, 215, 255, 255)); "
-      " } "
-      );
+  connect (this,
+           SIGNAL (visibilityChanged(bool)),
+           this,
+           SLOT(handleVisibilityChanged(bool)));
 }
 
 void
--- a/gui/src/HistoryDockWidget.cpp	Thu Dec 22 10:33:12 2011 +0100
+++ b/gui/src/HistoryDockWidget.cpp	Sat Jan 21 10:40:19 2012 +0100
@@ -46,20 +46,20 @@
 
   widget ()->setLayout (layout);
 
-  connect (m_filterLineEdit, SIGNAL (textEdited (QString)), &m_sortFilterProxyModel, SLOT (setFilterWildcard(QString)));
-  connect (m_historyListView, SIGNAL (doubleClicked (QModelIndex)), this, SLOT (handleDoubleClick (QModelIndex)));
-  connect (this, SIGNAL (visibilityChanged(bool)), this, SLOT(handleVisibilityChanged(bool)));
+  connect (m_filterLineEdit,
+           SIGNAL (textEdited (QString)),
+           &m_sortFilterProxyModel,
+           SLOT (setFilterWildcard(QString)));
 
-  setStyleSheet(
-      " QDockWidget { "
-      "   border:1px solid rgba(200, 200, 200, 255); "
-      "   background-color: qlineargradient(spread:pad, "
-      "   x1:0.1, y1:0, x2:0.9, y2:1, "
-      "   stop:0.256444 rgba(215, 255, 215, 255), "
-      "   stop:0.550888 rgba(255, 255, 255, 255), "
-      "   stop:0.780424 rgba(215, 255, 215, 255)); "
-      " } "
-      );
+  connect (m_historyListView,
+           SIGNAL (doubleClicked (QModelIndex)),
+           this,
+           SLOT (handleDoubleClick (QModelIndex)));
+
+  connect (this,
+           SIGNAL (visibilityChanged(bool)),
+           this,
+           SLOT(handleVisibilityChanged(bool)));
 }
 
 void
@@ -76,6 +76,12 @@
 }
 
 void
+HistoryDockWidget::noticeSettings ()
+{
+    // TODO: React on a settings change.
+}
+
+void
 HistoryDockWidget::closeEvent (QCloseEvent *event)
 {
   emit activeChanged (false);
--- a/gui/src/HistoryDockWidget.h	Thu Dec 22 10:33:12 2011 +0100
+++ b/gui/src/HistoryDockWidget.h	Sat Jan 21 10:40:19 2012 +0100
@@ -33,6 +33,7 @@
 
 public slots:
   void handleVisibilityChanged (bool visible);
+  void noticeSettings ();
 
 signals:
   void information (QString message);
--- a/gui/src/WorkspaceView.cpp	Thu Dec 22 10:33:12 2011 +0100
+++ b/gui/src/WorkspaceView.cpp	Sat Jan 21 10:40:19 2012 +0100
@@ -59,20 +59,21 @@
   m_variablesTreeWidget->setAlternatingRowColors (true);
   m_variablesTreeWidget->setAnimated (true);
 
-  connect (this, SIGNAL (visibilityChanged(bool)), this, SLOT(handleVisibilityChanged(bool)));
+  connect (this,
+           SIGNAL (visibilityChanged(bool)),
+           this,
+           SLOT(handleVisibilityChanged(bool)));
 
-  setStyleSheet(
-      " QDockWidget { "
-      "   border:1px solid rgba(200, 200, 200, 255); "
-      "   background-color: qlineargradient(spread:pad, "
-      "   x1:0.1, y1:0, x2:0.9, y2:1, "
-      "   stop:0.256444 rgba(255, 215, 215, 255), "
-      "   stop:0.550888 rgba(255, 255, 255, 255), "
-      "   stop:0.780424 rgba(255, 215, 215, 255)); "
-      " } "
-      );
+  connect (OctaveLink::instance(),
+           SIGNAL (symbolTableChanged()),
+           this,
+           SLOT (fetchSymbolTable()));
+}
 
-  connect (OctaveLink::instance(), SIGNAL (symbolTableChanged()), this, SLOT (fetchSymbolTable()));
+void
+WorkspaceView::noticeSettings ()
+{
+    // TODO: React on a settings change.
 }
 
 void
--- a/gui/src/WorkspaceView.h	Thu Dec 22 10:33:12 2011 +0100
+++ b/gui/src/WorkspaceView.h	Sat Jan 21 10:40:19 2012 +0100
@@ -32,6 +32,7 @@
 public slots:
   void fetchSymbolTable ();
   void handleVisibilityChanged (bool visible);
+  void noticeSettings ();
 
 signals:
   /** Custom signal that tells if a user has clicke away that dock widget. */