From 0c5fe01e56a4470c1380c7d4bc1d8e9007e56ef5 Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Tue, 9 Jun 2009 02:01:42 +0000 Subject: [PATCH] Add checkbox widgets to filter out copy and migration jobs. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8891 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/joblist/joblist.cpp | 12 +++++++++++- bacula/src/qt-console/joblist/joblist.ui | 23 ++++++++++++----------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/bacula/src/qt-console/joblist/joblist.cpp b/bacula/src/qt-console/joblist/joblist.cpp index babb3d4d63..0a838e44a5 100644 --- a/bacula/src/qt-console/joblist/joblist.cpp +++ b/bacula/src/qt-console/joblist/joblist.cpp @@ -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(); } diff --git a/bacula/src/qt-console/joblist/joblist.ui b/bacula/src/qt-console/joblist/joblist.ui index 4f8fbf7e95..4f86c64bbe 100644 --- a/bacula/src/qt-console/joblist/joblist.ui +++ b/bacula/src/qt-console/joblist/joblist.ui @@ -27,8 +27,8 @@ 20 220 - 565 - 146 + 573 + 149 @@ -485,17 +485,18 @@ - - - Qt::Vertical + + + Filter Copy Jobs - - - 20 - 40 - + + + + + + Filter Migration Jobs - + -- 2.39.5