5
* Created on: Aug 7, 2009
7
* Copyright (c) 2009 Jacob Dekel
8
* $Id: MainWindow.h 34 2009-11-07 06:15:58Z jacob $
12
* This program is free software: you can redistribute it and/or modify
13
* it under the terms of the GNU General Public License as published by
14
* the Free Software Foundation, either version 3 of the License, or
15
* (at your option) any later version.
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* You should have received a copy of the GNU General Public License
23
* along with this program. If not, see <http://www.gnu.org/licenses/>.
30
#include <QtGui/QMainWindow>
31
#include "HerculesStudio.h"
32
#include "ui_MainWindow.h"
33
#include "MainPanel.h"
34
#include "DevicesPane.h"
35
#include "CommandLine.h"
39
#include "HerculesExecutor.h"
40
#include "LogRunner.h"
41
#include "StatusRunner.h"
42
#include "Preferences.h"
45
#include "ConfigFile.h"
46
#include "Configuration.h"
48
#include <QSystemTrayIcon>
49
#include <QWaitCondition>
52
class HerculesExecutor;
55
class MainWindow : public QMainWindow
60
MainWindow(QWidget *parent = 0);
61
virtual ~MainWindow();
63
bool issueCommand(const std::string& command);
64
ConfigFile * getConfigurationFile();
67
Ui::MainWindowClass ui;
68
QDockWidget * mTopDock;
69
QDockWidget * mDevicesDock;
70
QDockWidget * mBottomDock;
71
QDockWidget * mGRegisters32Dock;
72
QDockWidget * mCRegisters32Dock;
73
QDockWidget * mFRegisters32Dock;
74
QDockWidget * mARegisters32Dock;
75
QDockWidget * mGRegisters64Dock;
76
QDockWidget * mCRegisters64Dock;
77
QDockWidget * mFRegisters64Dock;
78
QDockWidget * mPswDock;
80
Configuration * mConfiguration;
81
ConfigFile * mConfigFile;
82
PlainLogWidget * mLogWindow;
83
QSystemTrayIcon * mSystemTrayIcon;
84
MainPanel * mMainPanel;
85
DevicesPane * mDevicesPane;
86
CommandLine * mCommandLine;
88
Regs32 * mGRegisters32;
89
Regs32 * mCRegisters32;
90
Regs32 * mFRegisters32;
91
Regs32 * mARegisters32;
92
Regs64 * mGRegisters64;
93
Regs64 * mCRegisters64;
94
Regs64 * mFRegisters64;
95
SynchronizedQueue mLogQueue;
96
SynchronizedQueue mStatusQueue;
97
HerculesExecutor * mHerculesExecutor;
98
LogRunner * mLogRunner;
99
StatusRunner * mStatusRunner;
100
Preferences * mPreferences;
101
Watchdog * mWatchdog;
102
bool mHerculesActive;
103
bool mMinimizeOnClose;
105
bool mDevicesRecovery;
106
bool mDevicesRecoveryCommenced;
107
bool mSystrayHintEjected;
108
QString mRecoveryConfig;
109
QString mCurrentPath;
110
QString mAdHocLoadParm;
122
void restartDevices();
124
// menu-related slots
132
void loadCommandDoIpl(const QString& devNo, const QString& loadParm);
133
void editViewControls();
134
void editViewDevices();
135
void editViewCommand();
136
void editView32BitGr();
137
void editView32BitCr();
138
void editView32BitFr();
139
void editView32BitAr();
140
void editView64BitGr();
141
void editView64BitCr();
142
void editView64BitFr();
152
void writeToLogFromQueue();
153
void writeToLog(QString line);
157
void dispatchStatus();
159
void herculesEndedSlot();
160
void deleteMessages();
161
void saveMessages(bool autosave=false);
164
void closeEvent(QCloseEvent * event);
165
void systrayClick(QSystemTrayIcon::ActivationReason);
167
void recoverDevices(std::string& statusLine);
170
#endif // MAINWINDOW_H