src/dialogs.h

Tue, 14 May 2013 04:03:52 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Tue, 14 May 2013 04:03:52 +0300
changeset 200
5583af82087e
parent 199
10dd5909a50e
child 202
a027f6fc6141
permissions
-rw-r--r--

Merged new part and LDraw path dialogs into dialogs.cpp

198
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 #ifndef DIALOGS_H
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 #define DIALOGS_H
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
3
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 #include <QDialog>
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 #include "common.h"
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 class QDialogButtonBox;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 class QDoubleSpinBox;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 class QPushButton;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 class QLineEdit;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 class QSpinBox;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 class RadioBox;
199
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
13 template<class T> class CheckBoxGroup;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
14 class QLabel;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
15 class QAbstractButton;
198
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 class OverlayDialog : public QDialog {
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18 Q_OBJECT
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 public:
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21 explicit OverlayDialog (QWidget* parent = null, Qt::WindowFlags f = 0);
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23 str fpath () const;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24 ushort ofsx () const;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 ushort ofsy () const;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
26 double lwidth () const;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27 double lheight () const;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 int camera () const;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30 private:
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 RadioBox* rb_camera;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32 QPushButton* btn_fpath;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 QLineEdit* le_fpath;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34 QSpinBox* sb_ofsx, *sb_ofsy;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35 QDoubleSpinBox* dsb_lwidth, *dsb_lheight;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
36 QDialogButtonBox* dbb_buttons;
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
37
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
38 private slots:
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
39 void slot_fpath ();
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
40 void slot_help ();
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
41 void slot_dimensionsChanged ();
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42 void fillDefaults (int newcam);
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
43 };
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
44
199
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
45 class ReplaceCoordsDialog : public QDialog {
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
46 public:
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
47 explicit ReplaceCoordsDialog (QWidget* parent = null, Qt::WindowFlags f = 0);
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
48
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
49 vector<Axis> axes () const;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
50 double searchValue () const;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
51 double replacementValue () const;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
52
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
53 private:
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
54 CheckBoxGroup<Axis>* cbg_axes;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
55 QLabel* lb_search, *lb_replacement;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
56 QDoubleSpinBox* dsb_search, *dsb_replacement;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
57 };
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
58
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
59 // =============================================================================
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
60 // SetContentsDialog
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
61 //
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
62 // Performs the Set Contents dialog on the given LDObject. Object's contents
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
63 // are exposed to the user and is reinterpreted if the user accepts the new
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
64 // contents.
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
65 // =============================================================================
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
66 class SetContentsDialog : public QDialog {
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
67 public:
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
68 explicit SetContentsDialog (QWidget* parent = null, Qt::WindowFlags f = 0);
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
69 str text () const;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
70 void setObject (LDObject* obj);
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
71
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
72 private:
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
73 QLabel* lb_contents, *lb_errorIcon, *lb_error;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
74 QLineEdit* le_contents;
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
75 };
10dd5909a50e Made Qt file includes more proper (<QLineEdit> instead of <qlineedit.h>), merged setContentsDialog.cpp into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 198
diff changeset
76
200
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
77 class LDrawPathDialog : public QDialog {
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
78 Q_OBJECT
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
79
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
80 public:
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
81 explicit LDrawPathDialog (const bool validDefault, QWidget* parent = null, Qt::WindowFlags f = 0);
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
82 str path () const;
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
83 void setPath (str path);
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
84
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
85 private:
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
86 Q_DISABLE_COPY (LDrawPathDialog)
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
87
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
88 QLabel* lb_resolution;
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
89 QLineEdit* le_path;
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
90 QPushButton* btn_findPath, *btn_tryConfigure, *btn_cancel;
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
91 QDialogButtonBox* dbb_buttons;
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
92 const bool m_validDefault;
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
93
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
94 QPushButton* okButton ();
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
95
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
96 private slots:
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
97 void slot_findPath ();
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
98 void slot_tryConfigure ();
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
99 void slot_exit ();
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
100 };
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
101
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
102 class NewPartDialog : public QDialog {
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
103 public:
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
104 enum { CCAL, NonCA, NoLicense };
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
105 enum { CCW, CW, NoWinding };
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
106
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
107 explicit NewPartDialog (QWidget* parent = null, Qt::WindowFlags f = 0);
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
108 static void StaticDialog ();
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
109
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
110 QLabel* lb_brickIcon, *lb_name, *lb_author, *lb_license, *lb_BFC;
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
111 QLineEdit* le_name, *le_author;
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
112 RadioBox* rb_license, *rb_BFC;
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
113 };
5583af82087e Merged new part and LDraw path dialogs into dialogs.cpp
Santeri Piippo <crimsondusk64@gmail.com>
parents: 199
diff changeset
114
198
f246725199dc Split some stuff into separate files
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
115 #endif // DIALOGS_H

mercurial