1 /****************************************************************************
2 **
3   * snap to equidistant points on entities
4 
5 Copyright (C) 2011 Dongxu Li (dongxuli2011@gmail.com)
6 Copyright (C) 2011 R. van Twisk (librecad@rvt.dds.nl)
7 
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
12 
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 **********************************************************************/
22 
23 #ifndef QG_SNAPMIDDLEOPTIONS_H
24 #define QG_SNAPMIDDLEOPTIONS_H
25 
26 #include<memory>
27 #include<QWidget>
28 
29 namespace Ui {
30 class Ui_SnapMiddleOptions;
31 }
32 
33 /**
34   * snap to equidistant points on entities
35   *@Author: Dongxu Li
36   */
37 class QG_SnapMiddleOptions : public QWidget
38 {
39     Q_OBJECT
40 
41 public:
42     QG_SnapMiddleOptions(int& i, QWidget* parent = 0, Qt::WindowFlags fl = 0);
43     ~QG_SnapMiddleOptions();
44 
45 public slots:
46     virtual void setMiddlePoints(int& i, bool initial=true);
47     virtual void updateMiddlePoints();
48 
49 protected:
50     int* middlePoints;
51 
52 protected slots:
53     virtual void languageChange();
54 
55 private slots:
56     void on_sbMiddlePoints_valueChanged(int arg1);
57 
58 private:
59 	void saveSettings();
60 	std::unique_ptr<Ui::Ui_SnapMiddleOptions> ui;
61 };
62 
63 #endif // QG_SNAPMIDDLEOPTIONS_H
64