MeshTex  3.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
SetScaleDialog.h
Go to the documentation of this file.
1 
7 /*
8  * Copyright 2012 Joel Baxter
9  *
10  * This file is part of MeshTex.
11  *
12  * MeshTex 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  * MeshTex 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 MeshTex. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #if !defined(INCLUDED_SETSCALEDIALOG_H)
27 #define INCLUDED_SETSCALEDIALOG_H
28 
29 #include "GenericDialog.h"
30 #include "MeshVisitor.h"
31 
42 {
43 private: // private types
44 
49  {
50  public:
56  typedef struct {
74  float scaleOrTiles;
75  } SliceArgs;
76  public:
77  SetScaleVisitor(const SliceArgs *rowArgs,
78  const SliceArgs *colArgs);
79  private:
80  bool Execute(MeshEntity& meshEntity) const;
81  private:
82  const SliceArgs *_rowArgs;
83  const SliceArgs *_colArgs;
84  };
85 
86 public: // public methods
87 
88  SetScaleDialog(const std::string& key);
90  bool Apply();
91  void PopulateSWidgets(float scale,
92  float tiles);
93  void PopulateTWidgets(float scale,
94  float tiles);
95 
96 private: // private methods
97 
98  void PopulateEntry(const char *widgetName,
99  float value);
100 
101 private: // private member vars
102 
107  SmartPointer<MeshVisitor> _nullVisitor;
108 };
109 
110 #endif // #if !defined(INCLUDED_SETSCALEDIALOG_H)