Mercurial > octave
annotate libgui/src/welcome-wizard.h @ 17974:866d3860724c
add missing Q_OBJECT macros
* resource-manager.h: inherits from QObject, Q_OBJECT added
* welcome-wizard.cc: removed class definitions for initial_page,
setup_community_news, and final_page from here except for constructors
* welcome-wizard.h: added class definitions with macro Q_OBJECT
for initial_page, setup_community_news, and final_page
* libgui/src/module.mk: added moc-resource-manager.cc to octave_gui_MOC
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 21 Nov 2013 20:32:52 +0100 |
parents | b3e4ee8f4d6d |
children | 4197fc428c7d |
rev | line source |
---|---|
15204
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
1 /* |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
2 |
17611
0dd2cf2e3174
don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents:
17515
diff
changeset
|
3 Copyright (C) 2013 John W. Eaton |
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
17611
diff
changeset
|
4 Copyright (C) 2011-2013 Jacob Dawid |
15204
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
5 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
6 This file is part of Octave. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
7 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
8 Octave is free software; you can redistribute it and/or modify it |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
9 under the terms of the GNU General Public License as published by the |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
10 Free Software Foundation; either version 3 of the License, or (at your |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
11 option) any later version. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
12 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
16 for more details. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
17 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
18 You should have received a copy of the GNU General Public License |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
19 along with Octave; see the file COPYING. If not, see |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
20 <http://www.gnu.org/licenses/>. |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
21 |
359098ad343e
update copyright notices in libgui directory
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
22 */ |
13674
c0e66d6e3dc8
Updated license headers and moved to AGPLv3.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13668
diff
changeset
|
23 |
13668
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
24 #ifndef WELCOMEWIZARD_H |
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
25 #define WELCOMEWIZARD_H |
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
26 |
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
27 #include <QDialog> |
17974 | 28 #include <QCheckBox> |
29 #include <QLabel> | |
13668
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
30 |
14709
f50591409306
Started to rename class names and methods from camel case to underscore-
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
14707
diff
changeset
|
31 class welcome_wizard : public QDialog |
13668
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
32 { |
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
33 Q_OBJECT |
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
34 |
17611
0dd2cf2e3174
don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents:
17515
diff
changeset
|
35 public: |
13668
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
36 |
17937
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
37 typedef QWidget *(*page_creator_fptr) (welcome_wizard *wizard); |
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
38 |
17611
0dd2cf2e3174
don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents:
17515
diff
changeset
|
39 welcome_wizard (QWidget *parent = 0); |
13668
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
40 |
17611
0dd2cf2e3174
don't use ui designer for welcome dialog box
John W. Eaton <jwe@octave.org>
parents:
17515
diff
changeset
|
41 ~welcome_wizard (void) { } |
17937
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
42 |
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
43 private: |
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
44 |
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
45 QList<page_creator_fptr> page_ctor_list; |
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
46 QList<page_creator_fptr>::iterator page_list_iterator; |
17940
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17937
diff
changeset
|
47 QWidget *current_page; |
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17937
diff
changeset
|
48 bool allow_web_connect_state; |
17937
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
49 |
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
50 private slots: |
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
51 |
17940
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17937
diff
changeset
|
52 void handle_web_connect_option (int state); |
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17937
diff
changeset
|
53 |
17937
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
54 void show_page (void); |
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
55 void previous_page (void); |
f87a7e161710
* welcome-wizard.h, welcome-wizard.cc: Rewrite.
John W. Eaton <jwe@octave.org>
parents:
17744
diff
changeset
|
56 void next_page (void); |
17940
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17937
diff
changeset
|
57 |
b3e4ee8f4d6d
respect option for opting out of web connections for community news
John W. Eaton <jwe@octave.org>
parents:
17937
diff
changeset
|
58 void accept (void); |
13668
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
59 }; |
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
60 |
17974 | 61 |
62 class initial_page : public QWidget | |
63 { | |
64 Q_OBJECT | |
65 | |
66 public: | |
67 | |
68 initial_page (welcome_wizard *wizard); | |
69 | |
70 ~initial_page (void) { } | |
71 | |
72 static QWidget * | |
73 create (welcome_wizard *wizard) { return new initial_page (wizard); } | |
74 | |
75 private: | |
76 | |
77 QLabel *title; | |
78 QLabel *message; | |
79 QLabel *logo; | |
80 QPushButton *next; | |
81 QPushButton *cancel; | |
82 }; | |
83 | |
84 | |
85 class setup_community_news : public QWidget | |
86 { | |
87 Q_OBJECT | |
88 | |
89 public: | |
90 | |
91 setup_community_news (welcome_wizard *wizard); | |
92 | |
93 ~setup_community_news (void) { } | |
94 | |
95 static QWidget * | |
96 create (welcome_wizard *wizard) { return new setup_community_news (wizard); } | |
97 | |
98 private: | |
99 | |
100 QLabel *title; | |
101 QLabel *message; | |
102 QCheckBox *checkbox; | |
103 QLabel *checkbox_message; | |
104 QLabel *logo; | |
105 QPushButton *previous; | |
106 QPushButton *next; | |
107 QPushButton *cancel; | |
108 }; | |
109 | |
110 | |
111 class final_page : public QWidget | |
112 { | |
113 Q_OBJECT | |
114 | |
115 public: | |
116 | |
117 final_page (welcome_wizard *wizard); | |
118 | |
119 ~final_page (void) { } | |
120 | |
121 static QWidget * | |
122 create (welcome_wizard *wizard) { return new final_page (wizard); } | |
123 | |
124 private: | |
125 | |
126 QLabel *title; | |
127 QLabel *message; | |
128 QLabel *logo; | |
129 QLabel *links; | |
130 QPushButton *previous; | |
131 QPushButton *finish; | |
132 QPushButton *cancel; | |
133 }; | |
134 | |
13668
421afeae929b
Added a settings wizard that appears at first startup of Octave GUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff
changeset
|
135 #endif // WELCOMEWIZARD_H |