Debian Codegraph @

HercConfiguration/DevicesPane.h

raw symbols SCIP
1 /*
2 * File: DevicesPane.h
3 *
4 * Author: Jacob Dekel
5 * Created on: Aug 7, 2009
6 *
7 * Copyright (c) 2009-2013 Jacob Dekel
8 * $Id$
9 *
10 * This object displays the devices pane during hercules run time
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 DEVICESPANE_H
28 #define DEVICESPANE_Hcxx . . $ `HercConfiguration/DevicesPane.h:28:9`!
29
30 #include "DeviceTypes.h"cxx . . $ `<file>/HercConfiguration/DeviceTypes.h`/
31 #include "DeviceListView.h"cxx . . $ `<file>/HercConfiguration/DeviceListView.h`/
32 #include "StatusUpdateCollector.h"cxx . . $ `<file>/HercConfiguration/StatusUpdateCollector.h`/
33 #include "DeviceMenuProcessor.h"cxx . . $ `<file>/HercConfiguration/DeviceMenuProcessor.h`/
34
35 #include <QtWidgets/QWidget>
36 #include "ui_Devices.h"cxx . . $ `<file>/ui/ui_Devices.h`/
37 #include <QGridLayout>
38 #include <QScrollArea>
39 #include <QLabel>
40
41 #include <utility>
42 #include <vector>
43 #include <map>
44
45 typedef stdcxx . . $ std/::paircxx . . $ std/pair#<int,int> TokenPaircxx . . $ TokenPair#;
46
47 class VisualizedDeviceEntrycxx . . $ VisualizedDeviceEntry#;
48
49 /*
50 NOTE: look for BEGIN_DEVICE_CLASS_QUERY in hercules source
51
52 note: DEVA=0180 3390 DASD 1001 /media/Data/Hercules/zLinux/CentOS-4.7/180.cckd [3339 cyls]
53 */
54
55 struct DynDeviceLinecxx . . $ DynDeviceLine#
56 {
57 char DEVcxx . . $ DynDeviceLine#DEV.[3];
58 char actioncxx . . $ DynDeviceLine#action.;
59 char eqcxx . . $ DynDeviceLine#eq.;
60 char devNocxx . . $ DynDeviceLine#devNo.[4];
61 char pad1cxx . . $ DynDeviceLine#pad1.;
62 char devTypeNcxx . . $ DynDeviceLine#devTypeN.[4];
63 char pad2cxx . . $ DynDeviceLine#pad2.;
64 char devTypecxx . . $ DynDeviceLine#devType.[4];
65 char pid3cxx . . $ DynDeviceLine#pid3.;
66 char statusBytescxx . . $ DynDeviceLine#statusBytes.[4];
67 };
68
69 template <class Key, class T> class dbgmapcxx . . $ dbgmap#
70 {
71 public:
72 dbgmapcxx . . $ dbgmap#`dbgmap<Key, T>`(49f6e7a06ebc5aa8).()
73 {
74 mMapcxx . . $ dbgmap#mMap. = new stdcxx . . $ std/::mapcxx . . $ std/map#<Key, T>();
75 }
76
77 typedef typename stdcxx . . $ std/::mapcxx . . $ std/map#<const Key, T>::iterator iteratorcxx . . $ dbgmap#iterator# ;
78 typedef typename stdcxx . . $ std/::mapcxx . . $ std/map#<Key, T>::const_iterator const_iteratorcxx . . $ dbgmap#const_iterator# ;
79
80 stdcxx . . $ std/::paircxx . . $ std/pair#< iteratorcxx . . $ dbgmap#iterator#, bool > insertcxx . . $ dbgmap#insert(a497fb0282de8b5c).(stdcxx . . $ std/::paircxx . . $ std/pair#< const Key, T> t)
81 {
82 return mMapcxx . . $ dbgmap#mMap.->insertcxx . . $ std/map#insert(f1d6a7bdcb7d7743).(t);
83 }
84
85 void clearcxx . . $ dbgmap#clear(49f6e7a06ebc5aa8).()
86 {
87 mMapcxx . . $ dbgmap#mMap.->clearcxx . . $ std/map#clear(49f6e7a06ebc5aa8).();
88 }
89
90 typename stdcxx . . $ std/::mapcxx . . $ std/map#<Key, T>::iterator begincxx . . $ dbgmap#begin(e521b98fc08b8242).() const
91 {
92 return mMapcxx . . $ dbgmap#mMap.->begincxx . . $ std/map#begin(646659518938a4d6).();
93 }
94
95 iteratorcxx . . $ dbgmap#iterator# endcxx . . $ dbgmap#end(cf355fa80d1e99a0).() const
96 {
97 return mMapcxx . . $ dbgmap#mMap.->endcxx . . $ std/map#end(fbe2f8c57595edf).();
98 }
99
100 iteratorcxx . . $ dbgmap#iterator# findcxx . . $ dbgmap#find(916cb8dbfa5b3cb4).(const Key& k)
101 {
102 return mMapcxx . . $ dbgmap#mMap.->findcxx . . $ std/map#find(36f8d56706583706).(k);
103 }
104
105 void erasecxx . . $ dbgmap#erase(c9f7f6d6570630b1).(iteratorcxx . . $ dbgmap#iterator# p)
106 {
107 mMapcxx . . $ dbgmap#mMap.->erasecxx . . $ std/map#erase(a7de169f3ef4bfb3).(p);
108 }
109
110 size_t sizecxx . . $ dbgmap#size(f708dce9a8856c70).()
111 {
112 return mMapcxx . . $ dbgmap#mMap.->sizecxx . . $ std/map#size(44f510802f121091).();
113 }
114
115 T& operatorcxx . . $ dbgmap#`operator[]`(bbd415b616967878).[] (const Key& k)
116 {
117 return (*mMapcxx . . $ dbgmap#mMap.)[k];
118 }
119
120
121 private:
122 stdcxx . . $ std/::mapcxx . . $ std/map#<Key,T> *mMapcxx . . $ dbgmap#mMap.;
123 };
124
125 class MainWindowcxx . . $ MainWindow#;
126 class DeviceConfigLinecxx . . $ DeviceConfigLine#;
127 class DevicesRenamecxx . . $ DevicesRename#;
128 class DevicesPanecxx . . $ DevicesPane# : public DeviceMenuProcessorcxx . . $ DeviceMenuProcessor#, public StatusUpdateCollectorcxx . . $ StatusUpdateCollector#
129 {
130 Q_OBJECTcxx . . $ QString#QString(e1217c004a86c950).
131 public:
132 DevicesPanecxx . . $ DevicesPane#DevicesPane(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent = 0);
133 virtual ~cxx . . $ DevicesPane#`~DevicesPane`(49f6e7a06ebc5aa8).DevicesPanecxx . . $ DevicesPane#();
134
135 virtual bool notifycxx . . $ DevicesPane#notify(544790aa27d183a0).(const QByteArraycxx . . $ QByteArray#& statusLine);
136 void clearcxx . . $ DevicesPane#clear(49f6e7a06ebc5aa8).();
137
138 public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!:
139 void mousePressedcxx . . $ DevicesPane#mousePressed(58b98458fece0954).(QModelIndexcxx . . $ QModelIndex# index);
140 void menuRenamecxx . . $ DevicesPane#menuRename(49f6e7a06ebc5aa8).();
141 void menuDeletecxx . . $ DevicesPane#menuDelete(49f6e7a06ebc5aa8).();
142 void doAddDevicecxx . . $ DevicesPane#doAddDevice(b45ddcbc8423892c).(bool);
143 void updateDevicecxx . . $ DevicesPane#updateDevice(b45ddcbc8423892c).(bool);
144 void menuPropertiescxx . . $ DevicesPane#menuProperties(49f6e7a06ebc5aa8).();
145 void doRenamecxx . . $ DevicesPane#doRename(3458fe3960d5051).(QStringcxx . . $ QString# oldDevNum, QStringcxx . . $ QString# newDevNum);
146 void menuInterruptcxx . . $ DevicesPane#menuInterrupt(49f6e7a06ebc5aa8).();
147 void menuStatuscxx . . $ DevicesPane#menuStatus(49f6e7a06ebc5aa8).();
148 void menuTraceCCWcxx . . $ DevicesPane#menuTraceCCW(49f6e7a06ebc5aa8).();
149 void rejectedcxx . . $ DevicesPane#rejected(49f6e7a06ebc5aa8).();
150
151 protected:
152 virtual bool isRealDevcxx . . $ DevicesPane#isRealDev(83c267b20bac841a).(int lineNumber);
153 virtual bool canAddSYSGcxx . . $ DevicesPane#canAddSYSG(c9857a73d68e59ba).();
154 virtual bool isConfigcxx . . $ DevicesPane#isConfig(c9857a73d68e59ba).() { return false; }
155 virtual bool realDevicecxx . . $ DevicesPane#realDevice(c9857a73d68e59ba).();
156 virtual DeviceTypescxx . . $ DeviceTypes#::Typecxx . . $ DeviceTypes#Type# getTypecxx . . $ DevicesPane#getType(cc50a7541878da72).(int lineNumber);
157 virtual void doLoadTapecxx . . $ DevicesPane#doLoadTape(4c89b026053e4d32).(QStringcxx . . $ QString#& tapeFileName);
158 virtual bool hasConfigcxx . . $ DevicesPane#hasConfig(c9857a73d68e59ba).();
159 virtual bool tracedcxx . . $ DevicesPane#traced(c9857a73d68e59ba).();
160
161 private:
162 Uicxx . . $ Ui/::DevicesClasscxx . . $ Ui/DevicesClass# uicxx . . $ DevicesPane#ui.;
163 MainWindowcxx . . $ MainWindow# * mMainWindowcxx . . $ DevicesPane#mMainWindow.;
164 QGridLayoutcxx . . $ QGridLayout# * mLayoutcxx . . $ DevicesPane#mLayout.;
165 QScrollAreacxx . . $ QScrollArea# * mScrollAreacxx . . $ DevicesPane#mScrollArea.;
166 DeviceListViewcxx . . $ DeviceListView# * mListViewcxx . . $ DevicesPane#mListView.;
167 stdcxx . . $ std/::vectorcxx . . $ std/vector#<TokenPaircxx . . $ TokenPair#> mTokenscxx . . $ DevicesPane#mTokens.;
168 stdcxx . . $ std/::mapcxx . . $ std/map#<int, VisualizedDeviceEntrycxx . . $ VisualizedDeviceEntry#> mDevicescxx . . $ DevicesPane#mDevices.;
169 QStandardItemModelcxx . . $ QStandardItemModel# * mModelcxx . . $ DevicesPane#mModel.;
170 DevicesRenamecxx . . $ DevicesRename# * mRenameDlgcxx . . $ DevicesPane#mRenameDlg.;
171 int mOldDevNumcxx . . $ DevicesPane#mOldDevNum.;
172
173 QSizecxx . . $ QSize# sizeHintcxx . . $ DevicesPane#sizeHint(4b3b776e5ee2b367).() const;
174 void clearDevicescxx . . $ DevicesPane#clearDevices(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# * parent);
175 void resizeEventcxx . . $ DevicesPane#resizeEvent(eeeec21cf8dc0387). ( QResizeEventcxx . . $ QResizeEvent# * event );
176 void adjustSizecxx . . $ DevicesPane#adjustSize(49f6e7a06ebc5aa8).();
177 VisualizedDeviceEntrycxx . . $ VisualizedDeviceEntry# * getDeviceEntrycxx . . $ DevicesPane#getDeviceEntry(90a891db17732ed7).();
178 QStringcxx . . $ QString# textFromValuecxx . . $ DevicesPane#textFromValue(3f3c3d0e9c0eb37f).(int value) const;
179 int getNextDevcxx . . $ DevicesPane#getNextDev(3d2d665ba51516).(stdcxx . . $ std/::mapcxx . . $ std/map#<int, VisualizedDeviceEntry>::iteratorcxx . . $ std/map#iterator# it) const;
180 QIconcxx . . $ QIcon# * mYellowIconcxx . . $ DevicesPane#mYellowIcon.;
181 QIconcxx . . $ QIcon# * mYellowHighIconcxx . . $ DevicesPane#mYellowHighIcon.;
182
183 signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!:
184 void restartDevicescxx . . $ DevicesPane#restartDevices(49f6e7a06ebc5aa8).();
185 };
186
187 #endif // DEVICES_H