]> git.sur5r.net Git - bacula/bacula/commitdiff
Add checkbox widgets to filter out copy and migration jobs.
authorDirk H Bartley <dbartley@schupan.com>
Tue, 9 Jun 2009 02:01:42 +0000 (02:01 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Tue, 9 Jun 2009 02:01:42 +0000 (02:01 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8891 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/joblist/joblist.cpp
bacula/src/qt-console/joblist/joblist.ui

index babb3d4d63891fa3259a3aabe754fcf053c53922..0a838e44a53431054d0502c757d0ed13fe6b45f1 100644 (file)
@@ -313,7 +313,13 @@ void JobList::fillQueryString(QString &query)
    if (daysCheckBox->checkState() == Qt::Checked) {
       QDateTime stamp = QDateTime::currentDateTime().addDays(-daysSpinBox->value());
       QString since = stamp.toString(Qt::ISODate);
-      conditions.append("Job.Starttime>'" + since + "'");
+      conditions.append("Job.Starttime > '" + since + "'");
+   }
+   if (filterCopyCheckBox->checkState() == Qt::Checked) {
+      conditions.append("Job.Type != 'c'" );
+   }
+   if (filterMigrationCheckBox->checkState() == Qt::Checked) {
+      conditions.append("Job.Type != 'g'" );
    }
    bool first = true;
    foreach (QString condition, conditions) {
@@ -570,6 +576,8 @@ void JobList::writeSettings()
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup(m_groupText);
    settings.setValue(m_splitText, m_splitter->saveState());
+   settings.setValue("FilterCopyCheckState", filterCopyCheckBox->checkState());
+   settings.setValue("FilterMigrationCheckState", filterMigrationCheckBox->checkState());
    settings.endGroup();
 }
 
@@ -583,6 +591,8 @@ void JobList::readSettings()
    QSettings settings(m_console->m_dir->name(), "bat");
    settings.beginGroup(m_groupText);
    m_splitter->restoreState(settings.value(m_splitText).toByteArray());
+   filterCopyCheckBox->setCheckState((Qt::CheckState)settings.value("FilterCopyCheckState").toInt());
+   filterMigrationCheckBox->setCheckState((Qt::CheckState)settings.value("FilterMigrationCheckState").toInt());
    settings.endGroup();
 }
 
index 4f8fbf7e953135df59c00b8680e8350cc331ef4e..4f86c64bbe27317b2afc82080dc02f584aa7c617 100644 (file)
@@ -27,8 +27,8 @@
     <rect>
      <x>20</x>
      <y>220</y>
-     <width>565</width>
-     <height>146</height>
+     <width>573</width>
+     <height>149</height>
     </rect>
    </property>
    <property name="maximumSize" >
        </layout>
       </item>
       <item>
-       <spacer>
-        <property name="orientation" >
-         <enum>Qt::Vertical</enum>
+       <widget class="QCheckBox" name="filterCopyCheckBox" >
+        <property name="text" >
+         <string>Filter Copy Jobs</string>
         </property>
-        <property name="sizeHint" >
-         <size>
-          <width>20</width>
-          <height>40</height>
-         </size>
+       </widget>
+      </item>
+      <item>
+       <widget class="QCheckBox" name="filterMigrationCheckBox" >
+        <property name="text" >
+         <string>Filter Migration Jobs</string>
         </property>
-       </spacer>
+       </widget>
       </item>
      </layout>
     </item>