From: Eric Bollengier Date: Tue, 4 Aug 2009 09:29:24 +0000 (+0200) Subject: bat: Go to the media info panel when double-click on job page or media list X-Git-Tag: Release-5.0.0~338^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e5ece846f8ed683a7ab99979d97f90e56f7f3816;p=bacula%2Fbacula bat: Go to the media info panel when double-click on job page or media list --- diff --git a/bacula/src/qt-console/bat.pro.in b/bacula/src/qt-console/bat.pro.in index fefd61410e..45b4d55505 100644 --- a/bacula/src/qt-console/bat.pro.in +++ b/bacula/src/qt-console/bat.pro.in @@ -147,7 +147,7 @@ SOURCES += help/help.cpp # Media info dialog HEADERS += mediainfo/mediainfo.h -HEADERS += mediainfo/mediainfo.cpp +SOURCES += mediainfo/mediainfo.cpp ## Status Dir HEADERS += status/dirstat.h diff --git a/bacula/src/qt-console/job/job.cpp b/bacula/src/qt-console/job/job.cpp index 5c8568ba1e..f95ae5b613 100644 --- a/bacula/src/qt-console/job/job.cpp +++ b/bacula/src/qt-console/job/job.cpp @@ -26,18 +26,10 @@ Switzerland, email:ftf@fsfeurope.org. */ -/* - * Version $Id$ - * - * Job Class - * - * Dirk Bartley, March 2007 - * - */ - #include "bat.h" #include "job.h" #include "util/fmtwidgetitem.h" +#include "mediainfo/mediainfo.h" Job::Job(QString &jobId, QTreeWidgetItem *parentTreeWidgetItem) { @@ -53,12 +45,22 @@ Job::Job(QString &jobId, QTreeWidgetItem *parentTreeWidgetItem) connect(pbRefresh, SIGNAL(clicked()), this, SLOT(populateAll())); connect(pbDelete, SIGNAL(clicked()), this, SLOT(deleteJob())); + connect(list_Volume, SIGNAL(itemDoubleClicked(QListWidgetItem*)), this, SLOT(showInfoVolume(QListWidgetItem *))); populateAll(); dockPage(); setCurrent(); } +void Job::showInfoVolume(QListWidgetItem *item) +{ + QString s= item->text(); + QTreeWidgetItem* pageSelectorTreeWidgetItem = mainWin->getFromHash(this); + + MediaInfo *m = new MediaInfo(pageSelectorTreeWidgetItem, s); + connect(m, SIGNAL(destroyed()), this, SLOT(populateTree())); +} + void Job::deleteJob() { if (QMessageBox::warning(this, "Bat", diff --git a/bacula/src/qt-console/job/job.h b/bacula/src/qt-console/job/job.h index 9074c237a5..2b3d046489 100644 --- a/bacula/src/qt-console/job/job.h +++ b/bacula/src/qt-console/job/job.h @@ -42,6 +42,7 @@ public: public slots: void populateAll(); void deleteJob(); + void showInfoVolume(QListWidgetItem *); private slots: diff --git a/bacula/src/qt-console/medialist/medialist.cpp b/bacula/src/qt-console/medialist/medialist.cpp index c3315e9a18..d956a4d7c0 100644 --- a/bacula/src/qt-console/medialist/medialist.cpp +++ b/bacula/src/qt-console/medialist/medialist.cpp @@ -285,7 +285,8 @@ void MediaList::showJobs() */ void MediaList::viewVolume() { - MediaInfo* view = new MediaInfo(mainWin->getFromHash(this), m_currentVolumeId); + QTreeWidgetItem *parentItem = mainWin->getFromHash(this); + MediaInfo* view = new MediaInfo(parentItem, m_currentVolumeName); connect(view, SIGNAL(destroyed()), this, SLOT(populateTree())); } diff --git a/bacula/technotes b/bacula/technotes index c61981288f..769f961a08 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,6 +2,8 @@ General: +04Aug09 +ebl bat: Go to the media info panel when double-click on job page or media list 03Aug09 ebl Add new media info panel to bat 02Aug09