|
| 1 | +/* |
| 2 | +* |
| 3 | +* ***** BEGIN GPL LICENSE BLOCK ***** |
| 4 | +* |
| 5 | +* This program is free software; you can redistribute it and/or |
| 6 | +* modify it under the terms of the GNU General Public License |
| 7 | +* as published by the Free Software Foundation; either version 2 |
| 8 | +* of the License, or (at your option) any later version. |
| 9 | +* |
| 10 | +* This program is distributed in the hope that it will be useful, |
| 11 | +* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +* GNU General Public License for more details. |
| 14 | +* |
| 15 | +* You should have received a copy of the GNU General Public License |
| 16 | +* along with this program; if not, write to the Free Software Foundation, |
| 17 | +* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 18 | +* |
| 19 | +* The Original Code is Copyright (C) 2005 by xxxxxxxxxxxxxx |
| 20 | +* All rights reserved. |
| 21 | +* |
| 22 | +* The Original Code is: all of this file. |
| 23 | +* |
| 24 | +* Contributor(s): none yet. |
| 25 | +* |
| 26 | +* ***** END GPL LICENSE BLOCK ***** |
| 27 | +*/ |
| 28 | + |
| 29 | +/**************************************************************************** |
| 30 | + ** |
| 31 | + ** |
| 32 | + ****************************************************************************/ |
| 33 | + |
| 34 | +#ifndef BASICSMODE_H |
| 35 | +#define BASICSMODE_H |
| 36 | + |
| 37 | +#include <QWidget> |
| 38 | +#include <QPushButton> |
| 39 | +#include <QGridLayout> |
| 40 | + |
| 41 | +/*! |
| 42 | + \file BasicsMode.hh |
| 43 | + \brief Definition of the BasicsMode class |
| 44 | + |
| 45 | + \see BasicsMode |
| 46 | +*/ |
| 47 | + |
| 48 | +#include "MainWindow.hh" |
| 49 | + |
| 50 | +class MainWindow; |
| 51 | + |
| 52 | +class QComboBox; |
| 53 | +class QPushButton; |
| 54 | +class QGroupBox; |
| 55 | +class QCheckBox; |
| 56 | +class QLabel; |
| 57 | + |
| 58 | +class BasicsMode : public QWidget { |
| 59 | + Q_OBJECT |
| 60 | + |
| 61 | +public: |
| 62 | + BasicsMode(QWidget *parent, QShortcutManager *sm, QWidget *actionList); |
| 63 | + void addActions(QActionGroup *actionGroup, QToolBar *toolBar, QStackedWidget *stackedWidget); |
| 64 | + QMenu* getMenu(); |
| 65 | + void retranslateUi(); |
| 66 | + |
| 67 | + QAction *mInsertEdgeAction; |
| 68 | + QAction *mDeleteEdgeAction; |
| 69 | + QAction *mCollapseEdgeAction; |
| 70 | + QAction *mSubdivideEdgeAction; |
| 71 | + QAction *mConnectEdgesAction; |
| 72 | + QAction *mSpliceCornersAction; |
| 73 | + QAction *mTransformsAction; |
| 74 | + QAction *mSelectionOptionsAction; |
| 75 | + |
| 76 | + QWidget *mInsertEdgeWidget; |
| 77 | + QWidget *mDeleteEdgeWidget; |
| 78 | + QWidget *mCollapseEdgeWidget; |
| 79 | + QWidget *mSubdivideEdgeWidget; |
| 80 | + QWidget *mConnectEdgesWidget; |
| 81 | + QWidget *mSpliceCornersWidget; |
| 82 | + QWidget *mTransformsWidget; |
| 83 | + QWidget *mSelectionOptionsWidget; |
| 84 | + |
| 85 | + QGridLayout *mInsertEdgeLayout; |
| 86 | + QGridLayout *mDeleteEdgeLayout; |
| 87 | + QGridLayout *mCollapseEdgeLayout; |
| 88 | + QGridLayout *mSubdivideEdgeLayout; |
| 89 | + QGridLayout *mConnectEdgesLayout; |
| 90 | + QGridLayout *mSpliceCornersLayout; |
| 91 | + QGridLayout *mTransformsLayout; |
| 92 | + QGridLayout *mSelectionOptionsLayout; |
| 93 | + |
| 94 | +protected: |
| 95 | + void setupInsertEdge(); |
| 96 | + void setupDeleteEdge(); |
| 97 | + void setupCollapseEdge(); |
| 98 | + void setupSubdivideEdge(); |
| 99 | + void setupConnectEdges(); |
| 100 | + void setupSpliceCorners(); |
| 101 | + void setupTransforms(); |
| 102 | + void setupSelectionOptions(); |
| 103 | + QDoubleSpinBox *createDoubleSpinBox(QGridLayout *layout, QLabel *label, QString s, double low, double high, double step, double value, double decimals, int row, int col); |
| 104 | + |
| 105 | + |
| 106 | +private: |
| 107 | + |
| 108 | + QWidget *mParent; |
| 109 | + QMenu *mBasicsMenu; |
| 110 | + |
| 111 | + QLabel *numSubdivsLabel; |
| 112 | + QDoubleSpinBox *numSubdivsSpinBox; |
| 113 | + QLabel *transformLabel; |
| 114 | + QLabel *xPosLabel; |
| 115 | + QLabel *yPosLabel; |
| 116 | + QLabel *zPosLabel; |
| 117 | + QLabel *scaleLabel; |
| 118 | + QLabel *xScaleLabel; |
| 119 | + QLabel *yScaleLabel; |
| 120 | + QLabel *zScaleLabel; |
| 121 | + |
| 122 | + QLabel *noOptionsInsertEdgeLabel; |
| 123 | + QCheckBox *cleanupDeleteEdgeCheckBox; |
| 124 | + QLabel *noOptionsCollapseEdgeLabel; |
| 125 | + QLabel *noOptionsConnectEdgesLabel; |
| 126 | + QLabel *noOptionsSpliceCornersLabel; |
| 127 | + |
| 128 | + QPushButton *freezeTransformsButton; |
| 129 | + |
| 130 | + //transform spinboxes |
| 131 | + QDoubleSpinBox *xScaleSpinBox; |
| 132 | + QDoubleSpinBox *yScaleSpinBox; |
| 133 | + QDoubleSpinBox *zScaleSpinBox; |
| 134 | + QDoubleSpinBox *xPosSpinBox; |
| 135 | + QDoubleSpinBox *yPosSpinBox; |
| 136 | + QDoubleSpinBox *zPosSpinBox; |
| 137 | + |
| 138 | + QLabel *mFaceAreaToleranceLabel; |
| 139 | + QDoubleSpinBox *mFaceAreaToleranceSpinBox; |
| 140 | + |
| 141 | + QLabel *mSplit2ValenceVertexOffsetLabel; |
| 142 | + QDoubleSpinBox *mSplit2ValenceVertexOffsetSpinBox; |
| 143 | + |
| 144 | +public slots: |
| 145 | + void freezeTransforms(); |
| 146 | + |
| 147 | + void triggerInsertEdge(); |
| 148 | + void triggerDeleteEdge(); |
| 149 | + void triggerCollapseEdge(); |
| 150 | + void triggerSubdivideEdge(); |
| 151 | + void triggerConnectEdges(); |
| 152 | + void triggerSpliceCorners(); |
| 153 | + void triggerTransforms(); |
| 154 | + void triggerSelectionOptions(); |
| 155 | +}; |
| 156 | + |
| 157 | +#endif |
0 commit comments