2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2015 Kern Sibbald
5 Copyright (C) 2007-2014 Free Software Foundation Europe e.V.
7 The original author of Bacula is Kern Sibbald, with contributions
8 from many others, a complete list can be found in the file AUTHORS.
10 You may use this file and others of this release according to the
11 license defined in the LICENSE file, which includes the Affero General
12 Public License, v3.0 ("AGPLv3") and some additional permissions and
13 terms pursuant to its AGPLv3 Section 7.
15 This notice must be preserved when any source code is
16 conveyed and/or propagated.
18 Bacula(R) is a registered trademark of Kern Sibbald.
21 * qt-console main window class definition.
23 * Written by Kern Sibbald, January MMVII
36 class MainWin : public QMainWindow, public Ui::MainForm
41 MainWin(QWidget *parent = 0);
42 void set_statusf(const char *fmt, ...);
43 void set_status_ready();
44 void set_status(const char *buf);
45 void set_status(const QString &str);
48 void resetFocus() { lineEdit->setFocus(); };
49 void hashInsert(QTreeWidgetItem *, Pages *);
50 void hashRemove(Pages *);
51 void hashRemove(QTreeWidgetItem *, Pages *);
52 void setMessageIcon();
53 bool getWaitState() {return m_waitState; };
54 bool isClosing() {return m_isClosing; };
55 Console *currentConsole();
56 QTreeWidgetItem *currentTopItem();
57 Pages* getFromHash(QTreeWidgetItem *);
58 QTreeWidgetItem* getFromHash(Pages *);
59 /* This hash is to get the page when the page selector widget is known */
60 QHash<QTreeWidgetItem*,Pages*> m_pagehash;
61 /* This hash is to get the page selector widget when the page is known */
62 QHash<Pages*,QTreeWidgetItem*> m_widgethash;
63 /* This is a list of consoles */
64 QHash<QTreeWidgetItem*,Console*> m_consoleHash;
65 void createPageJobList(const QString &, const QString &,
66 const QString &, const QString &, QTreeWidgetItem *);
68 /* Begin Preferences variables */
75 bool m_recordLimitCheck;
77 bool m_daysLimitCheck;
80 int m_checkMessagesInterval;
83 bool m_rtDirCurICDebug;
85 bool m_rtFileTabICDebug;
86 bool m_rtVerTabICDebug;
87 bool m_rtUpdateFTDebug;
88 bool m_rtUpdateVTDebug;
90 bool m_rtIconStateDebug;
91 bool m_rtRestore1Debug;
92 bool m_rtRestore2Debug;
93 bool m_rtRestore3Debug;
99 bool m_notify; /* global flag to turn on/off all notifiers */
105 void treeItemClicked(QTreeWidgetItem *item, int column);
106 void labelButtonClicked();
107 void runButtonClicked();
108 void estimateButtonClicked();
109 void browseButtonClicked();
110 void statusPageButtonClicked();
111 void jobPlotButtonClicked();
112 void restoreButtonClicked();
113 void undockWindowButton();
114 void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
115 void stackItemChanged(int);
116 void toggleDockContextWindow();
117 void closePage(int item);
118 void closeCurrentPage();
119 void setPreferences();
120 void readPreferences();
124 void reloadRepopLists();
126 void goToPreviousPage();
129 void closeEvent(QCloseEvent *event);
130 void keyPressEvent(QKeyEvent *event);
133 void connectConsole();
135 void connectSignals();
136 void disconnectSignals();
137 void connectConsoleSignals();
138 void disconnectConsoleSignals(Console *console);
141 Console *m_currentConsole;
142 Pages *m_pagespophold;
143 QStringList m_cmd_history;
145 QTreeWidgetItem *m_firstItem;
146 QTreeWidgetItem *m_waitTreeItem;
150 QList<QTreeWidgetItem *> m_treeWidgetStack;
151 bool m_treeStackTrap;
154 #include "ui_prefs.h"
156 class prefsDialog : public QDialog, public Ui::PrefsForm
168 #endif /* _MAINWIN_H_ */