HEADERS += select/select.h
SOURCES += select/select.cpp
-## BatStack
-HEADERS += batstack.h
-SOURCES += batstack.cpp
+## Pages
+HEADERS += pages.h
+SOURCES += pages.cpp
## MediaList
HEADERS += medialist/medialist.h
+++ /dev/null
-/*
- Bacula® - The Network Backup Solution
-
- Copyright (C) 2000-2007 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 two of the GNU General Public
- License as published by the Free Software Foundation plus additions
- that are listed 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 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.
-
- Bacula® is a registered trademark of John Walker.
- The licensor of Bacula is the Free Software Foundation Europe
- (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
- Switzerland, email:ftf@fsfeurope.org.
-*/
-/*
- * Version $Id: batstack.cpp 4230 2007-02-21 20:07:37Z kerns $
- *
- * Dirk Bartley, March 2007
- */
-
-#include "batstack.h"
-
-/*
- * AddTostack
- * This function is intended to be called from within the batstack class to pull
- * a window from floating to in the stack widget.
- */
-
-void BatStack::AddTostack()
-{
- /* These two lines are for making sure if it is being changed from a window
- * that it has the proper window flag and parent.
- */
- setWindowFlags(Qt::Widget);
- setParent(m_parent);
-
- /* This was being done already */
- m_parent->addWidget(this);
-
- /* Set stacked flag */
- m_stacked=true;
-}
-
-/*
- * AddTostack
- * This function is intended to be called from within the batstack class to put
- * a window from the stack widget to a floating window.
- */
-
-void BatStack::RemoveFromstack()
-{
- /* Change from a stacked widget to a normal window */
- m_parent->removeWidget(this);
- setWindowFlags(Qt::Window);
- showNormal();
- /* Clear stacked flag */
- m_stacked=false;
-}
-
-/*
- * This function is intended to be called with the subclasses. When it is called
- * the specific sublclass does not have to be known to BatStack. It is called
- * it will take it from it's current state of floating or stacked and change it
- * to the other.
- */
-
-void BatStack::Togglestack()
-{
- if( m_stacked ){
- RemoveFromstack();
- } else {
- AddTostack();
- }
-}
-
-/*
- * This function is because I wanted for some reason to keep it private but still
- * give any subclasses the ability to find out if it is currently stacked or not.
- */
-
-bool BatStack::isStacked()
-{
- return m_stacked;
-}
-
-/*
- * When a window is closed, this slot is called. The idea is to put it back in the
- * stack here, and it works. I wanted to get it to the top of the stack so that the
- * user immediately sees where his window went. Also, if he floats the window, then
- * closes it with the tree item highlighted, it may be confusing that the highlighted
- * treewidgetitem is not the stack item in the front.
- */
-
-void BatStack::closeEvent(QCloseEvent* /*event*/)
-{
- /* A Widget was closed, lets toggle it back into the window, and set it in front. */
- AddTostack();
-
-#ifdef xxx
- /* FIXME Really having problems getting it to the front,
- toggles back into the stack fine though */
- int stackindex=m_parent->indexOf( this );
- if( stackindex >= 0 ){
- show();
- m_parent->setCurrentIndex(stackindex);
-
- }
-#endif
-}
-
-/*
- * The next two are virtual functions. The idea here is that each subclass will have the
- * built in virtual function to override if the programmer wants to populate the window
- * when it it is first clicked.
- */
-void BatStack::PgSeltreeWidgetClicked(){
-}
-void BatStack::PgSeltreeWidgetDoubleClicked(){
-}
-
-/*
- * This function exists because I wanted to have an easy way for new programmers to understand
- * exactly what values needed to be set in order to behave correctly in the interface. It can
- * be called from the constructor, like with medialist or after being constructed, like with
- * Console.
- */
-void BatStack::SetPassedValues(QStackedWidget* passedStackedWidget, QTreeWidgetItem* passedTreeItem, int indexseq )
-{
- m_parent = passedStackedWidget;
- m_treeItem = passedTreeItem;
- m_treeItem->setData(0, Qt::UserRole, QVariant(indexseq));
-}
+++ /dev/null
-#ifndef _BATSTACK_H_
-#define _BATSTACK_H_
-/*
- Bacula® - The Network Backup Solution
-
- Copyright (C) 2000-2007 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 two of the GNU General Public
- License as published by the Free Software Foundation plus additions
- that are listed 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 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.
-
- Bacula® is a registered trademark of John Walker.
- The licensor of Bacula is the Free Software Foundation Europe
- (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
- Switzerland, email:ftf@fsfeurope.org.
-*/
-/*
- * Version $Id: batstack.h 4230 2007-02-21 20:07:37Z kerns $
- *
- * Dirk Bartley, March 2007
- */
-
-#include <QtGui>
-#include <QList>
-
-/*
- * The BatStack Class
- *
- * This class is inherited by all widget windows which are on the stack
- * It is for the purpos of having a conistant set of functions and properties
- * in all of the subclasses to accomplish tasks such as pulling a window out
- * of or into the stack. It also provides virtual functions placed called
- * from in mainwin so that subclasses can contain functions to allow them
- * to populate thier screens at the time of first viewing, (when clicked) as
- * opposed to the first creation of the console connection. After all the
- * console is not actually connected until after the page selector tree has been
- * populated.
- */
-
-class BatStack : public QWidget
-{
-public:
- void AddTostack();
- void RemoveFromstack();
- void Togglestack();
- bool isStacked();
- QStackedWidget *m_parent;
- QTreeWidgetItem *m_treeItem;
- void SetPassedValues(QStackedWidget*, QTreeWidgetItem*, int );
- virtual void PgSeltreeWidgetClicked();
- virtual void PgSeltreeWidgetDoubleClicked();
-
-public slots:
- /* closeEvent is a virtual function inherited from QWidget */
- virtual void closeEvent(QCloseEvent* event);
-
-private:
- bool m_stacked;
-};
-
-#endif /* _BATSTACK_H_ */
// m_timer = new QTimer(this);
// QWidget::connect(m_timer, SIGNAL(timeout()), this, SLOT(poll_messages()));
// m_timer->start(5000);
+}
+Console::~Console()
+{
}
void Console::poll_messages()
*/
#include <QtGui>
+#include "pages.h"
#include "ui_console.h"
#include "restore.h"
#include "select.h"
-#include "batstack.h"
#ifndef MAX_NAME_LENGTH
#define MAX_NAME_LENGTH 128
class JCR;
class CONRES;
-class Console : public BatStack, public Ui::ConsoleForm
+class Console : public Pages, public Ui::ConsoleForm
{
Q_OBJECT
public:
Console(QStackedWidget *parent);
+ ~Console();
void display_text(const char *buf);
void display_text(const QString buf);
void display_textf(const char *fmt, ...);
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ * Version $Id: joblist.h 4230 2007-02-21 20:07:37Z kerns $
+ *
+ * Dirk Bartley, March 2007
+ */
#include <QAbstractEventDispatcher>
+#include <QTableWidgetItem>
#include "bat.h"
#include "joblist.h"
-#include <QTableWidgetItem>
JobList::JobList(Console *console, QString &medianame)
{
/*
* Version $Id: joblist.h 4230 2007-02-21 20:07:37Z kerns $
*
- * Kern Sibbald, January 2007
+ * Dirk Bartley, March 2007
*/
#include <QtGui>
#include "ui_joblist.h"
#include "console.h"
-#include "batstack.h"
class JobList : public QWidget, public Ui::JobListForm
{
*/
#include "bat.h"
-#include "medialist/medialist.h"
MainWin::MainWin(QWidget *parent) : QMainWindow(parent)
{
item = createPage("Console", topItem);
m_console->SetPassedValues(stackedWidget, item, m_pages++ );
- /* Append to bstacklist */
- m_bstacklist.append(m_console);
+ /* Append to pageslist */
+ m_pageslist.append(m_console);
/* Set BatStack m_treeItem */
QBrush redBrush(Qt::red);
*/
/* brestore */
- m_bstacklist.append(new bRestore(stackedWidget,
- createPage("brestore", topItem), m_pages++ ));
+ m_pageslist.append(new bRestore(stackedWidget,
+ createPage("brestore", topItem), m_pages++ ));
+
/* lastly for now, the medialist */
- m_bstacklist.append(new MediaList(stackedWidget, m_console,
+ m_pageslist.append(new MediaList(stackedWidget, m_console,
createPage("Storage Tree", topItem ), m_pages++));
/* Iterate through and add to the stack */
- for (QList<BatStack*>::iterator bstackItem = m_bstacklist.begin();
- bstackItem != m_bstacklist.end(); ++bstackItem ) {
- (*bstackItem)->AddTostack();
+ for (QList<Pages*>::iterator pagesItem = m_pageslist.begin();
+ pagesItem != m_pageslist.end(); ++pagesItem ) {
+ (*pagesItem)->dockPage();
}
treeWidget->expandItem(topItem);
connect(actionLabel, SIGNAL(triggered()), this, SLOT(labelDialogClicked()));
connect(actionRun, SIGNAL(triggered()), this, SLOT(runDialogClicked()));
connect(actionRestore, SIGNAL(triggered()), this, SLOT(restoreDialogClicked()));
- connect(actionPullWindowOut, SIGNAL(triggered()), this, SLOT(floatWindowButton()));
+ connect(actionPullWindowOut, SIGNAL(triggered()), this, SLOT(undockWindowButton()));
}
/*
{
/* Use tree item's Qt::UserRole to get treeindex */
int treeindex = item->data(column, Qt::UserRole).toInt();
- int stackindex=stackedWidget->indexOf(m_bstacklist[treeindex]);
+ int stackindex=stackedWidget->indexOf(m_pageslist[treeindex]);
if( stackindex >= 0 ){
stackedWidget->setCurrentIndex(stackindex);
}
/* run the virtual function in case this class overrides it */
- m_bstacklist[treeindex]->PgSeltreeWidgetClicked();
+ m_pageslist[treeindex]->PgSeltreeWidgetClicked();
}
/*
int treeindex = item->data(column, Qt::UserRole).toInt();
/* Use tree item's Qt::UserRole to get treeindex */
- if ( m_bstacklist[treeindex]->isStacked() == true ){
- m_bstackpophold=m_bstacklist[treeindex];
+ if (m_pageslist[treeindex]->isDocked()) {
+ m_pagespophold = m_pageslist[treeindex];
/* Create a popup menu before floating window */
QMenu *popup = new QMenu( treeWidget );
- connect(popup->addAction("Float Window"), SIGNAL(triggered()), this,
- SLOT(floatWindow()));
+ connect(popup->addAction("Undock Window"), SIGNAL(triggered()), this,
+ SLOT(undockWindow()));
popup->exec(QCursor::pos());
} else {
/* Just pull it back in without prompting */
- m_bstacklist[treeindex]->Togglestack();
+ m_pageslist[treeindex]->togglePageDocking();
}
/* Here is the virtual function so that different classes can do different things */
- m_bstacklist[treeindex]->PgSeltreeWidgetDoubleClicked();
+ m_pageslist[treeindex]->PgSeltreeWidgetDoubleClicked();
}
void MainWin::labelDialogClicked()
statusBar()->showMessage(buf);
}
-void MainWin::floatWindow()
+void MainWin::undockWindow()
{
- m_bstackpophold->Togglestack();
+ m_pagespophold->togglePageDocking();
}
-void MainWin::floatWindowButton()
+void MainWin::undockWindowButton()
{
int curindex = stackedWidget->currentIndex();
- QList<BatStack*>::iterator bstackItem = m_bstacklist.begin();
+ QList<Pages *>::iterator pagesItem = m_pageslist.begin();
- while ((bstackItem != m_bstacklist.end())){
- if (curindex == stackedWidget->indexOf(*bstackItem)) {
- (*bstackItem)->Togglestack();
+ while ((pagesItem != m_pageslist.end())){
+ if (curindex == stackedWidget->indexOf(*pagesItem)) {
+ (*pagesItem)->togglePageDocking();
break;
}
- ++bstackItem;
+ ++pagesItem;
}
}
#include <QtGui>
#include <QList>
+#include "pages.h"
#include "ui_main.h"
#include "label/label.h"
#include "run/run.h"
void labelDialogClicked();
void runDialogClicked();
void restoreDialogClicked();
- void floatWindow();
- void floatWindowButton();
+ void undockWindow();
+ void undockWindowButton();
protected:
void closeEvent(QCloseEvent *event);
private:
Console *m_console;
- BatStack *m_bstackpophold;
- QList<BatStack*> m_bstacklist;
- QList<BatStack*> m_bstackindex;
+ Pages *m_pagespophold;
+ QList<Pages*> m_pageslist;
+ QList<Pages*> m_pagesindex;
QStringList m_cmd_history;
int m_cmd_last;
int m_pages;
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ * Version $Id: batstack.h 4230 2007-02-21 20:07:37Z kerns $
+ *
+ * Dirk Bartley, March 2007
+ */
#include <QAbstractEventDispatcher>
+#include <QTableWidgetItem>
#include "bat.h"
#include "mediaedit.h"
-#include <QTableWidgetItem>
MediaEdit::MediaEdit(Console *console, QString &medianame)
{
(FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
Switzerland, email:ftf@fsfeurope.org.
*/
+/*
+ * Version $Id: batstack.h 4230 2007-02-21 20:07:37Z kerns $
+ *
+ * Dirk Bartley, March 2007
+ */
#include <QtGui>
#include "ui_mediaedit.h"
*
* MediaList Class
*
- * Kern Sibbald, January MMVI
+ * Dirk Bartley, March 2007
*
*/
#include <QAbstractEventDispatcher>
+#include <QMenu>
#include "bat.h"
#include "medialist.h"
#include "mediaedit/mediaedit.h"
#include "joblist/joblist.h"
-#include <QMenu>
MediaList::MediaList(QStackedWidget *parent, Console *console, QTreeWidgetItem *treeItem, int indexseq)
{
int recorditemcnter=0;
/* Iterate through items in the record */
QString mediarecorditem;
- foreach( mediarecorditem, recorditemlist ){
- QString trimmeditem = mediarecorditem.trimmed();
- if( trimmeditem != "" ){
- if ( recorditemcnter == 0 ){
- if ( currentpool != trimmeditem.toUtf8().data() ){
- currentpool = trimmeditem.toUtf8().data();
- pooltreeitem = new QTreeWidgetItem(topItem);
- pooltreeitem->setText(0, trimmeditem.toUtf8().data());
- pooltreeitem->setData(0, Qt::UserRole, 1);
- pooltreeitem->setExpanded( true );
- }
- mediatreeitem = new QTreeWidgetItem(pooltreeitem);
- } else {
- mediatreeitem->setData(recorditemcnter-1, Qt::UserRole, 2);
- mediatreeitem->setText(recorditemcnter-1, trimmeditem.toUtf8().data());
+ foreach( mediarecorditem, recorditemlist ){
+ QString trimmeditem = mediarecorditem.trimmed();
+ if( trimmeditem != "" ){
+ if ( recorditemcnter == 0 ){
+ if ( currentpool != trimmeditem.toUtf8().data() ){
+ currentpool = trimmeditem.toUtf8().data();
+ pooltreeitem = new QTreeWidgetItem(topItem);
+ pooltreeitem->setText(0, trimmeditem.toUtf8().data());
+ pooltreeitem->setData(0, Qt::UserRole, 1);
+ pooltreeitem->setExpanded( true );
+ }
+ mediatreeitem = new QTreeWidgetItem(pooltreeitem);
+ } else {
+ mediatreeitem->setData(recorditemcnter-1, Qt::UserRole, 2);
+ mediatreeitem->setText(recorditemcnter-1, trimmeditem.toUtf8().data());
}
- recorditemcnter+=1;
- }
+ recorditemcnter+=1;
+ }
}
recordcounter+=1;
}
void MediaList::createConnections()
{
connect(treeWidget, SIGNAL(itemPressed(QTreeWidgetItem *, int)), this,
- SLOT(treeItemClicked(QTreeWidgetItem *, int)));
+ SLOT(treeItemClicked(QTreeWidgetItem *, int)));
connect(treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this,
- SLOT(treeItemDoubleClicked(QTreeWidgetItem *, int)));
+ SLOT(treeItemDoubleClicked(QTreeWidgetItem *, int)));
}
void MediaList::treeItemClicked(QTreeWidgetItem *item, int column)
QString text = item->text(0);
switch (treedepth){
case 1:
- break;
+ break;
case 2:
- /* Can't figure out how to make a right button do this --- Qt::LeftButton, Qt::RightButton, Qt::MidButton */
- *m_popupmedia = text;
- QMenu *popup = new QMenu( m_treeWidget );
- connect(popup->addAction("Edit Properties"), SIGNAL(triggered()), this, SLOT(editMedia()));
- connect(popup->addAction("Show Jobs On Media"), SIGNAL(triggered()), this, SLOT(showJobs()));
- popup->exec(QCursor::pos());
+ /* Can't figure out how to make a right button do this --- Qt::LeftButton, Qt::RightButton, Qt::MidButton */
+ *m_popupmedia = text;
+ QMenu *popup = new QMenu( m_treeWidget );
+ connect(popup->addAction("Edit Properties"), SIGNAL(triggered()), this, SLOT(editMedia()));
+ connect(popup->addAction("Show Jobs On Media"), SIGNAL(triggered()), this, SLOT(showJobs()));
+ popup->exec(QCursor::pos());
}
}
/*
* Version $Id: medialist.h 4230 2007-02-21 20:07:37Z kerns $
*
- * Kern Sibbald, January 2007
+ * Dirk Bentley, March 2007
*/
#include <QtGui>
#include "ui_medialist.h"
#include "console.h"
#include <qstringlist.h>
-#include "batstack.h"
-class MediaList : public BatStack, public Ui::MediaListForm
+class MediaList : public Pages, public Ui::MediaListForm
{
Q_OBJECT
--- /dev/null
+/*
+ Bacula® - The Network Backup Solution
+
+ Copyright (C) 2000-2007 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 two of the GNU General Public
+ License as published by the Free Software Foundation plus additions
+ that are listed 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 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.
+
+ Bacula® is a registered trademark of John Walker.
+ The licensor of Bacula is the Free Software Foundation Europe
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ * Version $Id: batstack.cpp 4230 2007-02-21 20:07:37Z kerns $
+ *
+ * Dirk Bartley, March 2007
+ */
+
+#include "pages.h"
+
+/*
+ * dockPage
+ * This function is intended to be called from within the Pages class to pull
+ * a window from floating to in the stack widget.
+ */
+
+void Pages::dockPage()
+{
+ /* These two lines are for making sure if it is being changed from a window
+ * that it has the proper window flag and parent.
+ */
+ setWindowFlags(Qt::Widget);
+ setParent(m_parent);
+
+ /* This was being done already */
+ m_parent->addWidget(this);
+
+ /* Set docked flag */
+ m_docked = true;
+}
+
+/*
+ * undockPage
+ * This function is intended to be called from within the Pages class to put
+ * a window from the stack widget to a floating window.
+ */
+
+void Pages::undockPage()
+{
+ /* Change from a stacked widget to a normal window */
+ m_parent->removeWidget(this);
+ setWindowFlags(Qt::Window);
+ showNormal();
+ /* Clear docked flag */
+ m_docked = false;
+}
+
+/*
+ * This function is intended to be called with the subclasses. When it is called
+ * the specific sublclass does not have to be known to Pages. It is called
+ * it will take it from it's current state of floating or stacked and change it
+ * to the other.
+ */
+
+void Pages::togglePageDocking()
+{
+ if (m_docked) {
+ undockPage();
+ } else {
+ dockPage();
+ }
+}
+
+/*
+ * This function is because I wanted for some reason to keep it private but still
+ * give any subclasses the ability to find out if it is currently stacked or not.
+ */
+
+bool Pages::isDocked()
+{
+ return m_docked;
+}
+
+/*
+ * When a window is closed, this slot is called. The idea is to put it back in the
+ * stack here, and it works. I wanted to get it to the top of the stack so that the
+ * user immediately sees where his window went. Also, if he floats the window, then
+ * closes it with the tree item highlighted, it may be confusing that the highlighted
+ * treewidgetitem is not the stack item in the front.
+ */
+
+void Pages::closeEvent(QCloseEvent* /*event*/)
+{
+ /* A Widget was closed, lets toggle it back into the window, and set it in front. */
+ dockPage();
+
+#ifdef xxx
+ /* FIXME Really having problems getting it to the front,
+ toggles back into the stack fine though */
+ int stackindex=m_parent->indexOf( this );
+ if( stackindex >= 0 ){
+ show();
+ m_parent->setCurrentIndex(stackindex);
+
+ }
+#endif
+}
+
+/*
+ * The next two are virtual functions. The idea here is that each subclass will have the
+ * built in virtual function to override if the programmer wants to populate the window
+ * when it it is first clicked.
+ */
+void Pages::PgSeltreeWidgetClicked()
+{
+}
+
+void Pages::PgSeltreeWidgetDoubleClicked()
+{
+}
+
+/*
+ * This function exists because I wanted to have an easy way for new programmers to understand
+ * exactly what values needed to be set in order to behave correctly in the interface. It can
+ * be called from the constructor, like with medialist or after being constructed, like with
+ * Console.
+ */
+void Pages::SetPassedValues(QStackedWidget* passedStackedWidget, QTreeWidgetItem* passedTreeItem, int indexseq )
+{
+ m_parent = passedStackedWidget;
+ m_treeItem = passedTreeItem;
+ m_treeItem->setData(0, Qt::UserRole, QVariant(indexseq));
+}
--- /dev/null
+#ifndef _PAGES_H_
+#define _PAGES_H_
+/*
+ Bacula® - The Network Backup Solution
+
+ Copyright (C) 2000-2007 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 two of the GNU General Public
+ License as published by the Free Software Foundation plus additions
+ that are listed 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 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.
+
+ Bacula® is a registered trademark of John Walker.
+ The licensor of Bacula is the Free Software Foundation Europe
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ * Version $Id: batstack.h 4230 2007-02-21 20:07:37Z kerns $
+ *
+ * Dirk Bartley, March 2007
+ */
+
+#include <QtGui>
+#include <QList>
+
+/*
+ * The Pages Class
+ *
+ * This class is inherited by all widget windows which are on the stack
+ * It is for the purpos of having a conistant set of functions and properties
+ * in all of the subclasses to accomplish tasks such as pulling a window out
+ * of or into the stack. It also provides virtual functions placed called
+ * from in mainwin so that subclasses can contain functions to allow them
+ * to populate thier screens at the time of first viewing, (when clicked) as
+ * opposed to the first creation of the console connection. After all the
+ * console is not actually connected until after the page selector tree has been
+ * populated.
+ */
+
+class Pages : public QWidget
+{
+public:
+ void dockPage();
+ void undockPage();
+ void togglePageDocking();
+ bool isDocked();
+ QStackedWidget *m_parent;
+ QTreeWidgetItem *m_treeItem;
+ void SetPassedValues(QStackedWidget*, QTreeWidgetItem*, int );
+ virtual void PgSeltreeWidgetClicked();
+ virtual void PgSeltreeWidgetDoubleClicked();
+
+public slots:
+ /* closeEvent is a virtual function inherited from QWidget */
+ virtual void closeEvent(QCloseEvent* event);
+
+private:
+ bool m_docked;
+};
+
+#endif /* _PAGES_H_ */
(void)parent;
setupUi(this);
}
+
+bRestore::~bRestore()
+{
+}
*/
#include <QtGui>
+#include "pages.h"
#include "ui_brestore.h"
#include "ui_restore.h"
#include "ui_prerestore.h"
-#include "batstack.h"
class Console;
};
-class bRestore : public BatStack, public Ui::bRestoreForm
+class bRestore : public Pages, public Ui::bRestoreForm
{
Q_OBJECT
public:
bRestore(QStackedWidget *parent, QTreeWidgetItem *treeItem, int indexseq);
+ ~bRestore();
public slots: