~ubuntu-branches/ubuntu/oneiric/herculesstudio/oneiric

« back to all changes in this revision

Viewing changes to HercStudio/MainWindow.h

  • Committer: Bazaar Package Importer
  • Author(s): Liang Guo
  • Date: 2011-04-10 02:47:38 UTC
  • Revision ID: james.westby@ubuntu.com-20110410024738-f61r77k8v33h5a63
Tags: upstream-1.2.0
ImportĀ upstreamĀ versionĀ 1.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  File:       mainwindow.h
 
3
 *
 
4
 *  Author:     Jacob Dekel
 
5
 *  Created on: Aug 7, 2009
 
6
 *
 
7
 *  Copyright (c) 2009 Jacob Dekel
 
8
 *  $Id: MainWindow.h 34 2009-11-07 06:15:58Z jacob $
 
9
 *
 
10
 *      Main window object
 
11
 *
 
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.
 
16
 *
 
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.
 
21
 *
 
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/>.
 
24
 *
 
25
 */
 
26
 
 
27
#ifndef MAINWINDOW_H
 
28
#define MAINWINDOW_H
 
29
 
 
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"
 
36
#include "Psw.h"
 
37
#include "Regs32.h"
 
38
#include "Regs64.h"
 
39
#include "HerculesExecutor.h"
 
40
#include "LogRunner.h"
 
41
#include "StatusRunner.h"
 
42
#include "Preferences.h"
 
43
#include "Watchdog.h"
 
44
 
 
45
#include "ConfigFile.h"
 
46
#include "Configuration.h"
 
47
#include <QTextEdit>
 
48
#include <QSystemTrayIcon>
 
49
#include <QWaitCondition>
 
50
 
 
51
class LogRunner;
 
52
class HerculesExecutor;
 
53
class PlainLogWidget;
 
54
 
 
55
class MainWindow : public QMainWindow
 
56
{
 
57
    Q_OBJECT
 
58
 
 
59
public:
 
60
    MainWindow(QWidget *parent = 0);
 
61
    virtual ~MainWindow();
 
62
 
 
63
    bool                        issueCommand(const std::string& command);
 
64
    ConfigFile      * getConfigurationFile();
 
65
 
 
66
private:
 
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;
 
79
 
 
80
    Configuration       * mConfiguration;
 
81
    ConfigFile          * mConfigFile;
 
82
    PlainLogWidget     * mLogWindow;
 
83
    QSystemTrayIcon     * mSystemTrayIcon;
 
84
    MainPanel           * mMainPanel;
 
85
    DevicesPane         * mDevicesPane;
 
86
    CommandLine         * mCommandLine;
 
87
    Psw                                 * mPsw;
 
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;
 
104
    bool                mRecovery;
 
105
    bool                                mDevicesRecovery;
 
106
    bool                                mDevicesRecoveryCommenced;
 
107
    bool                mSystrayHintEjected;
 
108
    QString             mRecoveryConfig;
 
109
    QString             mCurrentPath;
 
110
    QString             mAdHocLoadParm;
 
111
 
 
112
public slots:
 
113
    void powerOn();
 
114
    void powerOff();
 
115
    void extInterrupt();
 
116
    void devInterrupt();
 
117
    void load();
 
118
    void restart();
 
119
    void store();
 
120
    void start();
 
121
    void stop();
 
122
    void restartDevices();
 
123
 
 
124
    // menu-related slots
 
125
    void newConfig();
 
126
    void config();
 
127
    void saveConfig();
 
128
    void saveConfigAs();
 
129
    void openConfig();
 
130
    void exitNow();
 
131
    void loadCommand();
 
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();
 
143
    void editViewPSW();
 
144
    void dasdinit();
 
145
    void dasdload();
 
146
    void dasdisup();
 
147
    void dasdls();
 
148
    void dasdcat();
 
149
    void dasdconv();
 
150
    void dasdcopy();
 
151
 
 
152
    void writeToLogFromQueue();
 
153
    void writeToLog(QString line);
 
154
    void fontChanged();
 
155
    void mipsChanged();
 
156
    void pswChanged();
 
157
    void dispatchStatus();
 
158
    void newCommand();
 
159
    void herculesEndedSlot();
 
160
    void deleteMessages();
 
161
    void saveMessages(bool autosave=false);
 
162
    void preferences();
 
163
    void helpAbout();
 
164
    void closeEvent(QCloseEvent * event);
 
165
    void systrayClick(QSystemTrayIcon::ActivationReason);
 
166
    void systrayHint();
 
167
    void recoverDevices(std::string& statusLine);
 
168
};
 
169
 
 
170
#endif // MAINWINDOW_H