| 1 | /* |
| 2 | * File: DeviceTypes.h |
| 3 | * |
| 4 | * Author: Jacob Dekel |
| 5 | * Created on: Oct 15, 2009 |
| 6 | * |
| 7 | * Copyright (c) 2009-2013 Jacob Dekel |
| 8 | * $Id$ |
| 9 | * |
| 10 | * This object is an interface for driving devices through menus |
| 11 | * (used by both the devices pane and the devices configuration tab) |
| 12 | * |
| 13 | * This program is free software: you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by |
| 15 | * the Free Software Foundation, either version 3 of the License, or |
| 16 | * (at your option) any later version. |
| 17 | * |
| 18 | * This program is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | * GNU General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU General Public License |
| 24 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 25 | * |
| 26 | */ |
| 27 | |
| 28 | |
| 29 | #ifndef DEVICETYPES_H_ |
| 30 | #define DEVICETYPES_H_ |
| 31 | |
| 32 | #include <QIcon> |
| 33 | |
| 34 | class DeviceTypes |
| 35 | { |
| 36 | public: |
| 37 | static DeviceTypes& instance(); |
| 38 | virtual ~DeviceTypes(); |
| 39 | enum Type { Other = 0, |
| 40 | Terminal, Sysg, Console, Printer, CardReader, CardPunch, |
| 41 | LinePrinter, Tape, CTC, DASD , Comm }; |
| 42 | enum BaseType { CTCT=100 , CTCI, LCS, QETH, CKD, FBA}; |
| 43 | QIcon & getIcon(DeviceTypes::Type type) ; |
| 44 | const char * getName(Type type); |
| 45 | private: |
| 46 | DeviceTypes(); |
| 47 | static DeviceTypes mInstance; |
| 48 | const static char *sDeviceNames[]; |
| 49 | const static char *sDeviceIconNames[]; |
| 50 | static std::vector<QIcon> sDeviceIcons; |
| 51 | }; |
| 52 | |
| 53 | #endif /* DEVICETYPES_H_ */ |