]> git.sur5r.net Git - bacula/bacula/commitdiff
kes Implement --without-qwt
authorKern Sibbald <kern@sibbald.com>
Tue, 13 May 2008 06:49:45 +0000 (06:49 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 13 May 2008 06:49:45 +0000 (06:49 +0000)
kes  Fix layout of restore tree dialog

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.2@6962 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/configure.in
bacula/configure
bacula/src/qt-console/bat.h
bacula/src/qt-console/jobgraphs/jobplot.cpp
bacula/src/qt-console/jobgraphs/jobplot.h
bacula/src/qt-console/joblist/joblist.cpp
bacula/src/qt-console/restore/restore.ui
bacula/technotes-2.1

index 4b004db18294ebec95ef0b3859ad09387cd8e08c..ab963790adce191feeb9fd4886bdfcc01f3a235a 100644 (file)
@@ -274,6 +274,7 @@ QWT_INC=
 QWT_LDFLAGS=
 QWT_LIB=
 QWT=
+no_qwt=no
 if test x$support_bat = xyes; then
    AC_MSG_CHECKING(for qwt support)
    AC_ARG_WITH(qwt,
@@ -281,6 +282,7 @@ if test x$support_bat = xyes; then
      [
        case "$with_qwt" in
        no)
+          no_qwt=yes  
          ;;
        yes|*)
          if test -f ${with_qwt}/include/qwt.h; then
@@ -296,7 +298,8 @@ if test x$support_bat = xyes; then
 #
 # Search in standard places, or --with-qwt not specified
 #
-   if test x$QWT_INC = x; then
+   if test $no_qwt = no; then
+    if test x$QWT_INC = x; then
       for root in /usr /usr/local; do
         for ver in qwt qwt5 qwt-qt4; do
            if test -f ${root}/include/${ver}/qwt.h; then
@@ -313,6 +316,7 @@ if test x$support_bat = xyes; then
            fi
         done
       done
+    fi
    fi
    if test x$QWT_INC = x; then
       AC_MSG_RESULT(no)
index ce0bed17a1a3d37c14339aea67267bb174de01d2..d47ff3fa72eabba4b6d02584996b6361b05b7ff9 100755 (executable)
@@ -13516,6 +13516,7 @@ QWT_INC=
 QWT_LDFLAGS=
 QWT_LIB=
 QWT=
+no_qwt=no
 if test x$support_bat = xyes; then
    { echo "$as_me:$LINENO: checking for qwt support" >&5
 echo $ECHO_N "checking for qwt support... $ECHO_C" >&6; }
@@ -13525,6 +13526,7 @@ if test "${with_qwt+set}" = set; then
   withval=$with_qwt;
        case "$with_qwt" in
        no)
+          no_qwt=yes
          ;;
        yes|*)
          if test -f ${with_qwt}/include/qwt.h; then
@@ -13542,7 +13544,8 @@ fi
 #
 # Search in standard places, or --with-qwt not specified
 #
-   if test x$QWT_INC = x; then
+   if test $no_qwt = no; then
+    if test x$QWT_INC = x; then
       for root in /usr /usr/local; do
         for ver in qwt qwt5 qwt-qt4; do
            if test -f ${root}/include/${ver}/qwt.h; then
@@ -13559,6 +13562,7 @@ fi
            fi
         done
       done
+    fi
    fi
    if test x$QWT_INC = x; then
       { echo "$as_me:$LINENO: result: no" >&5
index 308f1e05cb3843e2a7c7908b672f13501fc356d4..61fdfdaffdac1c599e446c72e2141725dfa8cab4 100644 (file)
@@ -35,6 +35,7 @@
  */
 
 #include "config.h"
+
 #include <QtGui>
 #include <QtCore>
 #include "mainwin.h"
index 2dc2493f6be0d9ab947011cfe86fe26b6bb01860..ca65bd66a7bc6e7ab11b9fb09cda190d13261f8f 100644 (file)
@@ -37,6 +37,7 @@
 
 #include <QtGui>
 #include "bat.h"
+#ifdef HAVE_QWT
 #include "jobgraphs/jobplot.h"
 
 
@@ -234,7 +235,7 @@ void JobPlot::runQuery()
    int volumeIndex = controls->volumeComboBox->currentIndex();
    if ((volumeIndex != -1) && (controls->volumeComboBox->itemText(volumeIndex) != "Any")) {
       query += " LEFT OUTER JOIN JobMedia ON (JobMedia.JobId=Job.JobId)"
-              " LEFT OUTER JOIN Media ON (JobMedia.MediaId=Media.MediaId)";
+               " LEFT OUTER JOIN Media ON (JobMedia.MediaId=Media.MediaId)";
       conditions.append("Media.VolumeName='" + controls->volumeComboBox->itemText(volumeIndex) + "'");
    }
    int fileSetIndex = controls->fileSetComboBox->currentIndex();
@@ -582,3 +583,4 @@ void JobPlot::readSplitterSettings()
    m_splitter->restoreState(settings.value("m_splitterSizes").toByteArray());
    settings.endGroup();
 }
+#endif /* HAVE_QWT */
index 423bf57acd3c1364bca86ebbe8fd7d891f3453b7..f1db38b41217965fdc14d4099cf40670c005005c 100644 (file)
@@ -33,6 +33,8 @@
  *   Dirk Bartley, March 2007
  */
 
+#include "bat.h"
+#ifdef HAVE_QWT
 #include <QtGui>
 #include "pages.h"
 #include "ui_jobplotcontrols.h"
@@ -148,4 +150,6 @@ private:
    QwtPlot *m_jobPlot;
 };
 
+#endif /* HAVE_QWT */
+
 #endif /* _JOBPLOT_H_ */
index d04f01d91c3c10b69de4cfdacf54757d1af1d141..c83cbbdf15e9e1dbad06e4405e4d998da3321878 100644 (file)
@@ -31,9 +31,9 @@
  *   Dirk Bartley, March 2007
  */
  
+#include "bat.h"
 #include <QAbstractEventDispatcher>
 #include <QTableWidgetItem>
-#include "bat.h"
 #include "joblist.h"
 #include "restore.h"
 #include "joblog/joblog.h"
index 0429324889c2dd5403dc782bf148fae2799c370b..968e9e8ce3198ce966d5f7c54172ecd67b91b055 100644 (file)
     <x>0</x>
     <y>0</y>
     <width>796</width>
-    <height>582</height>
+    <height>597</height>
    </rect>
   </property>
   <property name="windowTitle" >
    <string>Form</string>
   </property>
   <layout class="QGridLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
-   <property name="spacing" >
-    <number>6</number>
-   </property>
-   <item row="1" column="0" >
+   <item row="0" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>81</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="1" >
+    <widget class="QLabel" name="label_5" >
+     <property name="maximumSize" >
+      <size>
+       <width>16777215</width>
+       <height>41</height>
+      </size>
+     </property>
+     <property name="text" >
+      <string>&lt;h3>Restore Select&lt;/h3></string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>51</width>
+       <height>21</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="3" >
+    <widget class="QPushButton" name="upButton" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize" >
+      <size>
+       <width>35</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="text" >
+      <string>Up</string>
+     </property>
+     <property name="icon" >
+      <iconset resource="../main.qrc" >:/images/up.png</iconset>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="4" >
+    <widget class="QPushButton" name="markButton" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize" >
+      <size>
+       <width>35</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="text" >
+      <string>Mark</string>
+     </property>
+     <property name="icon" >
+      <iconset resource="../main.qrc" >:/images/check.png</iconset>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="5" >
+    <widget class="QPushButton" name="unmarkButton" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize" >
+      <size>
+       <width>50</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="text" >
+      <string>Unmark</string>
+     </property>
+     <property name="icon" >
+      <iconset resource="../main.qrc" >:/images/unchecked.png</iconset>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="6" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>81</width>
+       <height>21</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="0" column="7" >
+    <widget class="QLabel" name="label_2" >
+     <property name="text" >
+      <string>&lt;h2>Files&lt;/h2></string>
+     </property>
+    </widget>
+   </item>
+   <item row="0" column="8" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>71</width>
+       <height>21</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="0" colspan="9" >
     <widget class="QSplitter" name="splitter" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
      </property>
      <widget class="QTreeWidget" name="directoryWidget" >
       <property name="sizePolicy" >
-       <sizepolicy>
-        <hsizetype>5</hsizetype>
-        <vsizetype>7</vsizetype>
+       <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
         <horstretch>1</horstretch>
         <verstretch>1</verstretch>
        </sizepolicy>
         <height>0</height>
        </size>
       </property>
+      <property name="whatsThis" >
+       <string>Select a Directory</string>
+      </property>
       <property name="alternatingRowColors" >
        <bool>true</bool>
       </property>
       </property>
       <column>
        <property name="text" >
-        <string>1</string>
+        <string>Directories</string>
        </property>
       </column>
      </widget>
      <widget class="QTreeWidget" name="fileWidget" >
       <property name="sizePolicy" >
-       <sizepolicy>
-        <hsizetype>7</hsizetype>
-        <vsizetype>5</vsizetype>
+       <sizepolicy vsizetype="Expanding" hsizetype="Fixed" >
         <horstretch>144</horstretch>
         <verstretch>1</verstretch>
        </sizepolicy>
      </widget>
     </widget>
    </item>
-   <item row="0" column="0" >
+   <item row="2" column="0" colspan="9" >
     <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Preferred</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>50</width>
-         <height>30</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
      <item>
-      <widget class="QLabel" name="label_3" >
-       <property name="text" >
-        <string>&lt;h2>Directories&lt;/h2></string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>16</width>
-         <height>30</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QLabel" name="label_5" >
-       <property name="maximumSize" >
-        <size>
-         <width>16777215</width>
-         <height>15</height>
-        </size>
-       </property>
-       <property name="text" >
-        <string>&lt;h3>Restore Select&lt;/h3></string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>16</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="upButton" >
-       <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>5</hsizetype>
-         <vsizetype>0</vsizetype>
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="minimumSize" >
-        <size>
-         <width>35</width>
-         <height>0</height>
-        </size>
-       </property>
-       <property name="text" >
-        <string>Up</string>
-       </property>
-       <property name="icon" >
-        <iconset resource="../main.qrc" >:/images/up.png</iconset>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="markButton" >
-       <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>5</hsizetype>
-         <vsizetype>0</vsizetype>
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="minimumSize" >
-        <size>
-         <width>35</width>
-         <height>0</height>
-        </size>
-       </property>
-       <property name="text" >
-        <string>Mark</string>
-       </property>
-       <property name="icon" >
-        <iconset resource="../main.qrc" >:/images/check.png</iconset>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="unmarkButton" >
+      <widget class="QLabel" name="label" >
        <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>5</hsizetype>
-         <vsizetype>0</vsizetype>
+        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
-       <property name="minimumSize" >
-        <size>
-         <width>50</width>
-         <height>0</height>
-        </size>
-       </property>
-       <property name="text" >
-        <string>Unmark</string>
-       </property>
-       <property name="icon" >
-        <iconset resource="../main.qrc" >:/images/unchecked.png</iconset>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>61</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QLabel" name="label_2" >
        <property name="text" >
-        <string>&lt;h2>Files&lt;/h2></string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>100</width>
-         <height>30</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
-   </item>
-   <item row="3" column="0" >
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item>
-      <widget class="QLabel" name="label_4" >
-       <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>0</hsizetype>
-         <vsizetype>0</vsizetype>
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
+        <string>Current Dir:</string>
        </property>
-       <property name="text" >
-        <string>Status:</string>
+       <property name="buddy" >
+        <cstring>lineEdit</cstring>
        </property>
       </widget>
      </item>
      <item>
       <widget class="QLabel" name="statusLine" >
        <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>5</hsizetype>
-         <vsizetype>0</vsizetype>
+        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
       </widget>
      </item>
-    </layout>
-   </item>
-   <item row="2" column="0" >
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item>
-      <widget class="QLabel" name="label" >
-       <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>0</hsizetype>
-         <vsizetype>5</vsizetype>
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="text" >
-        <string>Current Dir:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>lineEdit</cstring>
-       </property>
-      </widget>
-     </item>
      <item>
       <widget class="QLineEdit" name="lineEdit" >
        <property name="minimumSize" >
      </item>
     </layout>
    </item>
+   <item row="3" column="0" >
+    <widget class="QLabel" name="label_4" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="text" >
+      <string>Status:</string>
+     </property>
+    </widget>
+   </item>
   </layout>
   <action name="actionMark" >
    <property name="icon" >
index 071125d9a8ef35fc4f5c7b04efea1eea55190961..7cf92556ac43f0a62ab186fe44ccd6d58c9c68af 100644 (file)
@@ -3,6 +3,8 @@
 General:
 
 12May08
+kes  Implement --without-qwt
+kes  Fix layout of restore tree dialog 
 kes  Add configure bat QWT libraries, so that bat can be built
      with or without the QWT libaries.
 11May08