zz_setContentsDialog.h

Mon, 22 Apr 2013 17:15:25 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Mon, 22 Apr 2013 17:15:25 +0300
changeset 131
3ccb10f6ed0b
parent 104
6e29bb0e83c5
child 135
c243df39913e
permissions
-rw-r--r--

Use mouse wheel for zooming instead of pressing the mouse button and detecting vertical movement.

30
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
1 /*
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
2 * LDForge: LDraw parts authoring CAD
104
6e29bb0e83c5 GL picking stuff
Santeri Piippo <crimsondusk64@gmail.com>
parents: 90
diff changeset
3 * Copyright (C) 2013 Santeri Piippo
30
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
4 *
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
5 * This program is free software: you can redistribute it and/or modify
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
6 * it under the terms of the GNU General Public License as published by
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
8 * (at your option) any later version.
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
9 *
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
10 * This program is distributed in the hope that it will be useful,
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
13 * GNU General Public License for more details.
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
14 *
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
15 * You should have received a copy of the GNU General Public License
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
17 */
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
18
15
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 #include <qdialog.h>
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 #include <qlineedit.h>
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21 #include <qlabel.h>
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22 #include <qdialogbuttonbox.h>
19
6c5977e43e73 Added pointer serializing so I can keep track of all LDObject* members. This way I can replace them all properly when needed.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 15
diff changeset
23 #include "common.h"
15
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24
30
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
25 // =============================================================================
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
26 // SetContentsDialog
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
27 //
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
28 // Performs the Set Contents dialog on the given LDObject. Object's contents
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
29 // are exposed to the user and is reinterpreted if the user accepts the new
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
30 // contents.
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
31 // =============================================================================
31ff9aabd506 Licensed LDForge GPL3, added some more icons
Santeri Piippo <crimsondusk64@gmail.com>
parents: 25
diff changeset
32 class SetContentsDialog : public QDialog {
15
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 public:
82
e61c50fdb8cc Touched up the error icon, show the error icon in the set contents dialog if the contents are gibberish.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 61
diff changeset
34 QLabel* qContentsLabel, *qErrorIcon, *qErrorLabel;
15
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
35 QLineEdit* qContents;
39
110669124caf Begin work on dialogs for adding objects. Comments functional!
Santeri Piippo <crimsondusk64@gmail.com>
parents: 30
diff changeset
36 QDialogButtonBox* qButtons;
15
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
37
104
6e29bb0e83c5 GL picking stuff
Santeri Piippo <crimsondusk64@gmail.com>
parents: 90
diff changeset
38 SetContentsDialog (LDObject* obj, QWidget* parent = null);
90
03f718ed5b33 Added history handling for set contents
Santeri Piippo <crimsondusk64@gmail.com>
parents: 82
diff changeset
39 static void staticDialog (LDObject* obj);
15
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
40
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
41 private slots:
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42 void slot_handleButtons (QAbstractButton* qButton);
a78ccb3976b6 oops, forgot the new dialog files out
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
43 };

mercurial