| 1 | /* |
| 2 | * File: StationeryDialog.h |
| 3 | * |
| 4 | * Author: Jacob Dekel |
| 5 | * Created on: May 10, 2014 |
| 6 | * |
| 7 | * Copyright (c) 2009-2014 Jacob Dekel |
| 8 | * $Id$ |
| 9 | * |
| 10 | * This object handles the stationery definition dialog for the Hercules Studio printer |
| 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 PAPERDIALOG_H |
| 28 | #define PAPERDIALOG_Hcxx . . $ `HercPrinter/StationeryDialog.h:28:9`! |
| 29 | |
| 30 | #include "Stationery.h"cxx . . $ `<file>/HercPrinter/Stationery.h`/ |
| 31 | |
| 32 | #include <QDialog> |
| 33 | #include <QSpinBox> |
| 34 | #include <QComboBox> |
| 35 | #include <QAbstractButton> |
| 36 | |
| 37 | namespace Uicxx . . $ Ui/ { |
| 38 | class PaperDialogcxx . . $ Ui/PaperDialog#; |
| 39 | } |
| 40 | |
| 41 | class InchesSpinBoxcxx . . $ InchesSpinBox# : public QSpinBoxcxx . . $ QSpinBox# |
| 42 | { |
| 43 | public: |
| 44 | InchesSpinBoxcxx . . $ InchesSpinBox#InchesSpinBox(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# * parent=0); |
| 45 | void setValuecxx . . $ InchesSpinBox#setValue(d4f767463ce0a6b3).(int val); |
| 46 | int valuecxx . . $ InchesSpinBox#value(b126dc7c1de90089).(); |
| 47 | |
| 48 | protected: |
| 49 | virtual int valueFromTextcxx . . $ InchesSpinBox#valueFromText(fbf1bd5053f90658).(const QStringcxx . . $ QString# &text) const; |
| 50 | virtual QStringcxx . . $ QString# textFromValuecxx . . $ InchesSpinBox#textFromValue(3f3c3d0e9c0eb37f).(int val) const; |
| 51 | private: |
| 52 | mutable int mNumeratorcxx . . $ InchesSpinBox#mNumerator.; // deniminator is always 16 |
| 53 | }; |
| 54 | |
| 55 | class StationeryDialogcxx . . $ StationeryDialog#; |
| 56 | |
| 57 | class PaperPreviewcxx . . $ PaperPreview# : public QWidgetcxx . . $ QWidget# |
| 58 | { |
| 59 | Q_OBJECTcxx . . $ QMetaObject#Call# |
| 60 | public: |
| 61 | PaperPreviewcxx . . $ PaperPreview#PaperPreview(fde72f6d56455dc7).(StationeryDialogcxx . . $ StationeryDialog# * dialog, QWidgetcxx . . $ QWidget# *parent = 0); |
| 62 | inline void setBarsRgbcxx . . $ PaperPreview#setBarsRgb(d4f767463ce0a6b3).(int rgb) |
| 63 | { |
| 64 | mBarsRgbcxx . . $ PaperPreview#mBarsRgb. = rgb; |
| 65 | } |
| 66 | |
| 67 | protected: |
| 68 | virtual void paintEventcxx . . $ PaperPreview#paintEvent(f239c9e85d61a220).(QPaintEventcxx . . $ QPaintEvent#*); |
| 69 | |
| 70 | private: |
| 71 | StationeryDialogcxx . . $ StationeryDialog#* mDialogcxx . . $ PaperPreview#mDialog.; |
| 72 | int mBarsRgbcxx . . $ PaperPreview#mBarsRgb.; // bars color |
| 73 | }; |
| 74 | |
| 75 | class StationeryDialogcxx . . $ StationeryDialog# : public QDialogcxx . . $ QDialog# |
| 76 | { |
| 77 | Q_OBJECTcxx . . $ StationeryDialog#tr(75d9f1c324b4579d). |
| 78 | |
| 79 | public: |
| 80 | explicit StationeryDialogcxx . . $ StationeryDialog#StationeryDialog(d71cd35ae558283).(QWidgetcxx . . $ QWidget# *parent = 0, const QStringcxx . . $ QString#& item=QStringcxx . . $ QString#QString(49f6e7a06ebc5aa8).()); |
| 81 | ~cxx . . $ StationeryDialog#`~StationeryDialog`(49f6e7a06ebc5aa8).StationeryDialogcxx . . $ StationeryDialog#(); |
| 82 | |
| 83 | public slotscxx . . $ `<external>/1208926524888476972/qobjectdefs.h:88:14`!: |
| 84 | void stationeryNameChangedcxx . . $ StationeryDialog#stationeryNameChanged(7df51288a9ebd664).(QStringcxx . . $ QString# newName); |
| 85 | void stationeryNameEditedcxx . . $ StationeryDialog#stationeryNameEdited(7df51288a9ebd664).(QStringcxx . . $ QString# newName); |
| 86 | void deleteClickedcxx . . $ StationeryDialog#deleteClicked(49f6e7a06ebc5aa8).(); |
| 87 | void cancelClickedcxx . . $ StationeryDialog#cancelClicked(49f6e7a06ebc5aa8).(); |
| 88 | void paperSizeChangedcxx . . $ StationeryDialog#paperSizeChanged(7df51288a9ebd664).(QStringcxx . . $ QString# value); |
| 89 | void barsColorChangedcxx . . $ StationeryDialog#barsColorChanged(7df51288a9ebd664).(QStringcxx . . $ QString# value); |
| 90 | void inchesMmcxx . . $ StationeryDialog#inchesMm(b45ddcbc8423892c).(bool checked); |
| 91 | void landscapecxx . . $ StationeryDialog#landscape(b45ddcbc8423892c).(bool checked); |
| 92 | void decorationToggeledcxx . . $ StationeryDialog#decorationToggeled(49f6e7a06ebc5aa8).(); |
| 93 | void feedHolesToggeledcxx . . $ StationeryDialog#feedHolesToggeled(49f6e7a06ebc5aa8).(); |
| 94 | void customColorChangedcxx . . $ StationeryDialog#customColorChanged(49f6e7a06ebc5aa8).(); |
| 95 | |
| 96 | private: |
| 97 | StationeryPtrcxx . . $ StationeryPtr# createRecordcxx . . $ StationeryDialog#createRecord(c14d0b2fe9e82123).(); |
| 98 | void populatecxx . . $ StationeryDialog#populate(49f6e7a06ebc5aa8).(); |
| 99 | void savecxx . . $ StationeryDialog#save(7df51288a9ebd664).(QStringcxx . . $ QString# name); |
| 100 | bool builtinStationerycxx . . $ StationeryDialog#builtinStationery(7dc6c9a0b6a7270f).(QStringcxx . . $ QString# stationeryName); |
| 101 | void setProtectedcxx . . $ StationeryDialog#setProtected(b45ddcbc8423892c).(bool disabled); |
| 102 | |
| 103 | |
| 104 | Uicxx . . $ Ui/::PaperDialogcxx . . $ Ui/PaperDialog# *uicxx . . $ StationeryDialog#ui.; |
| 105 | InchesSpinBoxcxx . . $ InchesSpinBox#* mTopMarginSpinBoxcxx . . $ StationeryDialog#mTopMarginSpinBox.;//TODO |
| 106 | PaperPreviewcxx . . $ PaperPreview# *mPaperPreviewcxx . . $ StationeryDialog#mPaperPreview.;//TODO |
| 107 | int mRgbcxx . . $ StationeryDialog#mRgb.; |
| 108 | QStringcxx . . $ QString# mCurrentNamecxx . . $ StationeryDialog#mCurrentName.; |
| 109 | |
| 110 | enum class PaperSizescxx . . $ StationeryDialog#PaperSizes# //TODO move to right place, fix sizes |
| 111 | { |
| 112 | Lettercxx . . $ StationeryDialog#PaperSizes#Letter., // 8.5x11 |
| 113 | Legalcxx . . $ StationeryDialog#PaperSizes#Legal., // 8.5x14 |
| 114 | Ledgercxx . . $ StationeryDialog#PaperSizes#Ledger., // 11x17 |
| 115 | Tabloidcxx . . $ StationeryDialog#PaperSizes#Tabloid., // 11x17 |
| 116 | LetterFanFoldcxx . . $ StationeryDialog#PaperSizes#LetterFanFold.,// 9.5x11 |
| 117 | LegalFanFoldcxx . . $ StationeryDialog#PaperSizes#LegalFanFold., // 15x11 |
| 118 | USStdFanFoldcxx . . $ StationeryDialog#PaperSizes#USStdFanFold., // 14.875x11 |
| 119 | A0cxx . . $ StationeryDialog#PaperSizes#A0., |
| 120 | A1cxx . . $ StationeryDialog#PaperSizes#A1., |
| 121 | A2cxx . . $ StationeryDialog#PaperSizes#A2., |
| 122 | A3cxx . . $ StationeryDialog#PaperSizes#A3., |
| 123 | A4cxx . . $ StationeryDialog#PaperSizes#A4., |
| 124 | Customcxx . . $ StationeryDialog#PaperSizes#Custom. |
| 125 | }; |
| 126 | |
| 127 | friend class PaperPreviewcxx . . $ PaperPreview#; |
| 128 | }; |
| 129 | |
| 130 | #endif // PAPERDIALOG_H |