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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
28 #include <QCheckBox>
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
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
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
61
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
62 class initial_page : public QWidget
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
63 {
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
64 Q_OBJECT
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
65
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
66 public:
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
67
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
68 initial_page (welcome_wizard *wizard);
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
69
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
70 ~initial_page (void) { }
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
71
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
72 static QWidget *
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
73 create (welcome_wizard *wizard) { return new initial_page (wizard); }
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
74
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
75 private:
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
76
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
77 QLabel *title;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
78 QLabel *message;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
79 QLabel *logo;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
80 QPushButton *next;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
81 QPushButton *cancel;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
82 };
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
83
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
84
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
85 class setup_community_news : public QWidget
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
86 {
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
87 Q_OBJECT
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
88
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
89 public:
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
90
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
91 setup_community_news (welcome_wizard *wizard);
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
92
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
93 ~setup_community_news (void) { }
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
94
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
95 static QWidget *
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
96 create (welcome_wizard *wizard) { return new setup_community_news (wizard); }
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
97
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
98 private:
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
99
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
100 QLabel *title;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
101 QLabel *message;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
102 QCheckBox *checkbox;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
103 QLabel *checkbox_message;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
104 QLabel *logo;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
105 QPushButton *previous;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
106 QPushButton *next;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
107 QPushButton *cancel;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
108 };
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
109
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
110
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
111 class final_page : public QWidget
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
112 {
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
113 Q_OBJECT
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
114
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
115 public:
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
116
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
117 final_page (welcome_wizard *wizard);
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
118
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
119 ~final_page (void) { }
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
120
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
121 static QWidget *
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
122 create (welcome_wizard *wizard) { return new final_page (wizard); }
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
123
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
124 private:
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
125
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
126 QLabel *title;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
127 QLabel *message;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
128 QLabel *logo;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
129 QLabel *links;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
130 QPushButton *previous;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
131 QPushButton *finish;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
132 QPushButton *cancel;
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
133 };
866d3860724c add missing Q_OBJECT macros
Torsten <ttl@justmail.de>
parents: 17940
diff changeset
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