X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fqt-console%2Fmainwin.h;h=c0cabd3b0769d0d682b21325c651aca32a88a08d;hb=e72538600e7a0dd4a07fa9066bb6eefa3645ef0c;hp=3c4b6c9fb7f73ddd43e97836c2d68d47d14e7897;hpb=09a24a460b0b606050a4470e738859dfad94e947;p=bacula%2Fbacula diff --git a/bacula/src/qt-console/mainwin.h b/bacula/src/qt-console/mainwin.h index 3c4b6c9fb7..c0cabd3b07 100644 --- a/bacula/src/qt-console/mainwin.h +++ b/bacula/src/qt-console/mainwin.h @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2000-2007 Free Software Foundation Europe e.V. + Copyright (C) 2007-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. @@ -25,19 +25,27 @@ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich, Switzerland, email:ftf@fsfeurope.org. */ - /* + * Version $Id$ + * * qt-console main window class definition. * - * Written by Kern Sibbald, January MMVI + * Written by Kern Sibbald, January MMVII */ #ifndef _MAINWIN_H_ #define _MAINWIN_H_ #include +#include +#include "pages.h" #include "ui_main.h" #include "label/label.h" +#include "run/run.h" +#include "restore/restore.h" +#include "medialist/medialist.h" +#include "joblist/joblist.h" +#include "clients/clients.h" class Console; @@ -52,6 +60,24 @@ public: void set_status(const char *buf); void writeSettings(); void readSettings(); + void resetFocus() { lineEdit->setFocus(); }; + void setContextMenuDockText(); + void setContextMenuDockText(Pages *, QTreeWidgetItem *); + void setTreeWidgetItemDockColor(Pages *, QTreeWidgetItem *); + void setTreeWidgetItemDockColor(Pages *); + void hashInsert(QTreeWidgetItem *, Pages *); + void hashRemove(Pages *); + void hashRemove(QTreeWidgetItem *, Pages *); + QTreeWidgetItem *topItem() { return m_topItem; }; + Console *console() { return m_console; }; + Pages* getFromHash(QTreeWidgetItem *); + QTreeWidgetItem* getFromHash(Pages *); + /* This hash is to get the page when the page selector widget is known */ + QHash m_pagehash; + /* This hash is to get the page selector widget when the page is known */ + QHash m_widgethash; + void createPageJobList(QString &, QString &, QTreeWidgetItem *parent, + Console *console); public slots: void input_line(); @@ -59,16 +85,33 @@ public slots: void treeItemClicked(QTreeWidgetItem *item, int column); void treeItemDoubleClicked(QTreeWidgetItem *item, int column); void labelDialogClicked(); + void runDialogClicked(); + void restoreDialogClicked(); + void undockWindowButton(); + void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *); + void stackItemChanged(int); + void toggleDockContextWindow(); + void closePage(); protected: void closeEvent(QCloseEvent *event); + void keyPressEvent(QKeyEvent *event); private: void createConnections(); + void createPages(); + QTreeWidgetItem *createTopPage(char *name); + QTreeWidgetItem *createPage(char *name, QTreeWidgetItem *parent); + void createPagebRestore(QTreeWidgetItem *parent, Console *console); + void createPageMediaList(QTreeWidgetItem *parent, Console *console); + void createPageClients(QTreeWidgetItem *parent, Console *console); private: - QString m_UserInput; Console *m_console; + QTreeWidgetItem *m_topItem; + Pages *m_pagespophold; + QStringList m_cmd_history; + int m_cmd_last; }; #endif /* _MAINWIN_H_ */