]> git.sur5r.net Git - bacula/bacula/commitdiff
This is committing most of the patch received from Eric.
authorDirk H Bartley <dbartley@schupan.com>
Tue, 21 Jul 2009 23:22:34 +0000 (23:22 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Tue, 21 Jul 2009 23:22:34 +0000 (23:22 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9080 91ce42f0-d328-0410-95d8-f526ca767f89

19 files changed:
bacula/src/qt-console/clients/clients.cpp
bacula/src/qt-console/clients/clients.ui
bacula/src/qt-console/console/console.cpp
bacula/src/qt-console/console/console.h
bacula/src/qt-console/fileset/fileset.cpp
bacula/src/qt-console/joblist/joblist.cpp
bacula/src/qt-console/joblist/joblist.h
bacula/src/qt-console/joblist/joblist.ui
bacula/src/qt-console/jobs/jobs.cpp
bacula/src/qt-console/main.ui
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/medialist/medialist.cpp
bacula/src/qt-console/pages.cpp
bacula/src/qt-console/pages.h
bacula/src/qt-console/status/clientstat.cpp
bacula/src/qt-console/status/clientstat.ui
bacula/src/qt-console/status/dirstat.cpp
bacula/src/qt-console/status/storstat.cpp
bacula/src/qt-console/storage/storage.cpp

index df56522fb25dc65fb8437f771f6d0df863293d81..2c39953d2425dc5ee6a16b75453a7753d2a0098a 100644 (file)
@@ -60,7 +60,6 @@ Clients::Clients()
     * selector tree. m_contextActions is QList of QActions */
    m_contextActions.append(actionRefreshClients);
    createContextMenu();
-   dockPage();
 }
 
 Clients::~Clients()
@@ -191,6 +190,7 @@ void Clients::PgSeltreeWidgetClicked()
    if(!m_populated) {
       populateTable();
    }
+   dockPage();
 }
 
 /*
index c62149b84ebae24074c607730a5025a5e3f0f607..b6fd03a59fd4c765d0371cb99e2dd469a43b3f95 100644 (file)
@@ -71,7 +71,7 @@
      <normaloff>:/images/status.png</normaloff>:/images/status.png</iconset>
    </property>
    <property name="text" >
-    <string>Status Client Window</string>
+    <string>Status Client</string>
    </property>
   </action>
  </widget>
index 4285dec11134e61c2ff80244adbd351e1cb2b01d..4201d61ce2c809c224924566a240cdfa61fba290 100644 (file)
 #include "select.h"
 #include "run/run.h"
 
-Console::Console(QStackedWidget *parent)
+Console::Console(QTabWidget *parent)
 {
    QFont font;
+   m_name = tr("Console");
    m_messages_pending = false;
    m_parent = parent;
    m_closeable = false;
@@ -723,7 +724,7 @@ void Console::consoleReload()
  * This may be rendered not needed if the multiple connections feature gets working */
 bool Console::hasFocus()
 {
-   if (mainWin->stackedWidget->currentIndex() == mainWin->stackedWidget->indexOf(this))
+   if (mainWin->tabWidget->currentIndex() == mainWin->tabWidget->indexOf(this))
       return true;
    else
       return false;
index ab07401b24e02cd8cfb409f907ae099d47c44191..d408bba0a86239774c23472b469af3a5407484fb 100644 (file)
@@ -70,7 +70,7 @@ class Console : public Pages, public Ui::ConsoleForm
    friend class DirComm;
 
 public:
-   Console(QStackedWidget *parent);
+   Console(QTabWidget *parent);
    ~Console();
    int read(int conn);
    char *msg(int conn);
index eb211578543722d58e456504c96256a527c0371f..da3948ad14e57fc0ea24a130d79b8c47ce29aeee 100644 (file)
@@ -57,7 +57,6 @@ FileSet::FileSet()
    /* add context sensitive menu items specific to this classto the page
     * selector tree. m_contextActions is QList of QActions */
    m_contextActions.append(actionRefreshFileSet);
-   dockPage();
 }
 
 FileSet::~FileSet()
@@ -184,6 +183,7 @@ void FileSet::PgSeltreeWidgetClicked()
       populateTable();
       createContextMenu();
    }
+   dockPage();
 }
 
 /*
index 2650789048c3d8d9d39045acd7be209c4ec2adab..27cc84085987229178eca42a8dc536859ece3d9b 100644 (file)
@@ -73,7 +73,6 @@ JobList::JobList(const QString &mediaName, const QString &clientName,
    limitSpinBox->setValue(mainWin->m_recordLimitVal);
    daysCheckBox->setCheckState(mainWin->m_daysLimitCheck ? Qt::Checked : Qt::Unchecked);
    daysSpinBox->setValue(mainWin->m_daysLimitVal);
-   dockPage();
 
    QGridLayout *gridLayout = new QGridLayout(this);
    gridLayout->setSpacing(6);
@@ -349,6 +348,7 @@ void JobList::PgSeltreeWidgetClicked()
    if (!m_populated) {
       populateTable();
    }
+   dockPage();
 }
 
 /*
@@ -405,8 +405,6 @@ void JobList::createConnections()
    /* setContextMenuPolicy is required */
    mp_tableWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
 
-   connect(actionListJobid, SIGNAL(triggered()), this,
-                SLOT(consoleListJobid()));
    connect(actionListFilesOnJob, SIGNAL(triggered()), this,
                 SLOT(consoleListFilesOnJob()));
    connect(actionListJobMedia, SIGNAL(triggered()), this,
@@ -436,13 +434,6 @@ void JobList::createConnections()
  * Functions to respond to local context sensitive menu sending console commands
  * If I could figure out how to make these one function passing a string, Yaaaaaa
  */
-void JobList::consoleListJobid()
-{
-   QString cmd("list jobid=");
-   cmd += m_currentJob;
-   if (mainWin->m_longList) { cmd.prepend("l"); }
-   consoleCommand(cmd);
-}
 void JobList::consoleListFilesOnJob()
 {
    QString cmd("list files jobid=");
@@ -643,7 +634,6 @@ void JobList::selectionChanged()
    /* Add Actions */
    mp_tableWidget->addAction(actionRefreshJobList);
    if (m_selectedJobsCount == 1) {
-      mp_tableWidget->addAction(actionListJobid);
       mp_tableWidget->addAction(actionListFilesOnJob);
       mp_tableWidget->addAction(actionListJobMedia);
       mp_tableWidget->addAction(actionListVolumes);
index 9492a1cbe49bc6753eecf8f771b9eebe88469342..58bd2c15be1ff29d15e2ae012c5e9a83713a922c 100644 (file)
@@ -56,7 +56,6 @@ public slots:
    void selectionChanged();
 
 private slots:
-   void consoleListJobid();
    void consoleListFilesOnJob();
    void consoleListJobMedia();
    void consoleListVolumes();
index 4f86c64bbe27317b2afc82080dc02f584aa7c617..99adbadab0bf73a44f231b45dbf49b1c76bae20f 100644 (file)
@@ -1,19 +1,20 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>JobListForm</class>
- <widget class="QWidget" name="JobListForm" >
-  <property name="geometry" >
+ <widget class="QWidget" name="JobListForm">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>739</width>
-    <height>790</height>
+    <width>696</width>
+    <height>456</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Form</string>
   </property>
-  <widget class="QTableWidget" name="mp_tableWidget" >
-   <property name="geometry" >
+  <widget class="QTableWidget" name="mp_tableWidget">
+   <property name="geometry">
     <rect>
      <x>60</x>
      <y>10</y>
     </rect>
    </property>
   </widget>
-  <widget class="QFrame" name="frame" >
-   <property name="geometry" >
+  <widget class="QFrame" name="frame">
+   <property name="geometry">
     <rect>
-     <x>20</x>
-     <y>220</y>
-     <width>573</width>
-     <height>149</height>
+     <x>50</x>
+     <y>190</y>
+     <width>541</width>
+     <height>171</height>
     </rect>
    </property>
-   <property name="maximumSize" >
+   <property name="maximumSize">
     <size>
      <width>900</width>
      <height>172</height>
     </size>
    </property>
-   <property name="frameShape" >
+   <property name="frameShape">
     <enum>QFrame::StyledPanel</enum>
    </property>
-   <property name="frameShadow" >
+   <property name="frameShadow">
     <enum>QFrame::Raised</enum>
    </property>
-   <layout class="QGridLayout" >
-    <item row="0" column="0" >
-     <layout class="QVBoxLayout" >
-      <property name="spacing" >
+   <layout class="QGridLayout">
+    <item row="0" column="0">
+     <layout class="QVBoxLayout">
+      <property name="spacing">
        <number>6</number>
       </property>
-      <property name="leftMargin" >
-       <number>3</number>
-      </property>
-      <property name="topMargin" >
-       <number>3</number>
-      </property>
-      <property name="rightMargin" >
-       <number>3</number>
-      </property>
-      <property name="bottomMargin" >
+      <property name="margin">
        <number>3</number>
       </property>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QCheckBox" name="limitCheckBox" >
-          <property name="text" >
+         <widget class="QCheckBox" name="limitCheckBox">
+          <property name="text">
            <string>Record Limit</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QSpinBox" name="limitSpinBox" >
-          <property name="minimum" >
+         <widget class="QSpinBox" name="limitSpinBox">
+          <property name="minimum">
            <number>1</number>
           </property>
-          <property name="maximum" >
+          <property name="maximum">
            <number>10000</number>
           </property>
-          <property name="singleStep" >
+          <property name="singleStep">
            <number>25</number>
           </property>
          </widget>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QCheckBox" name="daysCheckBox" >
-          <property name="text" >
+         <widget class="QCheckBox" name="daysCheckBox">
+          <property name="text">
            <string>Days Limit</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QSpinBox" name="daysSpinBox" >
-          <property name="singleStep" >
+         <widget class="QSpinBox" name="daysSpinBox">
+          <property name="singleStep">
            <number>7</number>
           </property>
          </widget>
       </item>
      </layout>
     </item>
-    <item row="0" column="1" >
-     <layout class="QVBoxLayout" >
-      <property name="spacing" >
+    <item row="0" column="1">
+     <layout class="QVBoxLayout">
+      <property name="spacing">
        <number>6</number>
       </property>
-      <property name="leftMargin" >
-       <number>3</number>
-      </property>
-      <property name="topMargin" >
-       <number>3</number>
-      </property>
-      <property name="rightMargin" >
-       <number>3</number>
-      </property>
-      <property name="bottomMargin" >
+      <property name="margin">
        <number>3</number>
       </property>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QLabel" name="clientsLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="clientsLabel">
+          <property name="text">
            <string>Clients</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="clientComboBox" />
+         <widget class="QComboBox" name="clientComboBox"/>
         </item>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QLabel" name="volumeLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="volumeLabel">
+          <property name="text">
            <string>Volume</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="volumeComboBox" />
+         <widget class="QComboBox" name="volumeComboBox"/>
         </item>
        </layout>
       </item>
      </layout>
     </item>
-    <item row="0" column="2" >
-     <layout class="QVBoxLayout" >
-      <property name="spacing" >
+    <item row="0" column="2">
+     <layout class="QVBoxLayout">
+      <property name="spacing">
        <number>6</number>
       </property>
-      <property name="leftMargin" >
-       <number>3</number>
-      </property>
-      <property name="topMargin" >
-       <number>3</number>
-      </property>
-      <property name="rightMargin" >
-       <number>3</number>
-      </property>
-      <property name="bottomMargin" >
+      <property name="margin">
        <number>3</number>
       </property>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QLabel" name="jobLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="jobLabel">
+          <property name="text">
            <string>Job</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="jobComboBox" />
+         <widget class="QComboBox" name="jobComboBox"/>
         </item>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QLabel" name="levelLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="levelLabel">
+          <property name="text">
            <string>Level</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="levelComboBox" />
+         <widget class="QComboBox" name="levelComboBox"/>
         </item>
        </layout>
       </item>
      </layout>
     </item>
-    <item row="0" column="3" >
-     <layout class="QVBoxLayout" >
-      <property name="spacing" >
+    <item row="0" column="3">
+     <layout class="QVBoxLayout">
+      <property name="spacing">
        <number>6</number>
       </property>
-      <property name="leftMargin" >
-       <number>3</number>
-      </property>
-      <property name="topMargin" >
-       <number>3</number>
-      </property>
-      <property name="rightMargin" >
-       <number>3</number>
-      </property>
-      <property name="bottomMargin" >
+      <property name="margin">
        <number>3</number>
       </property>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QLabel" name="statusLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="statusLabel">
+          <property name="text">
            <string>Status</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="statusComboBox" />
+         <widget class="QComboBox" name="statusComboBox"/>
         </item>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QLabel" name="purgedLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="purgedLabel">
+          <property name="text">
            <string>Purged</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="purgedComboBox" />
+         <widget class="QComboBox" name="purgedComboBox"/>
         </item>
        </layout>
       </item>
      </layout>
     </item>
-    <item row="0" column="4" >
-     <layout class="QVBoxLayout" >
-      <property name="leftMargin" >
-       <number>3</number>
-      </property>
-      <property name="topMargin" >
-       <number>3</number>
-      </property>
-      <property name="rightMargin" >
-       <number>3</number>
-      </property>
-      <property name="bottomMargin" >
+    <item row="0" column="4">
+     <layout class="QVBoxLayout">
+      <property name="margin">
        <number>3</number>
       </property>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QLabel" name="fileSetLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="fileSetLabel">
+          <property name="text">
            <string>FileSet</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="fileSetComboBox" />
+         <widget class="QComboBox" name="fileSetComboBox"/>
         </item>
        </layout>
       </item>
       <item>
-       <layout class="QVBoxLayout" >
-        <property name="spacing" >
+       <layout class="QVBoxLayout">
+        <property name="spacing">
          <number>6</number>
         </property>
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
+        <property name="margin">
          <number>3</number>
         </property>
         <item>
-         <widget class="QLabel" name="poolLabel" >
-          <property name="text" >
+         <widget class="QLabel" name="poolLabel">
+          <property name="text">
            <string>Pool</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QComboBox" name="poolComboBox" />
+         <widget class="QComboBox" name="poolComboBox"/>
         </item>
        </layout>
       </item>
      </layout>
     </item>
-    <item row="0" column="5" >
-     <layout class="QVBoxLayout" >
+    <item row="0" column="5">
+     <layout class="QVBoxLayout">
       <item>
-       <layout class="QGridLayout" >
-        <property name="leftMargin" >
-         <number>3</number>
-        </property>
-        <property name="topMargin" >
-         <number>3</number>
-        </property>
-        <property name="rightMargin" >
-         <number>3</number>
-        </property>
-        <property name="bottomMargin" >
-         <number>3</number>
-        </property>
-        <property name="horizontalSpacing" >
+       <layout class="QGridLayout">
+        <property name="margin">
          <number>3</number>
         </property>
-        <property name="verticalSpacing" >
+        <property name="spacing">
          <number>3</number>
         </property>
-        <item row="0" column="0" >
-         <widget class="QPushButton" name="refreshButton" >
-          <property name="text" >
+        <item row="0" column="0">
+         <widget class="QPushButton" name="refreshButton">
+          <property name="text">
            <string>Refresh</string>
           </property>
-          <property name="icon" >
-           <iconset resource="../main.qrc" >:/images/view-refresh.png</iconset>
+          <property name="icon">
+           <iconset resource="../main.qrc">
+            <normaloff>:/images/view-refresh.png</normaloff>:/images/view-refresh.png</iconset>
           </property>
          </widget>
         </item>
-        <item row="1" column="0" >
-         <widget class="QPushButton" name="graphButton" >
-          <property name="text" >
+        <item row="1" column="0">
+         <widget class="QPushButton" name="graphButton">
+          <property name="text">
            <string>Graph</string>
           </property>
-          <property name="icon" >
-           <iconset resource="../main.qrc" >:/images/applications-graphics.png</iconset>
+          <property name="icon">
+           <iconset resource="../main.qrc">
+            <normaloff>:/images/applications-graphics.png</normaloff>:/images/applications-graphics.png</iconset>
           </property>
          </widget>
         </item>
        </layout>
       </item>
       <item>
-       <widget class="QCheckBox" name="filterCopyCheckBox" >
-        <property name="text" >
+       <widget class="QCheckBox" name="filterCopyCheckBox">
+        <property name="text">
          <string>Filter Copy Jobs</string>
         </property>
        </widget>
       </item>
       <item>
-       <widget class="QCheckBox" name="filterMigrationCheckBox" >
-        <property name="text" >
+       <widget class="QCheckBox" name="filterMigrationCheckBox">
+        <property name="text">
          <string>Filter Migration Jobs</string>
         </property>
        </widget>
     </item>
    </layout>
   </widget>
-  <action name="actionRefreshJobList" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/view-refresh.png</iconset>
+  <action name="actionRefreshJobList">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/view-refresh.png</normaloff>:/images/view-refresh.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>Refresh Job List</string>
    </property>
-   <property name="statusTip" >
+   <property name="statusTip">
     <string>Requery the director for the list of jobs.</string>
    </property>
   </action>
-  <action name="actionListJobid" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/utilities-terminal.png</iconset>
-   </property>
-   <property name="text" >
-    <string>ListJobid</string>
-   </property>
-  </action>
-  <action name="actionListFilesOnJob" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/utilities-terminal.png</iconset>
+  <action name="actionListFilesOnJob">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/utilities-terminal.png</normaloff>:/images/utilities-terminal.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>List Files On Job</string>
    </property>
   </action>
-  <action name="actionListJobMedia" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/utilities-terminal.png</iconset>
+  <action name="actionListJobMedia">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/utilities-terminal.png</normaloff>:/images/utilities-terminal.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>ListJobMedia</string>
    </property>
   </action>
-  <action name="actionListVolumes" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/utilities-terminal.png</iconset>
+  <action name="actionListVolumes">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/utilities-terminal.png</normaloff>:/images/utilities-terminal.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>ListVolumes</string>
    </property>
   </action>
-  <action name="actionDeleteJob" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/weather-severe-alert.png</iconset>
+  <action name="actionDeleteJob">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/weather-severe-alert.png</normaloff>:/images/weather-severe-alert.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>DeleteJob</string>
    </property>
   </action>
-  <action name="actionPurgeFiles" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/weather-severe-alert.png</iconset>
+  <action name="actionPurgeFiles">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/weather-severe-alert.png</normaloff>:/images/weather-severe-alert.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>PurgeFiles</string>
    </property>
   </action>
-  <action name="actionRestoreFromJob" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/restore.png</iconset>
+  <action name="actionRestoreFromJob">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/restore.png</normaloff>:/images/restore.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>Restore From Job</string>
    </property>
   </action>
-  <action name="actionRestoreFromTime" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/restore.png</iconset>
+  <action name="actionRestoreFromTime">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/restore.png</normaloff>:/images/restore.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>Restore From Time</string>
    </property>
   </action>
-  <action name="actionShowLogForJob" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/joblog.png</iconset>
+  <action name="actionShowLogForJob">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/joblog.png</normaloff>:/images/joblog.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>Show Log for Job</string>
    </property>
   </action>
-  <action name="actionCancelJob" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/unmark.png</iconset>
+  <action name="actionCancelJob">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/unmark.png</normaloff>:/images/unmark.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>Cancel Currently Running Job</string>
    </property>
   </action>
-  <action name="actionListJobTotals" >
-   <property name="icon" >
-    <iconset resource="../main.qrc" >:/images/utilities-terminal.png</iconset>
+  <action name="actionListJobTotals">
+   <property name="icon">
+    <iconset resource="../main.qrc">
+     <normaloff>:/images/utilities-terminal.png</normaloff>:/images/utilities-terminal.png</iconset>
    </property>
-   <property name="text" >
+   <property name="text">
     <string>List Job Totals in Console</string>
    </property>
   </action>
  </widget>
  <resources>
-  <include location="../main.qrc" />
+  <include location="../main.qrc"/>
  </resources>
  <connections/>
 </ui>
index 47b688b4b11df3e65672c446873082d15d80a143..5e9390c15a90f37cb5b69e2fc6b1985dc2c611fe 100644 (file)
@@ -56,7 +56,6 @@ Jobs::Jobs()
     * selector tree. m_contextActions is QList of QActions */
    m_contextActions.append(actionRefreshJobs);
    createContextMenu();
-   dockPage();
 }
 
 Jobs::~Jobs()
@@ -136,6 +135,7 @@ void Jobs::populateTable()
       }
    }
    mainWin->waitExit();
+   dockPage();
 }
 
 /*
index d602e870881097a3920bce69672d725b50a1a1b1..05eae9847abe16f4fe94c1fe43f2723b29fbdb47 100644 (file)
      <number>6</number>
     </property>
     <item row="0" column="0" >
-     <widget class="QStackedWidget" name="stackedWidget" >
-      <property name="sizePolicy" >
-       <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-        <horstretch>1</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="sizeIncrement" >
-       <size>
-        <width>1</width>
-        <height>0</height>
-       </size>
-      </property>
-      <property name="focusPolicy" >
-       <enum>Qt::StrongFocus</enum>
-      </property>
-      <property name="toolTip" >
-       <string/>
-      </property>
-      <property name="statusTip" >
-       <string/>
-      </property>
+     <widget class="QTabWidget" name="tabWidget" >
       <property name="currentIndex" >
        <number>-1</number>
       </property>
        <property name="autoFillBackground" >
         <bool>true</bool>
        </property>
+       <property name="headerHidden" >
+        <bool>true</bool>
+       </property>
        <column>
         <property name="text" >
          <string>1</string>
index cddfb23001d838edb549110cfeafb96a96e2a224..43b70d54d624f405e152a84c2507858f85cd0763 100644 (file)
@@ -80,7 +80,7 @@ MainWin::MainWin(QWidget *parent) : QMainWindow(parent)
    treeWidget->setColumnCount(1);
    treeWidget->setHeaderLabel( tr("Select Page") );
    treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
-
+   // tabWidget->setTabsClosable(true);  /* wait for QT 4.5 */
    createPages();
 
    resetFocus(); /* lineEdit->setFocus() */
@@ -126,7 +126,7 @@ void MainWin::createPages()
    foreach_res(dir, R_DIRECTOR) {
 
       /* Create console tree stacked widget item */
-      m_currentConsole = new Console(stackedWidget);
+      m_currentConsole = new Console(tabWidget);
       m_currentConsole->setDirRes(dir);
       m_currentConsole->readSettings();
 
@@ -179,7 +179,7 @@ void MainWin::createPages()
          new DirStat();
 
       treeWidget->expandItem(topItem);
-      stackedWidget->setCurrentWidget(m_currentConsole);
+      tabWidget->setCurrentWidget(m_currentConsole);
    }
    UnlockRes();
 }
@@ -250,7 +250,7 @@ void MainWin::connectSignals()
    connect(actionBat_Help, SIGNAL(triggered()), this, SLOT(help()));
    connect(treeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(treeItemClicked(QTreeWidgetItem *, int)));
    connect(treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)));
-   connect(stackedWidget, SIGNAL(currentChanged(int)), this, SLOT(stackItemChanged(int)));
+   connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(stackItemChanged(int)));
    connect(actionQuit, SIGNAL(triggered()), app, SLOT(closeAllWindows()));
    connect(actionLabel, SIGNAL(triggered()), this,  SLOT(labelButtonClicked()));
    connect(actionRun, SIGNAL(triggered()), this,  SLOT(runButtonClicked()));
@@ -277,7 +277,7 @@ void MainWin::disconnectSignals()
    disconnect(actionBat_Help, SIGNAL(triggered()), this, SLOT(help()));
    disconnect(treeWidget, SIGNAL(itemClicked(QTreeWidgetItem *, int)), this, SLOT(treeItemClicked(QTreeWidgetItem *, int)));
    disconnect(treeWidget, SIGNAL( currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), this, SLOT(treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)));
-   disconnect(stackedWidget, SIGNAL(currentChanged(int)), this, SLOT(stackItemChanged(int)));
+   disconnect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(stackItemChanged(int)));
    disconnect(actionQuit, SIGNAL(triggered()), app, SLOT(closeAllWindows()));
    disconnect(actionLabel, SIGNAL(triggered()), this,  SLOT(labelButtonClicked()));
    disconnect(actionRun, SIGNAL(triggered()), this,  SLOT(runButtonClicked()));
@@ -427,10 +427,10 @@ void MainWin::treeItemClicked(QTreeWidgetItem *item, int /*column*/)
    /* Is this a page that has been inserted into the hash  */
    if (getFromHash(item)) {
       Pages* page = getFromHash(item);
-      int stackindex=stackedWidget->indexOf(page);
+      int stackindex=tabWidget->indexOf(page);
 
       if (stackindex >= 0) {
-         stackedWidget->setCurrentWidget(page);
+         tabWidget->setCurrentWidget(page);
       }
       /* run the virtual function in case this class overrides it */
       page->PgSeltreeWidgetClicked();
@@ -511,12 +511,12 @@ void MainWin::treeItemChanged(QTreeWidgetItem *currentitem, QTreeWidgetItem *pre
          dirItem->setBackground(0, magentaBrush);
       }
       /* set the value for the currently active console */
-      int stackindex = stackedWidget->indexOf(nextPage);
+      int stackindex = tabWidget->indexOf(nextPage);
    
       /* Is this page currently on the stack or is it undocked */
       if (stackindex >= 0) {
          /* put this page on the top of the stack */
-         stackedWidget->setCurrentIndex(stackindex);
+         tabWidget->setCurrentIndex(stackindex);
       } else {
          /* it is undocked, raise it to the front */
          nextPage->raise();
@@ -655,7 +655,7 @@ void MainWin::set_status(const char *buf)
  */
 void MainWin::undockWindowButton()
 {
-   Pages* page = (Pages*)stackedWidget->currentWidget();
+   Pages* page = (Pages*)tabWidget->currentWidget();
    page->togglePageDocking();
 }
 
@@ -683,7 +683,7 @@ void MainWin::toggleDockContextWindow()
 void MainWin::stackItemChanged(int)
 {
    if (m_isClosing) return; /* if closing the application, do nothing here */
-   Pages* page = (Pages*)stackedWidget->currentWidget();
+   Pages* page = (Pages*)tabWidget->currentWidget();
    /* run the virtual function in case this class overrides it */
    page->currentStackItem();
 }
index f43b35b0c480a7fc300e0541ddf6878941cf7d70..f48d287ad8dc7a939e1d295c6994590d15b43e42 100644 (file)
@@ -61,7 +61,6 @@ MediaList::MediaList()
    /* add context sensitive menu items specific to this classto the page
     * selector tree. m_contextActions is QList of QActions */
    m_contextActions.append(actionRefreshMediaList);
-   dockPage();
 }
 
 MediaList::~MediaList()
@@ -290,6 +289,7 @@ void MediaList::PgSeltreeWidgetClicked()
       populateTree();
       createContextMenu();
    }
+   dockPage();
 }
 
 /*
index d9027b85812b13bca785562555cea9adf405e371..1b99dbb13cf0dd653f49ae59eb5c5725ca2f1ef4 100644 (file)
@@ -59,19 +59,24 @@ bool isWin32Path(QString &fullPath)
 
 void Pages::dockPage()
 {
+   if (isDocked()) {
+      return;
+   }
+
    /* These two lines are for making sure if it is being changed from a window
     * that it has the proper window flag and parent.
     */
    setWindowFlags(Qt::Widget);
 
    /* This was being done already */
-   m_parent->addWidget(this);
+   m_parent->addTab(this, m_name);
 
    /* Set docked flag */
    m_docked = true;
-   mainWin->stackedWidget->setCurrentWidget(this);
+   mainWin->tabWidget->setCurrentWidget(this);
    /* lets set the page selectors action for docking or undocking */
    setContextMenuDockText();
+
 }
 
 /*
@@ -82,8 +87,12 @@ void Pages::dockPage()
 
 void Pages::undockPage()
 {
+   if (!isDocked()) {
+      return;
+   }
+
    /* Change from a stacked widget to a normal window */
-   m_parent->removeWidget(this);
+   m_parent->removeTab(m_parent->indexOf(this));
    setWindowFlags(Qt::Window);
    show();
    /* Clear docked flag */
@@ -197,10 +206,11 @@ void Pages::pgInitialize(const QString &name)
 
 void Pages::pgInitialize(const QString &tname, QTreeWidgetItem *parentTreeWidgetItem)
 {
+   m_docked = false;
    if (tname.size()) {
       m_name = tname;
    }
-   m_parent = mainWin->stackedWidget;
+   m_parent = mainWin->tabWidget;
    m_console = mainWin->currentConsole();
 
    if (!parentTreeWidgetItem) {
index 4aec85e6ecd94768a47a44fdff8b52bc6c3a2900..654dd2ad9509fe986415a60ee6622297e85a6b85 100644 (file)
@@ -60,7 +60,7 @@ public:
    void togglePageDocking();
    bool isDocked();
    bool isCloseable();
-   QStackedWidget *m_parent;
+   QTabWidget *m_parent;
    QList<QAction*> m_contextActions;
    virtual void PgSeltreeWidgetClicked();
    virtual void currentStackItem();
index 9260c785d6cf66e136cce23cc1ea39233fd5484f..ccba96117762b0bd46d378cd14204fc8437ee6c8 100644 (file)
@@ -99,7 +99,7 @@ void ClientStat::timerTriggered()
    value -= 1;
    if (value == 0) {
       value = spinBox->value();
-      bool iscurrent = mainWin->stackedWidget->currentIndex() == mainWin->stackedWidget->indexOf(this);
+      bool iscurrent = mainWin->tabWidget->currentIndex() == mainWin->tabWidget->indexOf(this);
       if (((isDocked() && iscurrent) || (!isDocked())) && (checkBox->checkState() == Qt::Checked)) {
          populateAll();
       }
index f425965f3c78a643c1eb4d435f67bbaabf61a692..483f567cb99139e3dfaf4d4cf7349d4b4b6369ac 100644 (file)
          <property name="currentIndex" >
           <number>0</number>
          </property>
+         <widget class="QWidget" name="tab_2" >
+          <attribute name="title" >
+           <string>Running</string>
+          </attribute>
+          <layout class="QGridLayout" >
+           <item row="0" column="0" >
+            <widget class="QTextEdit" name="textEditRunning" />
+           </item>
+          </layout>
+         </widget>
          <widget class="QWidget" name="tab" >
           <attribute name="title" >
            <string>Header</string>
            </item>
           </layout>
          </widget>
-         <widget class="QWidget" name="tab_2" >
-          <attribute name="title" >
-           <string>Running</string>
-          </attribute>
-          <layout class="QGridLayout" >
-           <item row="0" column="0" >
-            <widget class="QTextEdit" name="textEditRunning" />
-           </item>
-          </layout>
-         </widget>
         </widget>
        </item>
        <item>
index 400eb23bdc99db225d061eaa9e684216400d641d..54913d40fcecd26d91c4cb5ba42224308fa6e967 100644 (file)
@@ -51,11 +51,12 @@ DirStat::DirStat()
 
    m_timer = new QTimer(this);
    readSettings();
-   dockPage();
    m_timer->start(1000);
 
    createConnections();
    setCurrent();
+
+   dockPage();
 }
 
 void DirStat::getFont()
@@ -101,7 +102,7 @@ void DirStat::timerTriggered()
    value -= 1;
    if (value == 0) {
       value = spinBox->value();
-      bool iscurrent = mainWin->stackedWidget->currentIndex() == mainWin->stackedWidget->indexOf(this);
+      bool iscurrent = mainWin->tabWidget->currentIndex() == mainWin->tabWidget->indexOf(this);
       if (((isDocked() && iscurrent) || (!isDocked())) && (checkBox->checkState() == Qt::Checked)) {
          populateAll();
       }
index 4925778a0f8da4211093c66c0fb7fc0308794294..0d2f7bb49787cfae328000851e14e75e10b7a866 100644 (file)
@@ -67,11 +67,12 @@ StorStat::StorStat(QString &storage, QTreeWidgetItem *parentTreeWidgetItem)
 
    m_timer = new QTimer(this);
    readSettings();
-   dockPage();
 
    createConnections();
    m_timer->start(1000);
    setCurrent();
+
+   dockPage();
 }
 
 void StorStat::getFont()
@@ -115,7 +116,7 @@ void StorStat::timerTriggered()
    value -= 1;
    if (value == 0) {
       value = spinBox->value();
-      bool iscurrent = mainWin->stackedWidget->currentIndex() == mainWin->stackedWidget->indexOf(this);
+      bool iscurrent = mainWin->tabWidget->currentIndex() == mainWin->tabWidget->indexOf(this);
       if (((isDocked() && iscurrent) || (!isDocked())) && (checkBox->checkState() == Qt::Checked)) {
          populateAll();
       }
index 089b64817d4a621457679bb9f69a6c04f08c3a95..7141787c7942242fb17f66038a6fbee3c610471e 100644 (file)
@@ -60,7 +60,6 @@ Storage::Storage()
    /* add context sensitive menu items specific to this classto the page
     * selector tree. m_contextActions is QList of QActions */
    m_contextActions.append(actionRefreshStorage);
-   dockPage();
 }
 
 Storage::~Storage()
@@ -234,6 +233,7 @@ void Storage::PgSeltreeWidgetClicked()
       populateTree();
       createContextMenu();
    }
+   dockPage();
 }
 
 /*