]> git.sur5r.net Git - bacula/bacula/commitdiff
bat: Go to the media info panel when double-click on job page or media list
authorEric Bollengier <eric@eb.homelinux.org>
Tue, 4 Aug 2009 09:29:24 +0000 (11:29 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Tue, 4 Aug 2009 09:29:24 +0000 (11:29 +0200)
bacula/src/qt-console/bat.pro.in
bacula/src/qt-console/job/job.cpp
bacula/src/qt-console/job/job.h
bacula/src/qt-console/medialist/medialist.cpp
bacula/technotes

index fefd61410e39dc36692f72246a5c414e155ac3ef..45b4d555057b32bf902b0f9a9e644263d8a81578 100644 (file)
@@ -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
index 5c8568ba1e2c632f2bd2185725d350cf634c6ad8..f95ae5b613d3157dfb77024773e71af9cffe2871 100644 (file)
    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",
index 9074c237a55ec2617f8d8e637670e1b420211806..2b3d04648995c9b427f800ffe749a56946494a89 100644 (file)
@@ -42,6 +42,7 @@ public:
 public slots:
    void populateAll();
    void deleteJob();
+   void showInfoVolume(QListWidgetItem *);
 
 private slots:
 
index c3315e9a181368f48958ae352daa0bc6ee1e3e59..d956a4d7c0e727e002882137ba804e2f059a98ee 100644 (file)
@@ -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()));
 
 }
index c61981288f40a0ad99f45e79183d828be764d73e..769f961a08988b134feca5a3ba85c2be6e78bb14 100644 (file)
@@ -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