]> git.sur5r.net Git - bacula/bacula/commitdiff
dhb Add button on toolbar to pull window out.
authorDirk H Bartley <dbartley@schupan.com>
Mon, 26 Mar 2007 01:56:41 +0000 (01:56 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Mon, 26 Mar 2007 01:56:41 +0000 (01:56 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4422 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/main.ui
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/mainwin.h

index 8f0ccded8bacd92752c46fca6fa95070c3ab8bb9..46be6b9a1822b10763a52dbf9ac14637e74c1736 100644 (file)
@@ -71,7 +71,7 @@
      <x>0</x>
      <y>0</y>
      <width>882</width>
-     <height>24</height>
+     <height>28</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuHelp" >
   <widget class="QToolBar" name="toolBar" >
    <property name="minimumSize" >
     <size>
-     <width>50</width>
-     <height>38</height>
+     <width>51</width>
+     <height>39</height>
     </size>
    </property>
    <property name="toolTip" >
    <addaction name="actionLabel" />
    <addaction name="actionRestore" />
    <addaction name="actionRun" />
+   <addaction name="actionPullWindowOut" />
   </widget>
   <widget class="QDockWidget" name="dockWidget" >
    <property name="sizePolicy" >
     <string>&amp;Select Font ...</string>
    </property>
   </action>
+  <action name="actionPullWindowOut" >
+   <property name="icon" >
+    <iconset>images/up.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Pull Window Out</string>
+   </property>
+  </action>
  </widget>
  <resources>
   <include location="main.qrc" />
index 9722cc69a6abf85fd21625e51fac84db915100e1..f321f6ea84bec70aad2014eb27abd84e1886132b 100644 (file)
@@ -184,6 +184,7 @@ void MainWin::createConnections()
    connect(actionLabel, SIGNAL(triggered()), this,  SLOT(labelDialogClicked()));
    connect(actionRun, SIGNAL(triggered()), this,  SLOT(runDialogClicked()));
    connect(actionRestore, SIGNAL(triggered()), this,  SLOT(restoreDialogClicked()));
+   connect(actionPullWindowOut, SIGNAL(triggered()), this,  SLOT(pullWindowOutButton()));
 }
 
 /* 
@@ -329,3 +330,18 @@ void MainWin::pullWindowOut()
 {
    m_bstackpophold->Togglestack();
 }
+
+void MainWin::pullWindowOutButton()
+{
+   int curindex = stackedWidget->currentIndex();
+   QList<BatStack*>::iterator bstackItem;
+   bstackItem = m_bstacklist.begin();
+   bool done=false;
+   while ( (bstackItem != m_bstacklist.end()) && not(done) ){
+      if ( curindex == stackedWidget->indexOf( *bstackItem ) ){
+        (*bstackItem)->Togglestack();
+        done=true;
+      }
+      ++bstackItem;
+   }
+}
index 72f0744312780f00315d6a938b5da2ffeb44c5df..13ee72acdc30edcc30a4c5488b1cd83c6c87a78f 100644 (file)
@@ -70,6 +70,7 @@ public slots:
    void runDialogClicked();
    void restoreDialogClicked();
    void pullWindowOut();
+   void pullWindowOutButton();
 
 protected:
    void closeEvent(QCloseEvent *event);