2 Bacula® - The Network Backup Solution
4 Copyright (C) 2007-2014 Free Software Foundation Europe e.V.
6 The main author of Bacula is Kern Sibbald, with contributions from many
7 others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 Bacula® is a registered trademark of Kern Sibbald.
19 * qt-console main window class definition.
21 * Written by Kern Sibbald, January MMVII
34 class MainWin : public QMainWindow, public Ui::MainForm
39 MainWin(QWidget *parent = 0);
40 void set_statusf(const char *fmt, ...);
41 void set_status_ready();
42 void set_status(const char *buf);
43 void set_status(const QString &str);
46 void resetFocus() { lineEdit->setFocus(); };
47 void hashInsert(QTreeWidgetItem *, Pages *);
48 void hashRemove(Pages *);
49 void hashRemove(QTreeWidgetItem *, Pages *);
50 void setMessageIcon();
51 bool getWaitState() {return m_waitState; };
52 bool isClosing() {return m_isClosing; };
53 Console *currentConsole();
54 QTreeWidgetItem *currentTopItem();
55 Pages* getFromHash(QTreeWidgetItem *);
56 QTreeWidgetItem* getFromHash(Pages *);
57 /* This hash is to get the page when the page selector widget is known */
58 QHash<QTreeWidgetItem*,Pages*> m_pagehash;
59 /* This hash is to get the page selector widget when the page is known */
60 QHash<Pages*,QTreeWidgetItem*> m_widgethash;
61 /* This is a list of consoles */
62 QHash<QTreeWidgetItem*,Console*> m_consoleHash;
63 void createPageJobList(const QString &, const QString &,
64 const QString &, const QString &, QTreeWidgetItem *);
66 /* Begin Preferences variables */
73 bool m_recordLimitCheck;
75 bool m_daysLimitCheck;
78 int m_checkMessagesInterval;
81 bool m_rtDirCurICDebug;
83 bool m_rtFileTabICDebug;
84 bool m_rtVerTabICDebug;
85 bool m_rtUpdateFTDebug;
86 bool m_rtUpdateVTDebug;
88 bool m_rtIconStateDebug;
89 bool m_rtRestore1Debug;
90 bool m_rtRestore2Debug;
91 bool m_rtRestore3Debug;
97 bool m_notify; /* global flag to turn on/off all notifiers */
103 void treeItemClicked(QTreeWidgetItem *item, int column);
104 void labelButtonClicked();
105 void runButtonClicked();
106 void estimateButtonClicked();
107 void browseButtonClicked();
108 void statusPageButtonClicked();
109 void jobPlotButtonClicked();
110 void restoreButtonClicked();
111 void undockWindowButton();
112 void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
113 void stackItemChanged(int);
114 void toggleDockContextWindow();
115 void closePage(int item);
116 void closeCurrentPage();
117 void setPreferences();
118 void readPreferences();
122 void reloadRepopLists();
124 void goToPreviousPage();
127 void closeEvent(QCloseEvent *event);
128 void keyPressEvent(QKeyEvent *event);
131 void connectConsole();
133 void connectSignals();
134 void disconnectSignals();
135 void connectConsoleSignals();
136 void disconnectConsoleSignals(Console *console);
139 Console *m_currentConsole;
140 Pages *m_pagespophold;
141 QStringList m_cmd_history;
143 QTreeWidgetItem *m_firstItem;
144 QTreeWidgetItem *m_waitTreeItem;
148 QList<QTreeWidgetItem *> m_treeWidgetStack;
149 bool m_treeStackTrap;
152 #include "ui_prefs.h"
154 class prefsDialog : public QDialog, public Ui::PrefsForm
166 #endif /* _MAINWIN_H_ */