| 1 | /* |
| 2 | * File: HetInit.h |
| 3 | * |
| 4 | * Author: Jacob Dekel |
| 5 | * Created on: Sep 3, 2010 |
| 6 | * |
| 7 | * Copyright (c) 2009-2013 Jacob Dekel |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Hetinit utility object |
| 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 HETINIT_H |
| 28 | #define HETINIT_H |
| 29 | |
| 30 | #include "GenericUtility.h" |
| 31 | |
| 32 | #include <QtWidgets/QDialog> |
| 33 | #include <QAbstractSpinBox> |
| 34 | #include "ui_HetInit.h" |
| 35 | |
| 36 | class VolserSpinBox : public QAbstractSpinBox |
| 37 | { |
| 38 | Q_OBJECT |
| 39 | public: |
| 40 | VolserSpinBox(QWidget * parent = 0); |
| 41 | virtual ~VolserSpinBox(); |
| 42 | |
| 43 | virtual QFlags<QAbstractSpinBox::StepEnabledFlag> stepEnabled () const; |
| 44 | virtual QString text() const; |
| 45 | virtual void setText(QString text); |
| 46 | |
| 47 | protected: |
| 48 | QFlags<QAbstractSpinBox::StepEnabledFlag> mStepFlag; |
| 49 | virtual void stepBy (int steps); |
| 50 | |
| 51 | protected slots: |
| 52 | bool verify(); |
| 53 | |
| 54 | }; |
| 55 | |
| 56 | class HetInit : public GenericUtility |
| 57 | { |
| 58 | Q_OBJECT |
| 59 | |
| 60 | public: |
| 61 | HetInit(QWidget *parent = 0); |
| 62 | ~HetInit(); |
| 63 | |
| 64 | private: |
| 65 | Ui::HetInitClass ui; |
| 66 | QAbstractSpinBox *mVolser; |
| 67 | |
| 68 | virtual void finishedSlot(); |
| 69 | |
| 70 | private slots: |
| 71 | void exitClicked(); |
| 72 | void runClicked(); |
| 73 | void browseFileClicked(); |
| 74 | void browseDirClicked(); |
| 75 | }; |
| 76 | |
| 77 | #endif // HETINIT_H |