zz_historyDialog.h

Wed, 24 Apr 2013 23:27:36 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Wed, 24 Apr 2013 23:27:36 +0300
changeset 135
c243df39913e
parent 104
6e29bb0e83c5
permissions
-rw-r--r--

Cleanup and some restructuring

96
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 /*
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 * LDForge: LDraw parts authoring CAD
104
6e29bb0e83c5 GL picking stuff
Santeri Piippo <crimsondusk64@gmail.com>
parents: 97
diff changeset
3 * Copyright (C) 2013 Santeri Piippo
96
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 *
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 * (at your option) any later version.
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 *
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 *
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 */
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
135
c243df39913e Cleanup and some restructuring
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
19 #ifndef HISTORYDIALOG_H
c243df39913e Cleanup and some restructuring
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
20 #define HISTORYDIALOG_H
96
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
22 #include <qdialog.h>
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
23 #include <qdialogbuttonbox.h>
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
24 #include <qlistwidget.h>
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
25 #include <qpushbutton.h>
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
26 #include "gui.h"
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28 class HistoryDialog : public QDialog {
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29 Q_OBJECT
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
30
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 public:
104
6e29bb0e83c5 GL picking stuff
Santeri Piippo <crimsondusk64@gmail.com>
parents: 97
diff changeset
32 explicit HistoryDialog (QWidget* parent = null, Qt::WindowFlags f = 0);
96
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
33 void populateList ();
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
34
135
c243df39913e Cleanup and some restructuring
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
35 QListWidget* historyList;
c243df39913e Cleanup and some restructuring
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
36 QPushButton* undoButton, *redoButton, *clearButton;
c243df39913e Cleanup and some restructuring
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
37 QDialogButtonBox* buttons;
96
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
38
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
39 private:
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
40 void updateButtons ();
97
52bcca21579e Fleshed out the history dialog further
Santeri Piippo <crimsondusk64@gmail.com>
parents: 96
diff changeset
41 void updateSelection ();
96
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
43 private slots:
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
44 void slot_undo ();
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
45 void slot_redo ();
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
46 void slot_clear ();
97
52bcca21579e Fleshed out the history dialog further
Santeri Piippo <crimsondusk64@gmail.com>
parents: 96
diff changeset
47 void slot_selChanged ();
96
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
48 };
2f175b3d8211 Added history dialog, cannot display all types yet
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
49
135
c243df39913e Cleanup and some restructuring
Santeri Piippo <crimsondusk64@gmail.com>
parents: 104
diff changeset
50 #endif // HISTORYDIALOG_H

mercurial