Debian Codegraph @

HercConfiguration/DevicesWidget.h

raw symbols SCIP
1 /*
2 * File: DevicesWidget.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 presents the devices section in the configuration
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 DEVICESDLG_H_
28 #define DEVICESDLG_H_
29
30 #include "ConfigFile.h"
31 #include "DeviceConfigView.h"
32 #include "DeviceMenuProcessor.h"
33
34 #include <QWidget>
35 #include <QFrame>
36 #include <QIcon>
37
38 class DevicesWidget : public DeviceMenuProcessor
39 {
40 Q_OBJECT
41 public:
42 DevicesWidget(ConfigFile * configFile, QWidget * parent);
43 virtual ~DevicesWidget();
44 void update(ConfigFile * configFile);
45 bool isUnique(std::string devno);
46
47 private:
48 ConfigFile * mConfigFile;
49 DeviceConfigView * mConfigView;
50 QMenu mMenu;
51 std::map<int,int> mDialogToFile;
52 QIcon *mCardIcon;
53 QIcon *mConsoleIcon;
54 QIcon *mDasdIcon;
55 QIcon *mNetIcon;
56 QIcon *mPrinterIcon;
57 QIcon *mTapeIcon;
58 QIcon *mTerminalIcon;
59 QIcon *mUnknownIcon;
60
61 void initialize();
62 virtual bool isRealDev(int) { return true;}
63 bool canAddSYSG();
64 bool isConfig() { return true; };
65 bool realDevice();
66 DeviceTypes::Type getType(int lineNumber);
67 virtual void doLoadTape(QString&) { return; }
68 virtual bool hasConfig() { return true; };
69 virtual bool traced() { return false; }
70
71 private slots:
72 void mousePressed(QModelIndex index);
73 void doAddDevice(bool keep);
74 void updateDevice(bool);
75
76 public slots:
77
78 void menuDelete();
79 void menuProperties();
80 };
81
82 #endif /* DEVICESDLG_H_ */