]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/run/run.cpp
start to tweak prune algo
[bacula/bacula] / bacula / src / qt-console / run / run.cpp
index beccbce818a0d1223b48a6f0a93396de89f127a5..587cabc0e5ea91235d7af71ea16883880ea0a555 100644 (file)
 #include "bat.h"
 #include "run.h"
 
+
+runPage::runPage()
+{
+   init();
+   show();
+}
+
+runPage::runPage(const QString &defJob)
+{
+   m_dockOnFirstUse = false;
+   init();
+   if (defJob != "")
+      jobCombo->setCurrentIndex(jobCombo->findText(defJob, Qt::MatchExactly));
+   show();
+}
+
+
+runPage::runPage(const QString &defJob, const QString &level, 
+                 const QString &pool, const QString &storage,
+                 const QString &client, const QString &fileset)
+{
+   m_dockOnFirstUse = false;
+   init();
+   jobCombo->setCurrentIndex(jobCombo->findText(defJob, Qt::MatchExactly));
+   job_name_change(0);
+   filesetCombo->setCurrentIndex(filesetCombo->findText(fileset,
+                                                        Qt::MatchExactly));
+   levelCombo->setCurrentIndex(levelCombo->findText(level, Qt::MatchExactly));
+   clientCombo->setCurrentIndex(clientCombo->findText(client,Qt::MatchExactly));
+   poolCombo->setCurrentIndex(poolCombo->findText(pool, Qt::MatchExactly));
+
+   if (storage != "") {         // TODO: enable storage
+      storageCombo->setCurrentIndex(storageCombo->findText(storage, 
+                                                           Qt::MatchExactly));
+   }
+   show();
+}
+
+
 /*
  * Setup all the combo boxes and display the dialog
  */
-runPage::runPage(const QString &defJob)
+void runPage::init()
 {
    QDateTime dt;
 
@@ -75,9 +114,6 @@ runPage::runPage(const QString &defJob)
    // or in the midle of the page
 //   dockPage();
    setCurrent();
-   this->show();
-   if (defJob != "")
-      jobCombo->setCurrentIndex(jobCombo->findText(defJob, Qt::MatchExactly));
 }
 
 void runPage::okButtonPushed()