| 1 | /* |
| 2 | * File: Configuration.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 manages the Hercules 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 CONFIGURATION_H |
| 28 | #define CONFIGURATION_Hcxx . . $ `HercConfiguration/Configuration.h:28:9`! |
| 29 | |
| 30 | #include "ConfigFile.h"cxx . . $ `<file>/HercConfiguration/ConfigFile.h`/ |
| 31 | #include "HerculesStudio.h"cxx . . $ `<file>/HercStudio/HerculesStudio.h`/ |
| 32 | #include "ConfigurationEditor.h"cxx . . $ `<file>/HercConfiguration/ConfigurationEditor.h`/ |
| 33 | #include "DevicesWidget.h"cxx . . $ `<file>/HercConfiguration/DevicesWidget.h`/ |
| 34 | |
| 35 | #include "ui_Configuration.h"cxx . . $ `<file>/ui/ui_Configuration.h`/ |
| 36 | |
| 37 | #include <QSyntaxHighlighter> |
| 38 | #include <QtWidgets/QDialog> |
| 39 | |
| 40 | struct ConfigTableEntrycxx . . $ ConfigTableEntry# |
| 41 | { |
| 42 | stdcxx . . $ std/::stringcxx . . $ std/string# keywordcxx . . $ ConfigTableEntry#keyword.; |
| 43 | void (*populatorcxx . . $ ConfigTableEntry#populator.)(Uicxx . . $ Ui/::ConfigurationClasscxx . . $ Ui/ConfigurationClass# *, const ConfigLinecxx . . $ ConfigLine# *, ConfigurationEditorcxx . . $ ConfigurationEditor#::Directioncxx . . $ ConfigurationEditor#Direction# dir); |
| 44 | }; |
| 45 | |
| 46 | class Configurationcxx . . $ Configuration# : public QDialogcxx . . $ QDialog# |
| 47 | { |
| 48 | Q_OBJECTcxx . . $ Configuration#staticMetaObject. |
| 49 | |
| 50 | public: |
| 51 | Configurationcxx . . $ Configuration#Configuration(a8b35ab079906010).(ConfigFilecxx . . $ ConfigFile#* confignFile, bool newConfig = false, QWidgetcxx . . $ QWidget# *parent = 0); |
| 52 | virtual ~cxx . . $ Configuration#`~Configuration`(49f6e7a06ebc5aa8).Configurationcxx . . $ Configuration#(); |
| 53 | |
| 54 | class DoubleDigitSpinBoxcxx . . $ Configuration#DoubleDigitSpinBox# : public QSpinBoxcxx . . $ QSpinBox# |
| 55 | { |
| 56 | public: |
| 57 | DoubleDigitSpinBoxcxx . . $ Configuration#DoubleDigitSpinBox#DoubleDigitSpinBox(3991cc3cea03e022).(QWidgetcxx . . $ QWidget# * parent = 0, bool appendPlus=false); |
| 58 | protected: |
| 59 | virtual int valueFromTextcxx . . $ Configuration#DoubleDigitSpinBox#valueFromText(fbf1bd5053f90658).(const QStringcxx . . $ QString#& text) const; |
| 60 | virtual QStringcxx . . $ QString# textFromValuecxx . . $ Configuration#DoubleDigitSpinBox#textFromValue(3f3c3d0e9c0eb37f).(int value) const; |
| 61 | private: |
| 62 | bool mAppendPluscxx . . $ Configuration#DoubleDigitSpinBox#mAppendPlus.; |
| 63 | }; |
| 64 | |
| 65 | class HexSpinBoxcxx . . $ Configuration#HexSpinBox# : public QSpinBoxcxx . . $ QSpinBox# |
| 66 | { |
| 67 | public: |
| 68 | HexSpinBoxcxx . . $ Configuration#HexSpinBox#HexSpinBox(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# * parent = 0); |
| 69 | virtual QStringcxx . . $ QString# textFromValuecxx . . $ Configuration#HexSpinBox#textFromValue(3f3c3d0e9c0eb37f).(int value) const; |
| 70 | protected: |
| 71 | virtual int valueFromTextcxx . . $ Configuration#HexSpinBox#valueFromText(fbf1bd5053f90658).(const QStringcxx . . $ QString#& text) const; |
| 72 | QValidatorcxx . . $ QValidator#::Statecxx . . $ QValidator#State# validatecxx . . $ Configuration#HexSpinBox#validate(c53298829ad8eccd).(QStringcxx . . $ QString# & input, int & pos) const; |
| 73 | }; |
| 74 | |
| 75 | protected: |
| 76 | virtual void resizeEventcxx . . $ Configuration#resizeEvent(eeeec21cf8dc0387). ( QResizeEventcxx . . $ QResizeEvent# * event ); |
| 77 | |
| 78 | private: |
| 79 | Uicxx . . $ Ui/::ConfigurationClasscxx . . $ Ui/ConfigurationClass# uicxx . . $ Configuration#ui.; |
| 80 | DevicesWidgetcxx . . $ DevicesWidget# * mDevWgtcxx . . $ Configuration#mDevWgt.; |
| 81 | QPlainTextEditcxx . . $ QPlainTextEdit# * mFreeEditcxx . . $ Configuration#mFreeEdit.; |
| 82 | QSyntaxHighlightercxx . . $ QSyntaxHighlighter# * mSyntaxHighlightercxx . . $ Configuration#mSyntaxHighlighter.; |
| 83 | QWidgetcxx . . $ QWidget# * mParentcxx . . $ Configuration#mParent.; |
| 84 | ConfigFilecxx . . $ ConfigFile# * mConfigFilecxx . . $ Configuration#mConfigFile.; |
| 85 | bool mNewConfigcxx . . $ Configuration#mNewConfig.; |
| 86 | bool mChangedcxx . . $ Configuration#mChanged.; // text changed since last validation |
| 87 | bool mTimerSetcxx . . $ Configuration#mTimerSet.; // validation timer was set |
| 88 | |
| 89 | int mCurrTabcxx . . $ Configuration#mCurrTab.; |
| 90 | int mLastSyscxx . . $ Configuration#mLastSys.; // updated by blockCountChanged() |
| 91 | static struct ConfigTableEntrycxx . . $ ConfigTableEntry# mConfigTablecxx . . $ Configuration#mConfigTable.[]; |
| 92 | friend class ConfigHighlightcxx . . $ ConfigHighlight#; |
| 93 | |
| 94 | void initilizecxx . . $ Configuration#initilize(49f6e7a06ebc5aa8).(); |
| 95 | void populatecxx . . $ Configuration#populate(e859c91cf5bc2720).(ConfigurationEditorcxx . . $ ConfigurationEditor#::Directioncxx . . $ ConfigurationEditor#Direction#); |
| 96 | void handleHighlightcxx . . $ Configuration#handleHighlight(71c525bdd6c0a475).(const ConfigLinecxx . . $ ConfigLine#& configLine, QTextCursorcxx . . $ QTextCursor#& cursor, QTextCharFormatcxx . . $ QTextCharFormat#& format); |
| 97 | |
| 98 | signalscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:89:14`!: |
| 99 | void OKSignalcxx . . $ Configuration#OKSignal(49f6e7a06ebc5aa8).(); |
| 100 | |
| 101 | private slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 102 | void okPressedcxx . . $ Configuration#okPressed(49f6e7a06ebc5aa8).(); |
| 103 | void cancelPressedcxx . . $ Configuration#cancelPressed(49f6e7a06ebc5aa8).(); |
| 104 | void autoMountBrowsePressedcxx . . $ Configuration#autoMountBrowsePressed(49f6e7a06ebc5aa8).(); |
| 105 | void autoScsiMountChangedcxx . . $ Configuration#autoScsiMountChanged(49f6e7a06ebc5aa8).(); |
| 106 | void cpuPrioChangedcxx . . $ Configuration#cpuPrioChanged(d4f767463ce0a6b3).(int); |
| 107 | void devPrioChangedcxx . . $ Configuration#devPrioChanged(d4f767463ce0a6b3).(int); |
| 108 | void hercPrioChangedcxx . . $ Configuration#hercPrioChanged(d4f767463ce0a6b3).(int); |
| 109 | void todPrioChangedcxx . . $ Configuration#todPrioChanged(d4f767463ce0a6b3).(int); |
| 110 | void ecpSvmChangedcxx . . $ Configuration#ecpSvmChanged(d4f767463ce0a6b3).(int); |
| 111 | void httpPortChangedcxx . . $ Configuration#httpPortChanged(d4f767463ce0a6b3).(int); |
| 112 | void httpRootBrowsePressedcxx . . $ Configuration#httpRootBrowsePressed(49f6e7a06ebc5aa8).(); |
| 113 | void modPathBrowsePressedcxx . . $ Configuration#modPathBrowsePressed(49f6e7a06ebc5aa8).(); |
| 114 | void tabChangedcxx . . $ Configuration#tabChanged(d4f767463ce0a6b3).(int); |
| 115 | void blockCountChangedSlotcxx . . $ Configuration#blockCountChangedSlot(49f6e7a06ebc5aa8).(); |
| 116 | }; |
| 117 | |
| 118 | class ConfigHighlightcxx . . $ ConfigHighlight# : public QSyntaxHighlightercxx . . $ QSyntaxHighlighter# |
| 119 | { |
| 120 | Q_OBJECTcxx . . $ QString#QString(e1217c004a86c950). |
| 121 | public: |
| 122 | ConfigHighlightcxx . . $ ConfigHighlight#ConfigHighlight(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# * parent); |
| 123 | |
| 124 | protected: |
| 125 | void highlightBlockcxx . . $ ConfigHighlight#highlightBlock(3520e46b33348bf6).(const QStringcxx . . $ QString# &text); |
| 126 | |
| 127 | private: |
| 128 | QDialogcxx . . $ QDialog# mDummyConfigcxx . . $ ConfigHighlight#mDummyConfig.; |
| 129 | Uicxx . . $ Ui/::ConfigurationClasscxx . . $ Ui/ConfigurationClass# mDummyUicxx . . $ ConfigHighlight#mDummyUi.; |
| 130 | QColorcxx . . $ QColor# mGreencxx . . $ ConfigHighlight#mGreen.; |
| 131 | QColorcxx . . $ QColor# mRedcxx . . $ ConfigHighlight#mRed.; |
| 132 | QColorcxx . . $ QColor# mBlackcxx . . $ ConfigHighlight#mBlack.; |
| 133 | QColorcxx . . $ QColor# mBluecxx . . $ ConfigHighlight#mBlue.; |
| 134 | QColorcxx . . $ QColor# mGraycxx . . $ ConfigHighlight#mGray.; |
| 135 | |
| 136 | }; |
| 137 | |
| 138 | #endif // CONFIGURATION_H |