#include "job.h"
#include "util/fmtwidgetitem.h"
#include "mediainfo/mediainfo.h"
+#include "run/run.h"
Job::Job(QString &jobId, QTreeWidgetItem *parentTreeWidgetItem)
{
connect(pbRefresh, SIGNAL(clicked()), this, SLOT(populateAll()));
connect(pbDelete, SIGNAL(clicked()), this, SLOT(deleteJob()));
+ connect(pbRun, SIGNAL(clicked()), this, SLOT(rerun()));
connect(list_Volume, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(showInfoVolume(QListWidgetItem *)));
populateAll();
setCurrent();
}
+void Job::rerun()
+{
+ new runPage(label_Name->text(),
+ label_Level->text(),
+ label_Pool->text(),
+ QString(""), // storage
+ label_Client->text(),
+ label_FileSet->text());
+}
+
void Job::showInfoVolume(QListWidgetItem *item)
{
QString s= item->text();
void populateAll();
void deleteJob();
void showInfoVolume(QListWidgetItem *);
+ void rerun();
private slots:
</item>
<item>
<widget class="QPushButton" name="pbRun" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<horstretch>0</horstretch>
#include "bat.h"
#include "run.h"
+
+runPage::runPage()
+{
+ init();
+ show();
+}
+
+runPage::runPage(const QString &defJob)
+{
+ 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)
+{
+ 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;
// or in the midle of the page
// dockPage();
setCurrent();
- this->show();
- if (defJob != "")
- jobCombo->setCurrentIndex(jobCombo->findText(defJob, Qt::MatchExactly));
}
void runPage::okButtonPushed()
Q_OBJECT
public:
+ runPage();
+
runPage(const QString &defJob);
+ runPage(const QString &defJob,
+ const QString &level,
+ const QString &pool,
+ const QString &storage,
+ const QString &client,
+ const QString &fileset);
+
public slots:
void okButtonPushed();
void cancelButtonPushed();
void job_name_change(int index);
private:
+ void init();
int m_conn;
};
General:
13Aug09
+ebl bat: Add a re-run button on job info page, that allows to
+ run the selected job with the same properties (level, pool,
+ etc...)
ebl bat: tweak the run job window to make it a bit more sexy
12Aug09
kes Make new big-virtual-changer test. Test concurrency.