|
1 /* |
|
2 * LDForge: LDraw parts authoring CAD |
|
3 * Copyright (C) 2013, 2014 Santeri Piippo |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU General Public License as published by |
|
7 * the Free Software Foundation, either version 3 of the License, or |
|
8 * (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, see <http://www.gnu.org/licenses/>. |
|
17 */ |
|
18 |
|
19 #pragma once |
|
20 #include <QDialog> |
|
21 #include "main.h" |
|
22 #include "basics.h" |
|
23 |
|
24 class Ui_ExtProgPath; |
|
25 class QRadioButton; |
|
26 class QCheckBox; |
|
27 class QProgressBar; |
|
28 class QGroupBox; |
|
29 class QDialogButtonBox; |
|
30 class QDoubleSpinBox; |
|
31 class QPushButton; |
|
32 class QLineEdit; |
|
33 class QSpinBox; |
|
34 class RadioGroup; |
|
35 class QLabel; |
|
36 class QAbstractButton; |
|
37 class Ui_OverlayUI; |
|
38 class Ui_LDPathUI; |
|
39 class Ui_OpenProgressUI; |
|
40 |
|
41 class OverlayDialog : public QDialog |
|
42 { |
|
43 Q_OBJECT |
|
44 |
|
45 public: |
|
46 explicit OverlayDialog (QWidget* parent = null, Qt::WindowFlags f = 0); |
|
47 virtual ~OverlayDialog(); |
|
48 |
|
49 QString fpath() const; |
|
50 int ofsx() const; |
|
51 int ofsy() const; |
|
52 double lwidth() const; |
|
53 double lheight() const; |
|
54 int camera() const; |
|
55 |
|
56 private: |
|
57 Ui_OverlayUI* ui; |
|
58 QList<Pair<QRadioButton*, int>> m_cameraArgs; |
|
59 |
|
60 private slots: |
|
61 void slot_fpath(); |
|
62 void slot_help(); |
|
63 void slot_dimensionsChanged(); |
|
64 void fillDefaults (int newcam); |
|
65 }; |
|
66 |
|
67 // ============================================================================= |
|
68 class LDrawPathDialog : public QDialog |
|
69 { |
|
70 Q_OBJECT |
|
71 |
|
72 public: |
|
73 explicit LDrawPathDialog (const bool validDefault, QWidget* parent = null, Qt::WindowFlags f = 0); |
|
74 virtual ~LDrawPathDialog(); |
|
75 QString filename() const; |
|
76 void setPath (QString path); |
|
77 |
|
78 private: |
|
79 Q_DISABLE_COPY (LDrawPathDialog) |
|
80 const bool m_validDefault; |
|
81 Ui_LDPathUI* ui; |
|
82 QPushButton* okButton(); |
|
83 QPushButton* cancelButton(); |
|
84 |
|
85 private slots: |
|
86 void slot_findPath(); |
|
87 void slot_tryConfigure(); |
|
88 void slot_exit(); |
|
89 void slot_accept(); |
|
90 }; |
|
91 |
|
92 // ============================================================================= |
|
93 class OpenProgressDialog : public QDialog |
|
94 { |
|
95 Q_OBJECT |
|
96 PROPERTY (public, int, progress, setProgress, STOCK_WRITE) |
|
97 PROPERTY (public, int, numLines, setNumLines, CUSTOM_WRITE) |
|
98 |
|
99 public: |
|
100 explicit OpenProgressDialog (QWidget* parent = null, Qt::WindowFlags f = 0); |
|
101 virtual ~OpenProgressDialog(); |
|
102 |
|
103 public slots: |
|
104 void updateProgress (int progress); |
|
105 |
|
106 private: |
|
107 Ui_OpenProgressUI* ui; |
|
108 |
|
109 void updateValues(); |
|
110 }; |
|
111 |
|
112 // ============================================================================= |
|
113 class ExtProgPathPrompt : public QDialog |
|
114 { |
|
115 Q_OBJECT |
|
116 |
|
117 public: |
|
118 explicit ExtProgPathPrompt (QString progName, QWidget* parent = 0, Qt::WindowFlags f = 0); |
|
119 virtual ~ExtProgPathPrompt(); |
|
120 QString getPath() const; |
|
121 |
|
122 public slots: |
|
123 void findPath(); |
|
124 |
|
125 private: |
|
126 Ui_ExtProgPath* ui; |
|
127 }; |
|
128 |
|
129 // ============================================================================= |
|
130 class AboutDialog : public QDialog |
|
131 { |
|
132 Q_OBJECT |
|
133 |
|
134 public: |
|
135 AboutDialog (QWidget* parent = null, Qt::WindowFlags f = 0); |
|
136 |
|
137 private slots: |
|
138 void slot_mail(); |
|
139 }; |
|
140 |
|
141 void bombBox (const QString& message); |