]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/qt-console/medialist/medialist.cpp
Backport from BEE
[bacula/bacula] / bacula / src / qt-console / medialist / medialist.cpp
index 670241f381246ea717b9b9b11dbf2fac354d9fb4..262784073a3b2a4a6753eba381922d7fdb6706b3 100644 (file)
@@ -3,35 +3,23 @@
 
    Copyright (C) 2007-2010 Free Software Foundation Europe e.V.
 
-   The main author of Bacula is Kern Sibbald, with contributions from
-   many others, a complete list can be found in the file AUTHORS.
-   This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version three of the GNU Affero General Public
-   License as published by the Free Software Foundation and included
-   in the file LICENSE.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU Affero General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301, USA.
+   The main author of Bacula is Kern Sibbald, with contributions from many
+   others, a complete list can be found in the file AUTHORS.
+
+   You may use this file and others of this release according to the
+   license defined in the LICENSE file, which includes the Affero General
+   Public License, v3.0 ("AGPLv3") and some additional permissions and
+   terms pursuant to its AGPLv3 Section 7.
 
    Bacula® is a registered trademark of Kern Sibbald.
-   The licensor of Bacula is the Free Software Foundation Europe
-   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
-   Switzerland, email:ftf@fsfeurope.org.
 */
+
 /*
  *  MediaList Class
  *
  *   Dirk Bartley, March 2007
  *
- */ 
+ */
 
 #include "bat.h"
 #include <QAbstractEventDispatcher>
@@ -69,7 +57,7 @@ MediaList::~MediaList()
 }
 
 /*
- * The main meat of the class!!  The function that querries the director and 
+ * The main meat of the class!!  The function that querries the director and
  * creates the widgets with appropriate values.
  */
 void MediaList::populateTree()
@@ -98,7 +86,7 @@ void MediaList::populateTree()
    m_topItem->setText(0, tr("Pools"));
    m_topItem->setData(0, Qt::UserRole, 0);
    m_topItem->setExpanded(true);
-   
+
    mp_treeWidget->setHeaderLabels(headerlist);
 
    QSettings settings(m_console->m_dir->name(), "bat");
@@ -172,15 +160,15 @@ void MediaList::populateTree()
 
             int index = 0;
             TreeItemFormatter mediaitem(*pooltreeitem, 2);
-  
+
             /* Iterate through fields in the record */
             QStringListIterator fld(fieldlist);
 
             /* volname */
-            mediaitem.setTextFld(index++, fld.next()); 
+            mediaitem.setTextFld(index++, fld.next());
 
             /* id */
-            mediaitem.setNumericFld(index++, fld.next()); 
+            mediaitem.setNumericFld(index++, fld.next());
 
             /* status */
             mediaitem.setVolStatusFld(index++, fld.next());
@@ -192,24 +180,24 @@ void MediaList::populateTree()
             mediaitem.setBytesFld(index++, fld.next());
 
             /* files */
-            mediaitem.setNumericFld(index++, fld.next()); 
+            mediaitem.setNumericFld(index++, fld.next());
 
             /* jobs */
-            mediaitem.setNumericFld(index++, fld.next()); 
+            mediaitem.setNumericFld(index++, fld.next());
 
             /* retention */
             mediaitem.setDurationFld(index++, fld.next());
 
             /* media type */
-            mediaitem.setTextFld(index++, fld.next()); 
+            mediaitem.setTextFld(index++, fld.next());
 
             /* inchanger + slot */
             int inchanger = fld.next().toInt();
             if (inchanger) {
-               mediaitem.setNumericFld(index++, fld.next()); 
+               mediaitem.setNumericFld(index++, fld.next());
             } else {
                /* volume not in changer, show blank slot */
-               mediaitem.setNumericFld(index++, ""); 
+               mediaitem.setNumericFld(index++, "");
                fld.next();
             }
 
@@ -217,10 +205,10 @@ void MediaList::populateTree()
             mediaitem.setDurationFld(index++, fld.next());
 
             /* max jobs */
-            mediaitem.setNumericFld(index++, fld.next()); 
+            mediaitem.setNumericFld(index++, fld.next());
 
             /* max files */
-            mediaitem.setNumericFld(index++, fld.next()); 
+            mediaitem.setNumericFld(index++, fld.next());
 
             /* max bytes */
             mediaitem.setBytesFld(index++, fld.next());
@@ -229,10 +217,10 @@ void MediaList::populateTree()
             mediaitem.setBoolFld(index++, fld.next());
 
             /* last written */
-            mediaitem.setTextFld(index++, fld.next()); 
+            mediaitem.setTextFld(index++, fld.next());
 
             /* first written */
-            mediaitem.setTextFld(index++, fld.next()); 
+            mediaitem.setTextFld(index++, fld.next());
 
             /* read time */
             mediaitem.setDurationFld(index++, fld.next());
@@ -241,10 +229,10 @@ void MediaList::populateTree()
             mediaitem.setDurationFld(index++, fld.next());
 
             /* Recycle Count */
-            mediaitem.setNumericFld(index++, fld.next()); 
+            mediaitem.setNumericFld(index++, fld.next());
 
             /* recycle pool */
-            mediaitem.setTextFld(index++, fld.next()); 
+            mediaitem.setTextFld(index++, fld.next());
 
          } /* foreach resultline */
          counter += 1;
@@ -334,8 +322,8 @@ void MediaList::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetI
    }
 }
 
-/* 
- * Setup a context menu 
+/*
+ * Setup a context menu
  * Made separate from populate so that it would not create context menu over and
  * over as the tree is repopulated.
  */