| 1 | #cxx . . $ `<file>/HercPrinter/StationeryDialog.cpp`/include "StationeryDialog.h"cxx . . $ `<file>/HercPrinter/StationeryDialog.h`/ |
| 2 | #include "ui_StationeryDialog.h"cxx . . $ `<file>/ui/ui_StationeryDialog.h`/ |
| 3 | |
| 4 | #include "FieldTip.h"cxx . . $ `<file>/HercStudio/FieldTip.h`/ |
| 5 | #include "Environment.h"cxx . . $ `<file>/HercStudio/Environment.h`/ |
| 6 | #include "PagePrinter.h"cxx . . $ `<file>/HercPrinter/PagePrinter.h`/ |
| 7 | #include "HerculesStudio.h"cxx . . $ `<file>/HercStudio/HerculesStudio.h`/ |
| 8 | #include "ConfigurationEditor.h"cxx . . $ `<file>/HercConfiguration/ConfigurationEditor.h`/ |
| 9 | #include "Preferences.h"cxx . . $ `<file>/HercStudio/Preferences.h`/ |
| 10 | |
| 11 | #include <QSpinBox> |
| 12 | #include <QToolTip> |
| 13 | #include <QPainter> |
| 14 | #include <QMessageBox> |
| 15 | |
| 16 | #include <sstream> |
| 17 | |
| 18 | //TODO: fix paper sizes by qt's sizes and add 1 or 2 fanfold |
| 19 | |
| 20 | const char *paperHeightcxx . . $ paperHeight.[] = |
| 21 | { |
| 22 | "11", |
| 23 | "14", |
| 24 | "17", |
| 25 | "11", |
| 26 | "11", |
| 27 | "14.875", //Std FanFold |
| 28 | "46.81", //A0 |
| 29 | "33.11", //A1 |
| 30 | "23.39", //A2 |
| 31 | "16.54", //A3 |
| 32 | "11.69", //A4 |
| 33 | "8.27", //A5 |
| 34 | "0", |
| 35 | }; |
| 36 | |
| 37 | const char *paperWidthcxx . . $ paperWidth.[] = |
| 38 | { |
| 39 | "8.5", |
| 40 | "8.5", |
| 41 | "11", |
| 42 | "9.5", |
| 43 | "15", |
| 44 | "11", //Std FanFold |
| 45 | "33.11", //A0 |
| 46 | "23.39", //A1 |
| 47 | "16.54", //A2 |
| 48 | "11.69", //A3 |
| 49 | "8.27", //A4 |
| 50 | "5.83", //A5 |
| 51 | "0", |
| 52 | }; |
| 53 | |
| 54 | const char *paperHeightMmcxx . . $ paperHeightMm.[] = |
| 55 | { |
| 56 | "279.4", |
| 57 | "266.7", |
| 58 | "432", |
| 59 | "279.4", |
| 60 | "279.4", |
| 61 | "377.8", |
| 62 | "1189", // A0 |
| 63 | "841", // A1 |
| 64 | "495", // A2 |
| 65 | "420", // A3 |
| 66 | "297", // A4 |
| 67 | "210", // A5 |
| 68 | "0", |
| 69 | }; |
| 70 | |
| 71 | const char *paperWidthMmcxx . . $ paperWidthMm.[] = |
| 72 | { |
| 73 | "215.9", |
| 74 | "215.9", |
| 75 | "279", |
| 76 | "241.3", |
| 77 | "381", |
| 78 | "279.4", |
| 79 | "841", // A0 |
| 80 | "495", // A1 |
| 81 | "420", // A2 |
| 82 | "297", // A3 |
| 83 | "210", // A4 |
| 84 | "148", // A5 |
| 85 | "0", |
| 86 | }; |
| 87 | |
| 88 | StationeryDialogcxx . . $ StationeryDialog#::StationeryDialogcxx . . $ StationeryDialog#StationeryDialog(d71cd35ae558283).(QWidgetcxx . . $ QWidget# *parent, const QStringcxx . . $ QString# &item) : |
| 89 | QDialogcxx . . $ QDialog#QDialog(872e7b0c281abd8d).(parent), |
| 90 | uicxx . . $ StationeryDialog#ui.(new Uicxx . . $ Ui/::PaperDialogcxx . . $ Ui/PaperDialog#) |
| 91 | { |
| 92 | uicxx . . $ StationeryDialog#ui.->setupUicxx . . $ Ui_PaperDialog#setupUi(d194de0c0f68c28b).(this); |
| 93 | unsigned int i; |
| 94 | |
| 95 | QStringListcxx . . $ QStringList# items = Preferencescxx . . $ Preferences#::getInstancecxx . . $ Preferences#getInstance(2e7be89de0a5bc0).().stationeryListcxx . . $ Preferences#stationeryList(669a05bc42dd57cc).(); |
| 96 | if (items.countcxx . . $ QList#count(455f465bc33b4cdf).() > 0) uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->insertItemscxx . . $ QComboBox#insertItems(c6059507b8fd4559).(0,items); |
| 97 | |
| 98 | for (i=0; i<Stationerycxx . . $ Stationery#::paperSizescxx . . $ Stationery#paperSizes(db52760e79bf9054).(); i++) |
| 99 | uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->addItemcxx . . $ QComboBox#addItem(1c60a90c724e6bfb).(Stationerycxx . . $ QString#QString(85c52e162fed56f9).::paperSizecxx . . $ Stationery#paperSize(81a3ae90da26a711).(i)); |
| 100 | |
| 101 | uicxx . . $ StationeryDialog#ui.->inchesRadioButtoncxx . . $ Ui_PaperDialog#inchesRadioButton.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(true); |
| 102 | uicxx . . $ StationeryDialog#ui.->landscapeRadioButtoncxx . . $ Ui_PaperDialog#landscapeRadioButton.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(true); |
| 103 | uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(0); |
| 104 | paperSizeChangedcxx . . $ StationeryDialog#paperSizeChanged(7df51288a9ebd664).(uicxx . . $ QString#QString(e1217c004a86c950).->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).()); |
| 105 | uicxx . . $ StationeryDialog#ui.->barsColorComboBoxcxx . . $ Ui_PaperDialog#barsColorComboBox.->setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(0); |
| 106 | uicxx . . $ StationeryDialog#ui.->decorationCheckBoxcxx . . $ Ui_PaperDialog#decorationCheckBox.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(true); |
| 107 | uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 108 | |
| 109 | for (i=0; strcmp(Stationerycxx . . $ Stationery#::mBarsColorNamescxx . . $ Stationery#mBarsColorNames.[i],"Custom") != 0; i++) |
| 110 | { |
| 111 | uicxx . . $ StationeryDialog#ui.->barsColorComboBoxcxx . . $ Ui_PaperDialog#barsColorComboBox.->addItemcxx . . $ QComboBox#addItem(1c60a90c724e6bfb).(Stationerycxx . . $ QString#QString(85c52e162fed56f9).::mBarsColorNamescxx . . $ Stationery#mBarsColorNames.[i]); |
| 112 | } |
| 113 | uicxx . . $ StationeryDialog#ui.->barsColorComboBoxcxx . . $ Ui_PaperDialog#barsColorComboBox.->addItemcxx . . $ QComboBox#addItem(1c60a90c724e6bfb).("Custom"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 114 | |
| 115 | QRegExpcxx . . $ QRegExp# validationcxx . . $ QRegExp#QRegExp(31e086911ff70bd0).("^#[A-Fa-f0-9]{6}$"cxx . . $ QString#QString(85c52e162fed56f9).); |
| 116 | QRegExpValidatorcxx . . $ QRegExpValidator# *validator = new QRegExpValidatorcxx . . $ QRegExpValidator#(validation); |
| 117 | uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.->setValidatorcxx . . $ QLineEdit#setValidator(65a0e52d19f97f21).(validator); |
| 118 | |
| 119 | mTopMarginSpinBoxcxx . . $ StationeryDialog#mTopMarginSpinBox. = new InchesSpinBoxcxx . . $ InchesSpinBox#(uicxx . . $ StationeryDialog#ui.->paperTabcxx . . $ Ui_PaperDialog#paperTab.); |
| 120 | mTopMarginSpinBoxcxx . . $ StationeryDialog#mTopMarginSpinBox.->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).(QStringLiteralcxx . . $ `<external>/2817157206922689722/qstringliteral.h:65:9`!("topMarginSpinBox")); |
| 121 | mTopMarginSpinBoxcxx . . $ StationeryDialog#mTopMarginSpinBox.->setGeometrycxx . . $ QWidget#setGeometry(22ba0428947158b).(QRectcxx . . $ QRect#QRect(748afa4755bc9595).(140, 350, 120, 31)); |
| 122 | mTopMarginSpinBoxcxx . . $ StationeryDialog#mTopMarginSpinBox.->setSingleStepcxx . . $ QSpinBox#setSingleStep(d4f767463ce0a6b3).(1); |
| 123 | |
| 124 | QStringcxx . . $ QString# icon1cxx . . $ QString#QString(e1217c004a86c950). = Environmentcxx . . $ QString#QString(85c52e162fed56f9).::getIconsPathcxx . . $ Environment#getIconsPath(75da78375bc7a3dd).().c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).(); |
| 125 | icon1 +=cxx . . $ QString#`operator+=`(d02845eef0c33901). "/landscape.png"; |
| 126 | QPixmapcxx . . $ QPixmap# * pixmap1 = new QPixmapcxx . . $ QPixmap#QPixmap(dec4543235ec9b46).(icon1); |
| 127 | uicxx . . $ StationeryDialog#ui.->orientationLabelcxx . . $ Ui_PaperDialog#orientationLabel.->setPixmapcxx . . $ QLabel#setPixmap(8887f7d25b86c3f4).(*pixmap1); |
| 128 | |
| 129 | mPaperPreviewcxx . . $ StationeryDialog#mPaperPreview. = new PaperPreviewcxx . . $ PaperPreview#(this, uicxx . . $ StationeryDialog#ui.->styleTabcxx . . $ Ui_PaperDialog#styleTab.); |
| 130 | mPaperPreviewcxx . . $ StationeryDialog#mPaperPreview.->setGeometrycxx . . $ QWidget#setGeometry(748afa4755bc9595).(20,190,450,230); |
| 131 | repaintcxx . . $ QWidget#repaint(49f6e7a06ebc5aa8).(); |
| 132 | |
| 133 | if (item.lengthcxx . . $ QString#length(455f465bc33b4cdf).() > 0) |
| 134 | { |
| 135 | uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->setCurrentTextcxx . . $ QComboBox#setCurrentText(3520e46b33348bf6).(item); |
| 136 | } |
| 137 | else |
| 138 | { |
| 139 | uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(0); |
| 140 | } |
| 141 | populatecxx . . $ StationeryDialog#populate(49f6e7a06ebc5aa8).(); |
| 142 | |
| 143 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(currentIndexChanged(QString)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(stationeryNameChanged(QString))); |
| 144 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(editTextChanged(QString)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(stationeryNameEdited(QString))); |
| 145 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->deleteButtoncxx . . $ Ui_PaperDialog#deleteButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(deleteClicked())); |
| 146 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->cancelButtoncxx . . $ Ui_PaperDialog#cancelButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(clicked()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(cancelClicked())); |
| 147 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(currentIndexChanged(QString)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(paperSizeChanged(QString))); |
| 148 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->inchesRadioButtoncxx . . $ Ui_PaperDialog#inchesRadioButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(toggled(bool)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(inchesMm(bool))); |
| 149 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->landscapeRadioButtoncxx . . $ Ui_PaperDialog#landscapeRadioButton., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(toggled(bool)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(landscape(bool))); |
| 150 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->barsColorComboBoxcxx . . $ Ui_PaperDialog#barsColorComboBox., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(currentIndexChanged(QString)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(barsColorChanged(QString))); |
| 151 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->decorationCheckBoxcxx . . $ Ui_PaperDialog#decorationCheckBox., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(stateChanged(int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(decorationToggeled())); |
| 152 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->feedHolesCheckBoxcxx . . $ Ui_PaperDialog#feedHolesCheckBox., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(stateChanged(int)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(feedHolesToggeled())); |
| 153 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor., SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(textChanged(QString)), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(customColorChanged())); |
| 154 | |
| 155 | if (Preferencescxx . . $ Preferences#::getInstancecxx . . $ Preferences#getInstance(2e7be89de0a5bc0).().balloonStationerycxx . . $ Preferences#balloonStationery(50ce9a9e25b4a850).() && builtinStationerycxx . . $ StationeryDialog#builtinStationery(7dc6c9a0b6a7270f).(uicxx . . $ QString#QString(e1217c004a86c950).->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).())) |
| 156 | { |
| 157 | Preferencescxx . . $ Preferences#::getInstancecxx . . $ Preferences#getInstance(2e7be89de0a5bc0).().setBalloonStationerycxx . . $ Preferences#setBalloonStationery(b45ddcbc8423892c).(true); |
| 158 | FieldTipcxx . . $ FieldTip# *baloon = new FieldTipcxx . . $ FieldTip#(this, true); |
| 159 | baloon->setOwnercxx . . $ FieldTip#setOwner(108f35f7aa7f3cf9).(uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.); |
| 160 | baloon->showMessagecxx . . $ FieldTip#showMessage(29ed8fcd127906b1).("Change this name to define you own stationery"cxx . . $ QString#QString(85c52e162fed56f9)., 10000); |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | StationeryDialogcxx . . $ StationeryDialog#::~cxx . . $ StationeryDialog#`~StationeryDialog`(49f6e7a06ebc5aa8).StationeryDialogcxx . . $ StationeryDialog#() |
| 165 | { |
| 166 | delete uicxx . . $ StationeryDialog#ui.; |
| 167 | } |
| 168 | |
| 169 | void StationeryDialogcxx . . $ StationeryDialog#::paperSizeChangedcxx . . $ StationeryDialog#paperSizeChanged(7df51288a9ebd664).(QStringcxx . . $ QString# value) |
| 170 | { |
| 171 | if (value.comparecxx . . $ QString#compare(38964227c2ffb4ec).("Custom"cxx . . $ QString#QString(85c52e162fed56f9).) == 0) |
| 172 | { |
| 173 | uicxx . . $ StationeryDialog#ui.->customSizeHcxx . . $ Ui_PaperDialog#customSizeH.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 174 | uicxx . . $ StationeryDialog#ui.->customSizeWcxx . . $ Ui_PaperDialog#customSizeW.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 175 | uicxx . . $ StationeryDialog#ui.->orientationGroupBoxcxx . . $ Ui_PaperDialog#orientationGroupBox.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 176 | |
| 177 | FieldTipcxx . . $ FieldTip# *balloon = new FieldTipcxx . . $ FieldTip#(uicxx . . $ StationeryDialog#ui.->paperTabcxx . . $ Ui_PaperDialog#paperTab.); |
| 178 | balloon->setOwnercxx . . $ FieldTip#setOwner(108f35f7aa7f3cf9).(uicxx . . $ StationeryDialog#ui.->customSizeHcxx . . $ Ui_PaperDialog#customSizeH.); |
| 179 | balloon->showMessagecxx . . $ FieldTip#showMessage(29ed8fcd127906b1).("Enter width and height of paper"cxx . . $ QString#QString(85c52e162fed56f9).,5000); |
| 180 | } |
| 181 | else |
| 182 | { |
| 183 | hOutDebugcxx . . $ `HercStudio/HerculesStudio.h:49:9`!(3,"i " << ui->paperSizeComboBox->currentIndex() << " v " << ui->customSizeW->text().toUtf8().data()); |
| 184 | if (uicxx . . $ StationeryDialog#ui.->inchesRadioButtoncxx . . $ Ui_PaperDialog#inchesRadioButton.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).()) |
| 185 | { |
| 186 | uicxx . . $ StationeryDialog#ui.->customSizeWcxx . . $ Ui_PaperDialog#customSizeW.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(paperWidthcxx . . $ QString#QString(85c52e162fed56f9).[uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentIndexcxx . . $ QComboBox#currentIndex(455f465bc33b4cdf).()]); |
| 187 | uicxx . . $ StationeryDialog#ui.->customSizeHcxx . . $ Ui_PaperDialog#customSizeH.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(paperHeightcxx . . $ QString#QString(85c52e162fed56f9).[uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentIndexcxx . . $ QComboBox#currentIndex(455f465bc33b4cdf).()]); |
| 188 | } |
| 189 | else |
| 190 | { |
| 191 | uicxx . . $ StationeryDialog#ui.->customSizeWcxx . . $ Ui_PaperDialog#customSizeW.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(paperWidthMmcxx . . $ QString#QString(85c52e162fed56f9).[uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentIndexcxx . . $ QComboBox#currentIndex(455f465bc33b4cdf).()]); |
| 192 | uicxx . . $ StationeryDialog#ui.->customSizeHcxx . . $ Ui_PaperDialog#customSizeH.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(paperHeightMmcxx . . $ QString#QString(85c52e162fed56f9).[uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentIndexcxx . . $ QComboBox#currentIndex(455f465bc33b4cdf).()]); |
| 193 | } |
| 194 | uicxx . . $ StationeryDialog#ui.->customSizeHcxx . . $ Ui_PaperDialog#customSizeH.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 195 | uicxx . . $ StationeryDialog#ui.->customSizeWcxx . . $ Ui_PaperDialog#customSizeW.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 196 | uicxx . . $ StationeryDialog#ui.->orientationGroupBoxcxx . . $ Ui_PaperDialog#orientationGroupBox.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 197 | } |
| 198 | repaintcxx . . $ QWidget#repaint(49f6e7a06ebc5aa8).(); |
| 199 | } |
| 200 | |
| 201 | void StationeryDialogcxx . . $ StationeryDialog#::barsColorChangedcxx . . $ StationeryDialog#barsColorChanged(7df51288a9ebd664).(QStringcxx . . $ QString# value) |
| 202 | { |
| 203 | if (value.comparecxx . . $ QString#compare(38964227c2ffb4ec).("Custom"cxx . . $ QString#QString(85c52e162fed56f9).) == 0) |
| 204 | { |
| 205 | uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 206 | FieldTipcxx . . $ FieldTip# *balloon = new FieldTipcxx . . $ FieldTip#(uicxx . . $ StationeryDialog#ui.->styleTabcxx . . $ Ui_PaperDialog#styleTab.); |
| 207 | balloon->setOwnercxx . . $ FieldTip#setOwner(108f35f7aa7f3cf9).(uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.); |
| 208 | balloon->showMessagecxx . . $ FieldTip#showMessage(29ed8fcd127906b1).("Enter RGB value in html format (e.g. #f0fff0)"cxx . . $ QString#QString(85c52e162fed56f9).,5000); |
| 209 | } |
| 210 | else |
| 211 | { |
| 212 | uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 213 | StationeryPtrcxx . . $ StationeryPtr# stationery = createRecordcxx . . $ QSharedPointer#QSharedPointer(21100a343a80bccd).(); |
| 214 | int rgbSet[3]; |
| 215 | stationery->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).getBarsColorcxx . . $ Stationery#getBarsColor(4650b16577b4e630).(rgbSet); |
| 216 | QStringcxx . . $ QString# rgbcxx . . $ QString#QString(85c52e162fed56f9).("#"); |
| 217 | char hexBuf[3]; |
| 218 | for (int i=0; i<3 ; i++) |
| 219 | { |
| 220 | sprintf(hexBuf,"%2x", rgbSet[i]); |
| 221 | rgb +=cxx . . $ QString#`operator+=`(d02845eef0c33901). hexBuf; |
| 222 | } |
| 223 | uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(rgb); |
| 224 | if (mPaperPreviewcxx . . $ StationeryDialog#mPaperPreview. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) mPaperPreviewcxx . . $ StationeryDialog#mPaperPreview.->repaintcxx . . $ QWidget#repaint(49f6e7a06ebc5aa8).(); |
| 225 | } |
| 226 | uicxx . . $ StationeryDialog#ui.->decorationCheckBoxcxx . . $ Ui_PaperDialog#decorationCheckBox.->setDisabledcxx . . $ QWidget#setDisabled(b45ddcbc8423892c).( (value.comparecxx . . $ QString#compare(38964227c2ffb4ec).("None"cxx . . $ QString#QString(85c52e162fed56f9).) == 0) ); |
| 227 | repaintcxx . . $ QWidget#repaint(49f6e7a06ebc5aa8).(); |
| 228 | } |
| 229 | |
| 230 | void StationeryDialogcxx . . $ StationeryDialog#::inchesMmcxx . . $ StationeryDialog#inchesMm(b45ddcbc8423892c).(bool) |
| 231 | { |
| 232 | if (uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).().comparecxx . . $ QString#compare(38964227c2ffb4ec).("Custom"cxx . . $ QString#QString(85c52e162fed56f9).) == 0) |
| 233 | { |
| 234 | |
| 235 | } |
| 236 | else |
| 237 | { |
| 238 | paperSizeChangedcxx . . $ StationeryDialog#paperSizeChanged(7df51288a9ebd664).(uicxx . . $ QString#QString(e1217c004a86c950).->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).()); |
| 239 | } |
| 240 | |
| 241 | } |
| 242 | |
| 243 | void StationeryDialogcxx . . $ StationeryDialog#::landscapecxx . . $ StationeryDialog#landscape(b45ddcbc8423892c).(bool checked) |
| 244 | { |
| 245 | QStringcxx . . $ QString# icon1cxx . . $ QString#QString(e1217c004a86c950). = Environmentcxx . . $ QString#QString(85c52e162fed56f9).::getIconsPathcxx . . $ Environment#getIconsPath(75da78375bc7a3dd).().c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).(); |
| 246 | if (checked) |
| 247 | { |
| 248 | icon1 +=cxx . . $ QString#`operator+=`(d02845eef0c33901). "/landscape.png"; |
| 249 | QPixmapcxx . . $ QPixmap# * pixmap1 = new QPixmapcxx . . $ QPixmap#QPixmap(dec4543235ec9b46).(icon1); |
| 250 | uicxx . . $ StationeryDialog#ui.->orientationLabelcxx . . $ Ui_PaperDialog#orientationLabel.->setPixmapcxx . . $ QLabel#setPixmap(8887f7d25b86c3f4).(*pixmap1); |
| 251 | } |
| 252 | else |
| 253 | { |
| 254 | icon1 +=cxx . . $ QString#`operator+=`(d02845eef0c33901). "/portrait.png"; |
| 255 | QPixmapcxx . . $ QPixmap# * pixmap1 = new QPixmapcxx . . $ QPixmap#QPixmap(dec4543235ec9b46).(icon1); |
| 256 | uicxx . . $ StationeryDialog#ui.->orientationLabelcxx . . $ Ui_PaperDialog#orientationLabel.->setPixmapcxx . . $ QLabel#setPixmap(8887f7d25b86c3f4).(*pixmap1); |
| 257 | |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | void StationeryDialogcxx . . $ StationeryDialog#::savecxx . . $ StationeryDialog#save(7df51288a9ebd664).(QStringcxx . . $ QString# name) |
| 262 | { |
| 263 | //TODO - sort(??) |
| 264 | if (name.lengthcxx . . $ QString#length(455f465bc33b4cdf).() == 0) return; |
| 265 | if (name.indexOfcxx . . $ QString#indexOf(a1e52806cd31c200).("\""cxx . . $ QString#QString(85c52e162fed56f9).) >= 0) //TODO: here is too late (in case combo box was changed |
| 266 | { |
| 267 | QMessageBoxcxx . . $ QMessageBox#::warningcxx . . $ QMessageBox#warning(21b6fd1dd558cc82).(this, "stationery"cxx . . $ QString#QString(85c52e162fed56f9)., "Stationery name cannot contain quotes"cxx . . $ QString#QString(85c52e162fed56f9)., |
| 268 | QMessageBoxcxx . . $ QMessageBox#::Okcxx . . $ QMessageBox#Ok., QMessageBoxcxx . . $ QMessageBox#::NoButtoncxx . . $ QMessageBox#NoButton.); |
| 269 | uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->setFocuscxx . . $ QWidget#setFocus(49f6e7a06ebc5aa8).(); |
| 270 | return; |
| 271 | } |
| 272 | QSharedPointercxx . . $ QSharedPointer#<Stationerycxx . . $ Stationery#> stcxx . . $ QSharedPointer#QSharedPointer(21100a343a80bccd).(createRecordcxx . . $ StationeryDialog#createRecord(c14d0b2fe9e82123).()); |
| 273 | Preferencescxx . . $ Preferences#::getInstancecxx . . $ Preferences#getInstance(2e7be89de0a5bc0).().setStationerycxx . . $ Preferences#setStationery(92508cfadafeabe5).(name, *cxx . . $ QSharedPointer#`operator*`(c93303b41ac66b6d).st); |
| 274 | } |
| 275 | |
| 276 | void StationeryDialogcxx . . $ StationeryDialog#::stationeryNameChangedcxx . . $ StationeryDialog#stationeryNameChanged(7df51288a9ebd664).(QStringcxx . . $ QString#) |
| 277 | { |
| 278 | savecxx . . $ StationeryDialog#save(7df51288a9ebd664).(mCurrentNamecxx . . $ QString#QString(3520e46b33348bf6).); |
| 279 | mCurrentNamecxx . . $ StationeryDialog#mCurrentName. =cxx . . $ QString#`operator=`(7b76e6691bca1027). uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).(); |
| 280 | populatecxx . . $ StationeryDialog#populate(49f6e7a06ebc5aa8).(); |
| 281 | repaintcxx . . $ QWidget#repaint(49f6e7a06ebc5aa8).(); |
| 282 | } |
| 283 | |
| 284 | void StationeryDialogcxx . . $ StationeryDialog#::stationeryNameEditedcxx . . $ StationeryDialog#stationeryNameEdited(7df51288a9ebd664).(QStringcxx . . $ QString# name) |
| 285 | { |
| 286 | setProtectedcxx . . $ StationeryDialog#setProtected(b45ddcbc8423892c).(builtinStationerycxx . . $ StationeryDialog#builtinStationery(7dc6c9a0b6a7270f).(namecxx . . $ QString#QString(3520e46b33348bf6).)); |
| 287 | } |
| 288 | |
| 289 | void StationeryDialogcxx . . $ StationeryDialog#::cancelClickedcxx . . $ StationeryDialog#cancelClicked(49f6e7a06ebc5aa8).() //TODO allow exit when there is no name |
| 290 | { |
| 291 | if (uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).().lengthcxx . . $ QString#length(455f465bc33b4cdf).() == 0) |
| 292 | { |
| 293 | QMessageBoxcxx . . $ QMessageBox#::warningcxx . . $ QMessageBox#warning(21b6fd1dd558cc82).(this, "stationery"cxx . . $ QString#QString(85c52e162fed56f9)., "Please enter stationery name"cxx . . $ QString#QString(85c52e162fed56f9)., |
| 294 | QMessageBoxcxx . . $ QMessageBox#::Okcxx . . $ QMessageBox#Ok., QMessageBoxcxx . . $ QMessageBox#::NoButtoncxx . . $ QMessageBox#NoButton.); |
| 295 | FieldTipcxx . . $ FieldTip# *balloon = new FieldTipcxx . . $ FieldTip#(this, true); |
| 296 | balloon->setOwnercxx . . $ FieldTip#setOwner(108f35f7aa7f3cf9).(uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.); |
| 297 | balloon->showMessagecxx . . $ FieldTip#showMessage(29ed8fcd127906b1).("Give a name to this stationery"cxx . . $ QString#QString(85c52e162fed56f9).,2000); |
| 298 | uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->setFocuscxx . . $ QWidget#setFocus(49f6e7a06ebc5aa8).(); |
| 299 | return; |
| 300 | } |
| 301 | |
| 302 | savecxx . . $ StationeryDialog#save(7df51288a9ebd664).(uicxx . . $ QString#QString(e1217c004a86c950).->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).()); |
| 303 | deleteLatercxx . . $ QObject#deleteLater(49f6e7a06ebc5aa8).(); |
| 304 | } |
| 305 | |
| 306 | bool StationeryDialogcxx . . $ StationeryDialog#::builtinStationerycxx . . $ StationeryDialog#builtinStationery(7dc6c9a0b6a7270f).(QStringcxx . . $ QString# stationeryName) |
| 307 | { |
| 308 | if (stationeryName ==cxx . . $ QString#`operator==`(7d4bdb1abc417636). "Legacy Green") |
| 309 | return true; |
| 310 | else |
| 311 | return false; |
| 312 | } |
| 313 | |
| 314 | void StationeryDialogcxx . . $ StationeryDialog#::deleteClickedcxx . . $ StationeryDialog#deleteClicked(49f6e7a06ebc5aa8).() |
| 315 | { |
| 316 | QStringcxx . . $ QString# stationeryToDelete = uicxx . . $ QString#QString(e1217c004a86c950).->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).(); |
| 317 | mCurrentNamecxx . . $ StationeryDialog#mCurrentName. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 318 | Preferencescxx . . $ Preferences#::getInstancecxx . . $ Preferences#getInstance(2e7be89de0a5bc0).().deleteStationerycxx . . $ Preferences#deleteStationery(3520e46b33348bf6).(stationeryToDelete); |
| 319 | uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->clearcxx . . $ QComboBox#clear(49f6e7a06ebc5aa8).(); |
| 320 | QStringListcxx . . $ QStringList# items = Preferencescxx . . $ Preferences#::getInstancecxx . . $ Preferences#getInstance(2e7be89de0a5bc0).().stationeryListcxx . . $ Preferences#stationeryList(669a05bc42dd57cc).(); |
| 321 | if (items.countcxx . . $ QList#count(455f465bc33b4cdf).() > 0) uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->insertItemscxx . . $ QComboBox#insertItems(c6059507b8fd4559).(0,items); |
| 322 | else uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->clearcxx . . $ QComboBox#clear(49f6e7a06ebc5aa8).(); |
| 323 | uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->setCurrentIndexcxx . . $ QComboBox#setCurrentIndex(d4f767463ce0a6b3).(0); |
| 324 | } |
| 325 | |
| 326 | StationeryPtrcxx . . $ StationeryPtr# StationeryDialogcxx . . $ StationeryDialog#::createRecordcxx . . $ StationeryDialog#createRecord(c14d0b2fe9e82123).() |
| 327 | { |
| 328 | QSharedPointercxx . . $ QSharedPointer#<Stationerycxx . . $ Stationery#> retcxx . . $ QSharedPointer#QSharedPointer(7e6e718d4f0ca9be).(new Stationerycxx . . $ Stationery#Stationery(98916b0b04ef2070).(uicxx . . $ StationeryDialog#ui.->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).(), |
| 329 | uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).(), |
| 330 | uicxx . . $ StationeryDialog#ui.->customSizeWcxx . . $ Ui_PaperDialog#customSizeW.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).(), |
| 331 | uicxx . . $ StationeryDialog#ui.->customSizeHcxx . . $ Ui_PaperDialog#customSizeH.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).(), |
| 332 | mTopMarginSpinBoxcxx . . $ StationeryDialog#mTopMarginSpinBox.->valuecxx . . $ InchesSpinBox#value(b126dc7c1de90089).(), |
| 333 | uicxx . . $ StationeryDialog#ui.->mmRadioButtoncxx . . $ Ui_PaperDialog#mmRadioButton.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).(), |
| 334 | uicxx . . $ StationeryDialog#ui.->portraitRadioButtoncxx . . $ Ui_PaperDialog#portraitRadioButton.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).(), |
| 335 | uicxx . . $ StationeryDialog#ui.->barsColorComboBoxcxx . . $ Ui_PaperDialog#barsColorComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).(), |
| 336 | uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).(), |
| 337 | uicxx . . $ StationeryDialog#ui.->decorationCheckBoxcxx . . $ Ui_PaperDialog#decorationCheckBox.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).(), |
| 338 | uicxx . . $ StationeryDialog#ui.->feedHolesCheckBoxcxx . . $ Ui_PaperDialog#feedHolesCheckBox.->isCheckedcxx . . $ QAbstractButton#isChecked(50ce9a9e25b4a850).())); |
| 339 | |
| 340 | return retcxx . . $ QSharedPointer#QSharedPointer(21100a343a80bccd).; |
| 341 | } |
| 342 | |
| 343 | void StationeryDialogcxx . . $ StationeryDialog#::populatecxx . . $ StationeryDialog#populate(49f6e7a06ebc5aa8).() |
| 344 | { |
| 345 | QSharedPointercxx . . $ QSharedPointer#<Stationerycxx . . $ Stationery#> st = QSharedPointercxx . . $ QSharedPointer#QSharedPointer(21100a343a80bccd).<Stationerycxx . . $ Stationery#>(Preferencescxx . . $ Preferences#::getInstancecxx . . $ Preferences#getInstance(2e7be89de0a5bc0).().stationerycxx . . $ Preferences#stationery(67fc5f67fc2935ed).(uicxx . . $ QString#QString(e1217c004a86c950).->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).())); |
| 346 | uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->setCurrentTextcxx . . $ QComboBox#setCurrentText(3520e46b33348bf6).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mPaperSizecxx . . $ Stationery#mPaperSize.); |
| 347 | uicxx . . $ StationeryDialog#ui.->customSizeWcxx . . $ Ui_PaperDialog#customSizeW.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mSize1cxx . . $ Stationery#mSize1.); |
| 348 | uicxx . . $ StationeryDialog#ui.->customSizeHcxx . . $ Ui_PaperDialog#customSizeH.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mSize2cxx . . $ Stationery#mSize2.); |
| 349 | mTopMarginSpinBoxcxx . . $ StationeryDialog#mTopMarginSpinBox.->setValuecxx . . $ InchesSpinBox#setValue(d4f767463ce0a6b3).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mTopMargincxx . . $ Stationery#mTopMargin.); |
| 350 | uicxx . . $ StationeryDialog#ui.->mmRadioButtoncxx . . $ Ui_PaperDialog#mmRadioButton.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mMillimeterscxx . . $ Stationery#mMillimeters.); |
| 351 | uicxx . . $ StationeryDialog#ui.->portraitRadioButtoncxx . . $ Ui_PaperDialog#portraitRadioButton.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mPortraitcxx . . $ Stationery#mPortrait.); |
| 352 | uicxx . . $ StationeryDialog#ui.->landscapeRadioButtoncxx . . $ Ui_PaperDialog#landscapeRadioButton.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(!st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mPortraitcxx . . $ Stationery#mPortrait.); |
| 353 | uicxx . . $ StationeryDialog#ui.->barsColorComboBoxcxx . . $ Ui_PaperDialog#barsColorComboBox.->setCurrentTextcxx . . $ QComboBox#setCurrentText(3520e46b33348bf6).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mBarsColorcxx . . $ Stationery#mBarsColor.); |
| 354 | uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.->setTextcxx . . $ QLineEdit#setText(3520e46b33348bf6).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mBarsRGBcxx . . $ Stationery#mBarsRGB.); |
| 355 | uicxx . . $ StationeryDialog#ui.->decorationCheckBoxcxx . . $ Ui_PaperDialog#decorationCheckBox.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mDecoratedcxx . . $ Stationery#mDecorated.); |
| 356 | uicxx . . $ StationeryDialog#ui.->feedHolesCheckBoxcxx . . $ Ui_PaperDialog#feedHolesCheckBox.->setCheckedcxx . . $ QAbstractButton#setChecked(b45ddcbc8423892c).(st->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mTractorFeedHolescxx . . $ Stationery#mTractorFeedHoles.); |
| 357 | |
| 358 | if (uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).().comparecxx . . $ QString#compare(38964227c2ffb4ec).("Custom"cxx . . $ QString#QString(85c52e162fed56f9).) == 0) |
| 359 | { |
| 360 | uicxx . . $ StationeryDialog#ui.->customSizeHcxx . . $ Ui_PaperDialog#customSizeH.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 361 | uicxx . . $ StationeryDialog#ui.->customSizeWcxx . . $ Ui_PaperDialog#customSizeW.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(true); |
| 362 | } |
| 363 | barsColorChangedcxx . . $ StationeryDialog#barsColorChanged(7df51288a9ebd664).(uicxx . . $ QString#QString(e1217c004a86c950).->barsColorComboBoxcxx . . $ Ui_PaperDialog#barsColorComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).()); |
| 364 | paperSizeChangedcxx . . $ StationeryDialog#paperSizeChanged(7df51288a9ebd664).(stcxx . . $ QString#QString(3520e46b33348bf6).->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).mPaperSizecxx . . $ Stationery#mPaperSize.); |
| 365 | bool disabled = builtinStationerycxx . . $ StationeryDialog#builtinStationery(7dc6c9a0b6a7270f).(uicxx . . $ QString#QString(e1217c004a86c950).->stationeryNameComboBoxcxx . . $ Ui_PaperDialog#stationeryNameComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).()); |
| 366 | setProtectedcxx . . $ StationeryDialog#setProtected(b45ddcbc8423892c).(disabled); |
| 367 | hOutDebugcxx . . $ `HercStudio/HerculesStudio.h:49:9`!(0,ui->paperSizeComboBox->currentText().toUtf8().data()); |
| 368 | if (uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->currentTextcxx . . $ QComboBox#currentText(6ef7b6c27b00b43d).().comparecxx . . $ QString#compare(38964227c2ffb4ec).("Custom"cxx . . $ QString#QString(85c52e162fed56f9).) == 0) |
| 369 | { |
| 370 | uicxx . . $ StationeryDialog#ui.->orientationGroupBoxcxx . . $ Ui_PaperDialog#orientationGroupBox.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(false); |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | void StationeryDialogcxx . . $ StationeryDialog#::setProtectedcxx . . $ StationeryDialog#setProtected(b45ddcbc8423892c).(bool disabled) |
| 375 | { |
| 376 | uicxx . . $ StationeryDialog#ui.->paperSizeComboBoxcxx . . $ Ui_PaperDialog#paperSizeComboBox.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 377 | uicxx . . $ StationeryDialog#ui.->customSizeWcxx . . $ Ui_PaperDialog#customSizeW.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 378 | uicxx . . $ StationeryDialog#ui.->customSizeHcxx . . $ Ui_PaperDialog#customSizeH.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 379 | mTopMarginSpinBoxcxx . . $ StationeryDialog#mTopMarginSpinBox.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 380 | uicxx . . $ StationeryDialog#ui.->orientationGroupBoxcxx . . $ Ui_PaperDialog#orientationGroupBox.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 381 | uicxx . . $ StationeryDialog#ui.->groupBox_2cxx . . $ Ui_PaperDialog#groupBox_2.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 382 | uicxx . . $ StationeryDialog#ui.->feedHolesCheckBoxcxx . . $ Ui_PaperDialog#feedHolesCheckBox.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 383 | uicxx . . $ StationeryDialog#ui.->decorationCheckBoxcxx . . $ Ui_PaperDialog#decorationCheckBox.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 384 | uicxx . . $ StationeryDialog#ui.->barsColorComboBoxcxx . . $ Ui_PaperDialog#barsColorComboBox.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 385 | uicxx . . $ StationeryDialog#ui.->deleteButtoncxx . . $ Ui_PaperDialog#deleteButton.->setEnabledcxx . . $ QWidget#setEnabled(b45ddcbc8423892c).(!disabled); |
| 386 | } |
| 387 | |
| 388 | void StationeryDialogcxx . . $ StationeryDialog#::feedHolesToggeledcxx . . $ StationeryDialog#feedHolesToggeled(49f6e7a06ebc5aa8).() |
| 389 | { |
| 390 | repaintcxx . . $ QWidget#repaint(49f6e7a06ebc5aa8).(); |
| 391 | } |
| 392 | |
| 393 | void StationeryDialogcxx . . $ StationeryDialog#::decorationToggeledcxx . . $ StationeryDialog#decorationToggeled(49f6e7a06ebc5aa8).() |
| 394 | { |
| 395 | repaintcxx . . $ QWidget#repaint(49f6e7a06ebc5aa8).(); |
| 396 | } |
| 397 | |
| 398 | void StationeryDialogcxx . . $ StationeryDialog#::customColorChangedcxx . . $ StationeryDialog#customColorChanged(49f6e7a06ebc5aa8).() |
| 399 | { |
| 400 | if (uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).().lengthcxx . . $ QString#length(455f465bc33b4cdf).() != 7) |
| 401 | return; |
| 402 | mPaperPreviewcxx . . $ StationeryDialog#mPaperPreview.->setBarsRgbcxx . . $ PaperPreview#setBarsRgb(d4f767463ce0a6b3).(ConfigurationEditorcxx . . $ ConfigurationEditor#::parseNumcxx . . $ ConfigurationEditor#parseNum(7b1020165ab78f0a).(uicxx . . $ StationeryDialog#ui.->customColorcxx . . $ Ui_PaperDialog#customColor.->textcxx . . $ QLineEdit#text(6ef7b6c27b00b43d).().rightcxx . . $ QString#right(3f3c3d0e9c0eb37f).(6).toStdStringcxx . . $ QString#toStdString(219584694fe2b248).(), 16)); |
| 403 | repaintcxx . . $ QWidget#repaint(49f6e7a06ebc5aa8).(); |
| 404 | } |
| 405 | |
| 406 | // |
| 407 | // InchesSpinBox |
| 408 | // |
| 409 | |
| 410 | InchesSpinBoxcxx . . $ InchesSpinBox#::InchesSpinBoxcxx . . $ InchesSpinBox#InchesSpinBox(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget# *parent) : QSpinBoxcxx . . $ QSpinBox#(parent) |
| 411 | { |
| 412 | mNumeratorcxx . . $ InchesSpinBox#mNumerator. = 8; |
| 413 | setRangecxx . . $ QSpinBox#setRange(3e454b8ccf442868).(1,32); |
| 414 | setSingleStepcxx . . $ QSpinBox#setSingleStep(d4f767463ce0a6b3).(1); |
| 415 | setValuecxx . . $ InchesSpinBox#setValue(d4f767463ce0a6b3).(mNumeratorcxx . . $ InchesSpinBox#mNumerator.); |
| 416 | } |
| 417 | |
| 418 | void InchesSpinBoxcxx . . $ InchesSpinBox#::setValuecxx . . $ InchesSpinBox#setValue(d4f767463ce0a6b3).(int val) |
| 419 | { |
| 420 | mNumeratorcxx . . $ InchesSpinBox#mNumerator. = val; |
| 421 | QSpinBoxcxx . . $ QSpinBox#::setValuecxx . . $ QSpinBox#setValue(d4f767463ce0a6b3).(mNumeratorcxx . . $ InchesSpinBox#mNumerator.); |
| 422 | } |
| 423 | |
| 424 | int InchesSpinBoxcxx . . $ InchesSpinBox#::valuecxx . . $ InchesSpinBox#value(b126dc7c1de90089).() |
| 425 | { |
| 426 | valueFromTextcxx . . $ InchesSpinBox#valueFromText(fbf1bd5053f90658).(this->textcxx . . $ QAbstractSpinBox#text(6ef7b6c27b00b43d).()); |
| 427 | return mNumeratorcxx . . $ InchesSpinBox#mNumerator.; |
| 428 | } |
| 429 | |
| 430 | int InchesSpinBoxcxx . . $ InchesSpinBox#::valueFromTextcxx . . $ InchesSpinBox#valueFromText(fbf1bd5053f90658).(const QStringcxx . . $ QString# &text) const |
| 431 | { |
| 432 | int slashPos = text.indexOfcxx . . $ QString#indexOf(75b556ba78e4903c).('/'cxx . . $ QChar#QChar(d4f767463ce0a6b3).); |
| 433 | bool ok; |
| 434 | |
| 435 | int numerator = text.leftcxx . . $ QString#left(3f3c3d0e9c0eb37f).(slashPos).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&ok); |
| 436 | if (!ok) return 8; |
| 437 | |
| 438 | int denominator = text.midcxx . . $ QString#mid(44b7563da18aea72).(slashPos+1).toIntcxx . . $ QString#toInt(d7972accae11ee1f).(&ok); |
| 439 | hOutDebugcxx . . $ `HercStudio/HerculesStudio.h:49:9`!(3, "den=" << denominator << " OK=" << (ok? "Y" : "N")); |
| 440 | if (!ok) return 8; |
| 441 | |
| 442 | if (denominator%2) return mNumeratorcxx . . $ InchesSpinBox#mNumerator.; |
| 443 | if (denominator == 2) mNumeratorcxx . . $ InchesSpinBox#mNumerator. = numerator * 8; |
| 444 | else if (denominator == 4) mNumeratorcxx . . $ InchesSpinBox#mNumerator. = numerator * 4; |
| 445 | else if (denominator == 8) mNumeratorcxx . . $ InchesSpinBox#mNumerator. = numerator * 2; |
| 446 | else mNumeratorcxx . . $ InchesSpinBox#mNumerator. = numerator; |
| 447 | return mNumeratorcxx . . $ InchesSpinBox#mNumerator.; |
| 448 | } |
| 449 | |
| 450 | QStringcxx . . $ QString# InchesSpinBoxcxx . . $ InchesSpinBox#::textFromValuecxx . . $ InchesSpinBox#textFromValue(3f3c3d0e9c0eb37f).(int val) const |
| 451 | { |
| 452 | stdcxx . . $ std/::stringstreamcxx . . $ std/stringstream# sscxx . . $ std/__cxx11/basic_stringstream#basic_stringstream(49f6e7a06ebc5aa8).; |
| 453 | |
| 454 | if ((val%16) == 0) |
| 455 | { |
| 456 | ss <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). (val/16) ; |
| 457 | } |
| 458 | else if ((val%8) == 0) |
| 459 | { |
| 460 | ss <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). (val/8) <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "/" <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "2"; |
| 461 | } |
| 462 | else if ((val%4) == 0) |
| 463 | { |
| 464 | ss <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). (val/4) <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "/" <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "4"; |
| 465 | } |
| 466 | else if ((val%2) == 0) |
| 467 | { |
| 468 | ss <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). (val/2) <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "/" <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "8"; |
| 469 | } |
| 470 | else\ |
| 471 | { |
| 472 | ss <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). val <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "/" <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "16"; |
| 473 | } |
| 474 | //ss << " (" << val << "/16)"; |
| 475 | |
| 476 | hOutDebugcxx . . $ `HercStudio/HerculesStudio.h:49:9`!(7, "text=" << ss.str()); |
| 477 | returncxx . . $ QString#QString(e1217c004a86c950). sscxx . . $ QString#QString(85c52e162fed56f9)..strcxx . . $ std/__cxx11/basic_stringstream#str(d33e1a6fd36255f7).().c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).(); |
| 478 | } |
| 479 | |
| 480 | |
| 481 | |
| 482 | // |
| 483 | // PaperPreview |
| 484 | // |
| 485 | |
| 486 | |
| 487 | PaperPreviewcxx . . $ PaperPreview#::PaperPreviewcxx . . $ PaperPreview#PaperPreview(fde72f6d56455dc7).(StationeryDialogcxx . . $ StationeryDialog# *dialog, QWidgetcxx . . $ QWidget# *parent) : |
| 488 | QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(parent), mDialogcxx . . $ PaperPreview#mDialog.(dialog) |
| 489 | { |
| 490 | |
| 491 | } |
| 492 | |
| 493 | void PaperPreviewcxx . . $ PaperPreview#::paintEventcxx . . $ PaperPreview#paintEvent(f239c9e85d61a220).(QPaintEventcxx . . $ QPaintEvent# *) |
| 494 | { |
| 495 | |
| 496 | QPaintercxx . . $ QPainter# pcxx . . $ QPainter#QPainter(dd2eedc069b0ab5f).(this); |
| 497 | StationeryPtrcxx . . $ StationeryPtr# s = mDialogcxx . . $ QSharedPointer#QSharedPointer(21100a343a80bccd).->createRecordcxx . . $ StationeryDialog#createRecord(c14d0b2fe9e82123).(); |
| 498 | PagePrintercxx . . $ PagePrinter# ppcxx . . $ PagePrinter#PagePrinter(fc86a1dab6867639).(s, p); |
| 499 | pp.preparePagecxx . . $ GenericPagePrinter#preparePage(b45ddcbc8423892c).(true); |
| 500 | } |
| 501 |