author | groucho <groucho> | 2003-05-07 14:10:02 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-05-07 14:10:02 (UTC) |
commit | 6bfdfc1c4fab71196b0d40f08c209d7819874686 (patch) (unidiff) | |
tree | 2fbb90c597135de21d3ec997203a3ffe92f9aeb5 /noncore/apps/opie-reader/ToolbarPrefs.cpp | |
parent | b836e3690fbe639b95041999c800d86280985451 (diff) | |
download | opie-6bfdfc1c4fab71196b0d40f08c209d7819874686.zip opie-6bfdfc1c4fab71196b0d40f08c209d7819874686.tar.gz opie-6bfdfc1c4fab71196b0d40f08c209d7819874686.tar.bz2 |
Hopefully things are now fixed in CVS
Diffstat (limited to 'noncore/apps/opie-reader/ToolbarPrefs.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/ToolbarPrefs.cpp | 499 |
1 files changed, 499 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/ToolbarPrefs.cpp b/noncore/apps/opie-reader/ToolbarPrefs.cpp new file mode 100644 index 0000000..361bf97 --- a/dev/null +++ b/noncore/apps/opie-reader/ToolbarPrefs.cpp | |||
@@ -0,0 +1,499 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Form implementation generated from reading ui file 'Prefs.ui' | ||
3 | ** | ||
4 | ** Created: Tue Feb 11 23:53:35 2003 | ||
5 | ** by: The User Interface Compiler (uic) | ||
6 | ** | ||
7 | ** WARNING! All changes made in this file will be lost! | ||
8 | ****************************************************************************/ | ||
9 | #include "useqpe.h" | ||
10 | #include "ToolbarPrefs.h" | ||
11 | |||
12 | #include <qcheckbox.h> | ||
13 | #include <qlabel.h> | ||
14 | #include <qpushbutton.h> | ||
15 | #include <qspinbox.h> | ||
16 | #include <qlayout.h> | ||
17 | #include <qvariant.h> | ||
18 | #include <qtooltip.h> | ||
19 | #include <qwhatsthis.h> | ||
20 | #include <qcombobox.h> | ||
21 | #include <qbuttongroup.h> | ||
22 | #include <qlineedit.h> | ||
23 | #ifdef USEQPE | ||
24 | #include <qpe/menubutton.h> | ||
25 | #endif | ||
26 | |||
27 | CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir ) | ||
28 | { | ||
29 | setCaption(tr( "Toolbar Settings" ) ); | ||
30 | QTabWidget* td = new QTabWidget(this); | ||
31 | misc = new CMiscBarPrefs(this); | ||
32 | filebar = new CFileBarPrefs(config, this); | ||
33 | navbar = new CNavBarPrefs(config, this); | ||
34 | viewbar = new CViewBarPrefs(config, this); | ||
35 | markbar = new CMarkBarPrefs(config, this); | ||
36 | indbar = new CIndBarPrefs(config, this); | ||
37 | td->addTab(filebar, tr("File")); | ||
38 | td->addTab(navbar, tr("Navigation")); | ||
39 | td->addTab(viewbar, tr("View")); | ||
40 | td->addTab(markbar, tr("Marks")); | ||
41 | td->addTab(indbar, tr("Indicators")); | ||
42 | td->addTab(misc, tr("Policy")); | ||
43 | QVBoxLayout* v = new QVBoxLayout(this); | ||
44 | v->addWidget(td); | ||
45 | |||
46 | if (fs) showMaximized(); | ||
47 | } | ||
48 | |||
49 | /* | ||
50 | CBarPrefs1::CBarPrefs1( Config& _config, QWidget* parent, const char* name, WFlags fl ) | ||
51 | : QWidget( parent, name, fl ), config(_config) | ||
52 | { | ||
53 | config.setGroup( "Toolbar" ); | ||
54 | QVBoxLayout* vb = new QVBoxLayout(this); | ||
55 | |||
56 | QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "File", this); | ||
57 | vb->addWidget(bg); | ||
58 | |||
59 | open = new QCheckBox( tr("Open"), bg ); | ||
60 | open->setChecked(config.readBoolEntry( "Open", false )); | ||
61 | connect(open, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
62 | close = new QCheckBox( tr("Close"), bg ); | ||
63 | close->setChecked(config.readBoolEntry( "Close", false )); | ||
64 | connect(close, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
65 | info = new QCheckBox( tr("Info"), bg ); | ||
66 | info->setChecked(config.readBoolEntry( "Info", false )); | ||
67 | connect(info, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
68 | twotouch = new QCheckBox( tr("Two/One\nTouch"), bg ); | ||
69 | twotouch->setChecked(config.readBoolEntry( "Two/One Touch", false )); | ||
70 | connect(twotouch, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
71 | find = new QCheckBox( tr("Find"), bg ); | ||
72 | find->setChecked(config.readBoolEntry( "Find", false )); | ||
73 | connect(find, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
74 | |||
75 | bg = new QGroupBox(2, Qt::Horizontal, "Navigation", this); | ||
76 | vb->addWidget(bg); | ||
77 | scroll = new QCheckBox( tr("Scroll"), bg ); | ||
78 | scroll->setChecked(config.readBoolEntry( "Scroll", false )); | ||
79 | connect(scroll, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
80 | navigation = new QCheckBox( tr("Back/Home/Forward"), bg ); | ||
81 | navigation->setChecked(config.readBoolEntry( "Back/Home/Forward", false )); | ||
82 | connect(navigation, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
83 | page = new QCheckBox( tr("Page\nUp/Down"), bg ); | ||
84 | page->setChecked(config.readBoolEntry( "Page Up/Down", false )); | ||
85 | connect(page, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
86 | startend = new QCheckBox( tr("Goto Start/End"), bg ); | ||
87 | startend->setChecked(config.readBoolEntry( "Goto Start/End", false )); | ||
88 | connect(startend, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
89 | jump = new QCheckBox( tr("Jump"), bg ); | ||
90 | jump->setChecked(config.readBoolEntry( "Jump", false )); | ||
91 | connect(jump, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
92 | pageline = new QCheckBox( tr("Page/Line Scroll"), bg ); | ||
93 | pageline->setChecked(config.readBoolEntry( "Page/Line Scroll", false )); | ||
94 | connect(pageline, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
95 | m_isChanged = false; | ||
96 | } | ||
97 | |||
98 | void CBarPrefs1::saveall() | ||
99 | { | ||
100 | config.setGroup( "Toolbar" ); | ||
101 | config.writeEntry( "Open", open->isChecked()); | ||
102 | config.writeEntry( "Close", close->isChecked()); | ||
103 | config.writeEntry( "Info", info->isChecked()); | ||
104 | config.writeEntry( "Two/One Touch", twotouch->isChecked()); | ||
105 | config.writeEntry( "Find", find->isChecked()); | ||
106 | config.writeEntry( "Scroll", scroll->isChecked()); | ||
107 | config.writeEntry( "Back/Home/Forward", navigation->isChecked()); | ||
108 | config.writeEntry( "Page Up/Down", page->isChecked()); | ||
109 | config.writeEntry( "Goto Start/End", startend->isChecked()); | ||
110 | config.writeEntry( "Jump", jump->isChecked()); | ||
111 | config.writeEntry( "Page/Line Scroll", pageline->isChecked()); | ||
112 | } | ||
113 | |||
114 | CBarPrefs1::~CBarPrefs1() | ||
115 | { | ||
116 | } | ||
117 | */ | ||
118 | /* | ||
119 | CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFlags fl ) | ||
120 | : QWidget( parent, name, fl ), config(_config) | ||
121 | { | ||
122 | QVBoxLayout* vb = new QVBoxLayout(this); | ||
123 | |||
124 | QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "View", this); | ||
125 | vb->addWidget(bg); | ||
126 | |||
127 | config.setGroup( "Toolbar" ); | ||
128 | |||
129 | fullscreen = new QCheckBox( tr("Fullscreen"), bg ); | ||
130 | fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false )); | ||
131 | connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
132 | zoom = new QCheckBox( tr("Zoom"), bg ); | ||
133 | zoom->setChecked(config.readBoolEntry( "Zoom In/Out", false )); | ||
134 | connect(zoom, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
135 | setfont = new QCheckBox( tr("Set Font"), bg ); | ||
136 | setfont->setChecked(config.readBoolEntry( "Set Font", false )); | ||
137 | connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
138 | |||
139 | encoding = new QCheckBox( tr("Encoding"), bg ); | ||
140 | encoding->setChecked(config.readBoolEntry("Encoding Select", false)); | ||
141 | connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
142 | ideogram = new QCheckBox( tr("Ideogram"), bg ); | ||
143 | ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false)); | ||
144 | connect(ideogram, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
145 | |||
146 | bg = new QGroupBox(3, Qt::Horizontal, "Marks", this); | ||
147 | vb->addWidget(bg); | ||
148 | mark = new QCheckBox( tr("Bookmark"), bg ); | ||
149 | mark->setChecked(config.readBoolEntry( "Mark", false )); | ||
150 | connect(mark, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
151 | annotate = new QCheckBox( tr("Annotate"), bg ); | ||
152 | annotate->setChecked(config.readBoolEntry( "Annotate", false )); | ||
153 | connect(annotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
154 | go_to = new QCheckBox( tr("Goto"), bg ); | ||
155 | go_to->setChecked(config.readBoolEntry( "Goto", false )); | ||
156 | connect(go_to, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
157 | Delete = new QCheckBox( tr("Delete"), bg ); | ||
158 | Delete->setChecked(config.readBoolEntry( "Delete", false )); | ||
159 | connect(Delete, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
160 | autogen = new QCheckBox( tr("Autogen"), bg ); | ||
161 | autogen->setChecked(config.readBoolEntry( "Autogen", false )); | ||
162 | connect(autogen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
163 | clear = new QCheckBox( tr("Clear"), bg ); | ||
164 | clear->setChecked(config.readBoolEntry( "Clear", false )); | ||
165 | connect(clear, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
166 | save = new QCheckBox( tr("Save"), bg ); | ||
167 | save->setChecked(config.readBoolEntry( "Save", false )); | ||
168 | connect(save, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
169 | tidy = new QCheckBox( tr("Tidy"), bg ); | ||
170 | tidy->setChecked(config.readBoolEntry( "Tidy", false )); | ||
171 | connect(tidy, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
172 | block = new QCheckBox( tr("Mark/Copy"), bg ); | ||
173 | block->setChecked(config.readBoolEntry( "Start/Copy Block", false )); | ||
174 | connect(block, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
175 | |||
176 | bg = new QGroupBox(1, Qt::Horizontal, "Indicators", this); | ||
177 | vb->addWidget(bg); | ||
178 | indannotate = new QCheckBox( tr("Annotation"), bg ); | ||
179 | indannotate->setChecked(config.readBoolEntry( "Annotation indicator", false )); | ||
180 | connect(indannotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
181 | m_isChanged = false; | ||
182 | } | ||
183 | |||
184 | void CBarPrefs2::saveall() | ||
185 | { | ||
186 | config.setGroup( "Toolbar" ); | ||
187 | config.writeEntry( "Fullscreen", fullscreen->isChecked()); | ||
188 | config.writeEntry( "Zoom In/Out", zoom->isChecked()); | ||
189 | config.writeEntry( "Set Font", setfont->isChecked()); | ||
190 | config.writeEntry("Encoding Select", encoding->isChecked()); | ||
191 | config.writeEntry("Ideogram Mode", ideogram->isChecked()); | ||
192 | |||
193 | config.writeEntry( "Mark", mark->isChecked()); | ||
194 | config.writeEntry( "Annotate", annotate->isChecked()); | ||
195 | config.writeEntry( "Goto", go_to->isChecked()); | ||
196 | config.writeEntry( "Delete", Delete->isChecked()); | ||
197 | config.writeEntry( "Autogen", autogen->isChecked()); | ||
198 | config.writeEntry( "Clear", clear->isChecked()); | ||
199 | config.writeEntry( "Save", save->isChecked()); | ||
200 | config.writeEntry( "Tidy", tidy->isChecked()); | ||
201 | config.writeEntry( "Start/Copy Block", block->isChecked()); | ||
202 | config.writeEntry( "Annotation indicator", indannotate->isChecked()); | ||
203 | } | ||
204 | |||
205 | CBarPrefs2::~CBarPrefs2() | ||
206 | { | ||
207 | } | ||
208 | */ | ||
209 | |||
210 | CFileBarPrefs::CFileBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) | ||
211 | : QWidget( parent, name, fl ), config(_config) | ||
212 | { | ||
213 | config.setGroup( "Toolbar" ); | ||
214 | QVBoxLayout* vb = new QVBoxLayout(this); | ||
215 | |||
216 | QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "File", this); | ||
217 | vb->addWidget(bg); | ||
218 | |||
219 | open = new QCheckBox( tr("Open"), bg ); | ||
220 | open->setChecked(config.readBoolEntry( "Open", false )); | ||
221 | connect(open, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
222 | close = new QCheckBox( tr("Close"), bg ); | ||
223 | close->setChecked(config.readBoolEntry( "Close", false )); | ||
224 | connect(close, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
225 | info = new QCheckBox( tr("Info"), bg ); | ||
226 | info->setChecked(config.readBoolEntry( "Info", false )); | ||
227 | connect(info, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
228 | twotouch = new QCheckBox( tr("Two/One\nTouch"), bg ); | ||
229 | twotouch->setChecked(config.readBoolEntry( "Two/One Touch", false )); | ||
230 | connect(twotouch, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
231 | find = new QCheckBox( tr("Find"), bg ); | ||
232 | find->setChecked(config.readBoolEntry( "Find", false )); | ||
233 | connect(find, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
234 | m_isChanged = false; | ||
235 | } | ||
236 | |||
237 | void CFileBarPrefs::saveall() | ||
238 | { | ||
239 | config.setGroup( "Toolbar" ); | ||
240 | config.writeEntry( "Open", open->isChecked()); | ||
241 | config.writeEntry( "Close", close->isChecked()); | ||
242 | config.writeEntry( "Info", info->isChecked()); | ||
243 | config.writeEntry( "Two/One Touch", twotouch->isChecked()); | ||
244 | config.writeEntry( "Find", find->isChecked()); | ||
245 | } | ||
246 | |||
247 | CFileBarPrefs::~CFileBarPrefs() | ||
248 | { | ||
249 | } | ||
250 | |||
251 | CNavBarPrefs::CNavBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) | ||
252 | : QWidget( parent, name, fl ), config(_config) | ||
253 | { | ||
254 | config.setGroup( "Toolbar" ); | ||
255 | QVBoxLayout* vb = new QVBoxLayout(this); | ||
256 | |||
257 | QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "Navigation", this); | ||
258 | vb->addWidget(bg); | ||
259 | scroll = new QCheckBox( tr("Scroll"), bg ); | ||
260 | scroll->setChecked(config.readBoolEntry( "Scroll", false )); | ||
261 | connect(scroll, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
262 | |||
263 | navback = new QCheckBox( tr("Back"), bg ); | ||
264 | navback->setChecked(config.readBoolEntry( "Back", false )); | ||
265 | connect(navback, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
266 | navhome = new QCheckBox( tr("Home"), bg ); | ||
267 | navhome->setChecked(config.readBoolEntry( "Home", false )); | ||
268 | connect(navhome, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
269 | navforward = new QCheckBox( tr("Forward"), bg ); | ||
270 | navforward->setChecked(config.readBoolEntry( "Forward", false )); | ||
271 | connect(navforward, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
272 | |||
273 | pageup = new QCheckBox( tr("Page Up"), bg ); | ||
274 | pageup->setChecked(config.readBoolEntry( "Page Up", false )); | ||
275 | connect(pageup, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
276 | pagedown = new QCheckBox( tr("Page Down"), bg ); | ||
277 | pagedown->setChecked(config.readBoolEntry( "Page Down", false )); | ||
278 | connect(pagedown, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
279 | gotostart = new QCheckBox( tr("Goto Start"), bg ); | ||
280 | gotostart->setChecked(config.readBoolEntry( "Goto Start", false )); | ||
281 | connect(gotostart, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
282 | gotoend = new QCheckBox( tr("Goto End"), bg ); | ||
283 | gotoend->setChecked(config.readBoolEntry( "Goto End", false )); | ||
284 | connect(gotoend, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
285 | jump = new QCheckBox( tr("Jump"), bg ); | ||
286 | jump->setChecked(config.readBoolEntry( "Jump", false )); | ||
287 | connect(jump, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
288 | pageline = new QCheckBox( tr("Page/Line Scroll"), bg ); | ||
289 | pageline->setChecked(config.readBoolEntry( "Page/Line Scroll", false )); | ||
290 | connect(pageline, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
291 | m_isChanged = false; | ||
292 | } | ||
293 | |||
294 | void CNavBarPrefs::saveall() | ||
295 | { | ||
296 | config.setGroup( "Toolbar" ); | ||
297 | config.writeEntry( "Scroll", scroll->isChecked()); | ||
298 | config.writeEntry( "Back", navback->isChecked()); | ||
299 | config.writeEntry( "Home", navhome->isChecked()); | ||
300 | config.writeEntry( "Forward", navforward->isChecked()); | ||
301 | config.writeEntry( "Page Up", pageup->isChecked()); | ||
302 | config.writeEntry( "Page Down", pagedown->isChecked()); | ||
303 | config.writeEntry( "Goto Start", gotostart->isChecked()); | ||
304 | config.writeEntry( "Goto End", gotoend->isChecked()); | ||
305 | config.writeEntry( "Jump", jump->isChecked()); | ||
306 | config.writeEntry( "Page/Line Scroll", pageline->isChecked()); | ||
307 | } | ||
308 | |||
309 | CNavBarPrefs::~CNavBarPrefs() | ||
310 | { | ||
311 | } | ||
312 | |||
313 | CViewBarPrefs::CViewBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) | ||
314 | : QWidget( parent, name, fl ), config(_config) | ||
315 | { | ||
316 | QVBoxLayout* vb = new QVBoxLayout(this); | ||
317 | |||
318 | QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "View", this); | ||
319 | vb->addWidget(bg); | ||
320 | |||
321 | config.setGroup( "Toolbar" ); | ||
322 | |||
323 | fullscreen = new QCheckBox( tr("Fullscreen"), bg ); | ||
324 | fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false )); | ||
325 | connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
326 | zoomin = new QCheckBox( tr("Zoom In"), bg ); | ||
327 | zoomin->setChecked(config.readBoolEntry( "Zoom In", false )); | ||
328 | connect(zoomin, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
329 | zoomout = new QCheckBox( tr("Zoom Out"), bg ); | ||
330 | zoomout->setChecked(config.readBoolEntry( "Zoom Out", false )); | ||
331 | connect(zoomout, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
332 | setfont = new QCheckBox( tr("Set Font"), bg ); | ||
333 | setfont->setChecked(config.readBoolEntry( "Set Font", false )); | ||
334 | connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
335 | |||
336 | encoding = new QCheckBox( tr("Encoding"), bg ); | ||
337 | encoding->setChecked(config.readBoolEntry("Encoding Select", false)); | ||
338 | connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
339 | ideogram = new QCheckBox( tr("Ideogram"), bg ); | ||
340 | ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false)); | ||
341 | connect(ideogram, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
342 | m_isChanged = false; | ||
343 | } | ||
344 | |||
345 | void CViewBarPrefs::saveall() | ||
346 | { | ||
347 | config.setGroup( "Toolbar" ); | ||
348 | config.writeEntry( "Fullscreen", fullscreen->isChecked()); | ||
349 | config.writeEntry( "Zoom In", zoomin->isChecked()); | ||
350 | config.writeEntry( "Zoom Out", zoomout->isChecked()); | ||
351 | config.writeEntry( "Set Font", setfont->isChecked()); | ||
352 | config.writeEntry("Encoding Select", encoding->isChecked()); | ||
353 | config.writeEntry("Ideogram Mode", ideogram->isChecked()); | ||
354 | } | ||
355 | |||
356 | CViewBarPrefs::~CViewBarPrefs() | ||
357 | { | ||
358 | } | ||
359 | |||
360 | CMarkBarPrefs::CMarkBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) | ||
361 | : QWidget( parent, name, fl ), config(_config) | ||
362 | { | ||
363 | QVBoxLayout* vb = new QVBoxLayout(this); | ||
364 | |||
365 | QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "Marks", this); | ||
366 | vb->addWidget(bg); | ||
367 | mark = new QCheckBox( tr("Bookmark"), bg ); | ||
368 | mark->setChecked(config.readBoolEntry( "Mark", false )); | ||
369 | connect(mark, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
370 | annotate = new QCheckBox( tr("Annotate"), bg ); | ||
371 | annotate->setChecked(config.readBoolEntry( "Annotate", false )); | ||
372 | connect(annotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
373 | go_to = new QCheckBox( tr("Goto"), bg ); | ||
374 | go_to->setChecked(config.readBoolEntry( "Goto", false )); | ||
375 | connect(go_to, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
376 | Delete = new QCheckBox( tr("Delete"), bg ); | ||
377 | Delete->setChecked(config.readBoolEntry( "Delete", false )); | ||
378 | connect(Delete, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
379 | autogen = new QCheckBox( tr("Autogen"), bg ); | ||
380 | autogen->setChecked(config.readBoolEntry( "Autogen", false )); | ||
381 | connect(autogen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
382 | clear = new QCheckBox( tr("Clear"), bg ); | ||
383 | clear->setChecked(config.readBoolEntry( "Clear", false )); | ||
384 | connect(clear, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
385 | save = new QCheckBox( tr("Save"), bg ); | ||
386 | save->setChecked(config.readBoolEntry( "Save", false )); | ||
387 | connect(save, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
388 | tidy = new QCheckBox( tr("Tidy"), bg ); | ||
389 | tidy->setChecked(config.readBoolEntry( "Tidy", false )); | ||
390 | connect(tidy, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
391 | startblock = new QCheckBox( tr("Mark Block"), bg ); | ||
392 | startblock->setChecked(config.readBoolEntry( "Start Block", false )); | ||
393 | connect(startblock, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
394 | copyblock = new QCheckBox( tr("Copy Block"), bg ); | ||
395 | copyblock->setChecked(config.readBoolEntry( "Copy Block", false )); | ||
396 | connect(copyblock, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
397 | m_isChanged = false; | ||
398 | } | ||
399 | |||
400 | void CMarkBarPrefs::saveall() | ||
401 | { | ||
402 | config.setGroup( "Toolbar" ); | ||
403 | config.writeEntry( "Mark", mark->isChecked()); | ||
404 | config.writeEntry( "Annotate", annotate->isChecked()); | ||
405 | config.writeEntry( "Goto", go_to->isChecked()); | ||
406 | config.writeEntry( "Delete", Delete->isChecked()); | ||
407 | config.writeEntry( "Autogen", autogen->isChecked()); | ||
408 | config.writeEntry( "Clear", clear->isChecked()); | ||
409 | config.writeEntry( "Save", save->isChecked()); | ||
410 | config.writeEntry( "Tidy", tidy->isChecked()); | ||
411 | config.writeEntry( "Start Block", startblock->isChecked()); | ||
412 | config.writeEntry( "Copy Block", copyblock->isChecked()); | ||
413 | } | ||
414 | |||
415 | CMarkBarPrefs::~CMarkBarPrefs() | ||
416 | { | ||
417 | } | ||
418 | |||
419 | CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl ) | ||
420 | : QWidget( parent, name, fl ) | ||
421 | { | ||
422 | |||
423 | QGridLayout* hl = new QGridLayout(this,1,2); | ||
424 | |||
425 | hl->setMargin( 0 ); | ||
426 | |||
427 | QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Dialogs", this); | ||
428 | floating = new QCheckBox(gb); | ||
429 | floating->setText(tr("Floating")); | ||
430 | |||
431 | // QLabel* TextLabel = new QLabel( gb ); | ||
432 | // TextLabel->setText( tr( "Select Button" ) ); | ||
433 | |||
434 | |||
435 | hl->addWidget( gb, 0, 0 ); | ||
436 | |||
437 | |||
438 | gb = new QGroupBox(1, Qt::Horizontal, "Bars (Restart)", this); | ||
439 | |||
440 | // QLabel* ql = new QLabel("Restart to apply changes", gb); | ||
441 | // TextLabel = new QLabel( gb ); | ||
442 | // TextLabel->setText( tr( "Policy" ) ); | ||
443 | |||
444 | #ifdef USECOMBO | ||
445 | tbpolicy = new QComboBox(gb); | ||
446 | #else | ||
447 | tbpolicy = new MenuButton(gb); | ||
448 | #endif | ||
449 | tbpolicy->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); | ||
450 | tbpolicy->insertItem(tr("Single bar")); | ||
451 | tbpolicy->insertItem(tr("Menu/tool bar")); | ||
452 | tbpolicy->insertItem(tr("Multiple bars")); | ||
453 | |||
454 | #ifdef USECOMBO | ||
455 | tbposition = new QComboBox(gb); | ||
456 | #else | ||
457 | tbposition = new MenuButton(gb); | ||
458 | #endif | ||
459 | tbposition->insertItem(tr("Top")); | ||
460 | tbposition->insertItem(tr("Bottom")); | ||
461 | tbposition->insertItem(tr("Right")); | ||
462 | tbposition->insertItem(tr("Left")); | ||
463 | tbposition->insertItem(tr("Minimised")); | ||
464 | |||
465 | tbmovable = new QCheckBox( tr("Movable"), gb ); | ||
466 | // ch->setChecked(config.readBoolEntry( "Movable", false )); | ||
467 | |||
468 | hl->addWidget(gb, 0, 1); | ||
469 | |||
470 | } | ||
471 | |||
472 | CMiscBarPrefs::~CMiscBarPrefs() | ||
473 | { | ||
474 | // no need to delete child widgets, Qt does it all for us | ||
475 | } | ||
476 | |||
477 | |||
478 | CIndBarPrefs::CIndBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) | ||
479 | : QWidget( parent, name, fl ), config(_config) | ||
480 | { | ||
481 | QVBoxLayout* vb = new QVBoxLayout(this); | ||
482 | |||
483 | QGroupBox* bg = new QGroupBox(1, Qt::Horizontal, "Indicators", this); | ||
484 | vb->addWidget(bg); | ||
485 | indannotate = new QCheckBox( tr("Annotation"), bg ); | ||
486 | indannotate->setChecked(config.readBoolEntry( "Annotation indicator", false )); | ||
487 | connect(indannotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
488 | m_isChanged = false; | ||
489 | } | ||
490 | |||
491 | void CIndBarPrefs::saveall() | ||
492 | { | ||
493 | config.setGroup( "Toolbar" ); | ||
494 | config.writeEntry( "Annotation indicator", indannotate->isChecked()); | ||
495 | } | ||
496 | |||
497 | CIndBarPrefs::~CIndBarPrefs() | ||
498 | { | ||
499 | } | ||