Diffstat (limited to 'noncore/apps/opie-reader/ToolbarPrefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/ToolbarPrefs.cpp | 76 |
1 files changed, 66 insertions, 10 deletions
diff --git a/noncore/apps/opie-reader/ToolbarPrefs.cpp b/noncore/apps/opie-reader/ToolbarPrefs.cpp index 0347736..5cf220a 100644 --- a/noncore/apps/opie-reader/ToolbarPrefs.cpp +++ b/noncore/apps/opie-reader/ToolbarPrefs.cpp | |||
@@ -1,62 +1,70 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** Form implementation generated from reading ui file 'Prefs.ui' | 2 | ** Form implementation generated from reading ui file 'Prefs.ui' |
3 | ** | 3 | ** |
4 | ** Created: Tue Feb 11 23:53:35 2003 | 4 | ** Created: Tue Feb 11 23:53:35 2003 |
5 | ** by: The User Interface Compiler (uic) | 5 | ** by: The User Interface Compiler (uic) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
9 | #include "useqpe.h" | ||
9 | #include "ToolbarPrefs.h" | 10 | #include "ToolbarPrefs.h" |
10 | 11 | ||
12 | #include <qcheckbox.h> | ||
13 | #include <qlabel.h> | ||
14 | #include <qpushbutton.h> | ||
15 | #include <qspinbox.h> | ||
11 | #include <qlayout.h> | 16 | #include <qlayout.h> |
17 | #include <qvariant.h> | ||
18 | #include <qtooltip.h> | ||
19 | #include <qwhatsthis.h> | ||
20 | #include <qcombobox.h> | ||
12 | #include <qbuttongroup.h> | 21 | #include <qbuttongroup.h> |
22 | #include <qlineedit.h> | ||
13 | #ifdef USEQPE | 23 | #ifdef USEQPE |
14 | #include <qpe/menubutton.h> | 24 | #include <qpe/menubutton.h> |
15 | #endif | 25 | #endif |
16 | #include <qpe/qpeapplication.h> | ||
17 | 26 | ||
18 | CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir ) | 27 | CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir ) |
19 | { | 28 | { |
20 | setCaption(tr( "Toolbar Settings" ) ); | 29 | setCaption(tr( "Toolbar Settings" ) ); |
21 | QTabWidget* td = new QTabWidget(this); | 30 | QTabWidget* td = new QTabWidget(this); |
22 | misc = new CMiscBarPrefs(this); | 31 | misc = new CMiscBarPrefs(this); |
23 | filebar = new CFileBarPrefs(config, this); | 32 | filebar = new CFileBarPrefs(config, this); |
24 | navbar = new CNavBarPrefs(config, this); | 33 | navbar = new CNavBarPrefs(config, this); |
25 | viewbar = new CViewBarPrefs(config, this); | 34 | viewbar = new CViewBarPrefs(config, this); |
26 | markbar = new CMarkBarPrefs(config, this); | 35 | markbar = new CMarkBarPrefs(config, this); |
27 | indbar = new CIndBarPrefs(config, this); | 36 | indbar = new CIndBarPrefs(config, this); |
28 | td->addTab(filebar, tr("File")); | 37 | td->addTab(filebar, tr("File")); |
29 | td->addTab(navbar, tr("Navigation")); | 38 | td->addTab(navbar, tr("Navigation")); |
30 | td->addTab(viewbar, tr("View")); | 39 | td->addTab(viewbar, tr("View")); |
31 | td->addTab(markbar, tr("Marks")); | 40 | td->addTab(markbar, tr("Marks")); |
32 | td->addTab(indbar, tr("Indicators")); | 41 | td->addTab(indbar, tr("Indicators")); |
33 | td->addTab(misc, tr("Policy")); | 42 | td->addTab(misc, tr("Policy")); |
34 | QVBoxLayout* v = new QVBoxLayout(this); | 43 | QVBoxLayout* v = new QVBoxLayout(this); |
35 | v->addWidget(td); | 44 | v->addWidget(td); |
36 | 45 | ||
37 | if (fs) | 46 | if (fs) showMaximized(); |
38 | QPEApplication::showDialog( this ); | ||
39 | } | 47 | } |
40 | 48 | ||
41 | /* | 49 | /* |
42 | CBarPrefs1::CBarPrefs1( Config& _config, QWidget* parent, const char* name, WFlags fl ) | 50 | CBarPrefs1::CBarPrefs1( Config& _config, QWidget* parent, const char* name, WFlags fl ) |
43 | : QWidget( parent, name, fl ), config(_config) | 51 | : QWidget( parent, name, fl ), config(_config) |
44 | { | 52 | { |
45 | config.setGroup( "Toolbar" ); | 53 | config.setGroup( "Toolbar" ); |
46 | QVBoxLayout* vb = new QVBoxLayout(this); | 54 | QVBoxLayout* vb = new QVBoxLayout(this); |
47 | 55 | ||
48 | QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "File", this); | 56 | QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "File", this); |
49 | vb->addWidget(bg); | 57 | vb->addWidget(bg); |
50 | 58 | ||
51 | open = new QCheckBox( tr("Open"), bg ); | 59 | open = new QCheckBox( tr("Open"), bg ); |
52 | open->setChecked(config.readBoolEntry( "Open", false )); | 60 | open->setChecked(config.readBoolEntry( "Open", false )); |
53 | connect(open, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 61 | connect(open, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
54 | close = new QCheckBox( tr("Close"), bg ); | 62 | close = new QCheckBox( tr("Close"), bg ); |
55 | close->setChecked(config.readBoolEntry( "Close", false )); | 63 | close->setChecked(config.readBoolEntry( "Close", false )); |
56 | connect(close, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 64 | connect(close, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
57 | info = new QCheckBox( tr("Info"), bg ); | 65 | info = new QCheckBox( tr("Info"), bg ); |
58 | info->setChecked(config.readBoolEntry( "Info", false )); | 66 | info->setChecked(config.readBoolEntry( "Info", false )); |
59 | connect(info, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 67 | connect(info, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
60 | twotouch = new QCheckBox( tr("Two/One\nTouch"), bg ); | 68 | twotouch = new QCheckBox( tr("Two/One\nTouch"), bg ); |
61 | twotouch->setChecked(config.readBoolEntry( "Two/One Touch", false )); | 69 | twotouch->setChecked(config.readBoolEntry( "Two/One Touch", false )); |
62 | connect(twotouch, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 70 | connect(twotouch, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
@@ -100,48 +108,56 @@ void CBarPrefs1::saveall() | |||
100 | config.writeEntry( "Page Up/Down", page->isChecked()); | 108 | config.writeEntry( "Page Up/Down", page->isChecked()); |
101 | config.writeEntry( "Goto Start/End", startend->isChecked()); | 109 | config.writeEntry( "Goto Start/End", startend->isChecked()); |
102 | config.writeEntry( "Jump", jump->isChecked()); | 110 | config.writeEntry( "Jump", jump->isChecked()); |
103 | config.writeEntry( "Page/Line Scroll", pageline->isChecked()); | 111 | config.writeEntry( "Page/Line Scroll", pageline->isChecked()); |
104 | } | 112 | } |
105 | 113 | ||
106 | CBarPrefs1::~CBarPrefs1() | 114 | CBarPrefs1::~CBarPrefs1() |
107 | { | 115 | { |
108 | } | 116 | } |
109 | */ | 117 | */ |
110 | /* | 118 | /* |
111 | CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFlags fl ) | 119 | CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFlags fl ) |
112 | : QWidget( parent, name, fl ), config(_config) | 120 | : QWidget( parent, name, fl ), config(_config) |
113 | { | 121 | { |
114 | QVBoxLayout* vb = new QVBoxLayout(this); | 122 | QVBoxLayout* vb = new QVBoxLayout(this); |
115 | 123 | ||
116 | QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "View", this); | 124 | QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "View", this); |
117 | vb->addWidget(bg); | 125 | vb->addWidget(bg); |
118 | 126 | ||
119 | config.setGroup( "Toolbar" ); | 127 | config.setGroup( "Toolbar" ); |
120 | 128 | ||
121 | fullscreen = new QCheckBox( tr("Fullscreen"), bg ); | 129 | fullscreen = new QCheckBox( tr("Fullscreen"), bg ); |
122 | fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false )); | 130 | fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false )); |
123 | connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 131 | connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
132 | rotate = new QCheckBox( tr("Rotate"), bg ); | ||
133 | rotate->setChecked(config.readBoolEntry( "Rotate", false )); | ||
134 | connect(rotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
135 | |||
136 | invert = new QCheckBox( tr("Invert"), bg ); | ||
137 | invert->setChecked(config.readBoolEntry( "Invert Action", false )); | ||
138 | connect(invert, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
139 | |||
124 | zoom = new QCheckBox( tr("Zoom"), bg ); | 140 | zoom = new QCheckBox( tr("Zoom"), bg ); |
125 | zoom->setChecked(config.readBoolEntry( "Zoom In/Out", false )); | 141 | zoom->setChecked(config.readBoolEntry( "Zoom In/Out", false )); |
126 | connect(zoom, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 142 | connect(zoom, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
127 | setfont = new QCheckBox( tr("Set Font"), bg ); | 143 | setfont = new QCheckBox( tr("Set Font"), bg ); |
128 | setfont->setChecked(config.readBoolEntry( "Set Font", false )); | 144 | setfont->setChecked(config.readBoolEntry( "Set Font", false )); |
129 | connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 145 | connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
130 | 146 | ||
131 | encoding = new QCheckBox( tr("Encoding"), bg ); | 147 | encoding = new QCheckBox( tr("Encoding"), bg ); |
132 | encoding->setChecked(config.readBoolEntry("Encoding Select", false)); | 148 | encoding->setChecked(config.readBoolEntry("Encoding Select", false)); |
133 | connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 149 | connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
134 | ideogram = new QCheckBox( tr("Ideogram"), bg ); | 150 | ideogram = new QCheckBox( tr("Ideogram"), bg ); |
135 | ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false)); | 151 | ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false)); |
136 | connect(ideogram, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 152 | connect(ideogram, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
137 | 153 | ||
138 | bg = new QGroupBox(3, Qt::Horizontal, "Marks", this); | 154 | bg = new QGroupBox(3, Qt::Horizontal, "Marks", this); |
139 | vb->addWidget(bg); | 155 | vb->addWidget(bg); |
140 | mark = new QCheckBox( tr("Bookmark"), bg ); | 156 | mark = new QCheckBox( tr("Bookmark"), bg ); |
141 | mark->setChecked(config.readBoolEntry( "Mark", false )); | 157 | mark->setChecked(config.readBoolEntry( "Mark", false )); |
142 | connect(mark, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 158 | connect(mark, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
143 | annotate = new QCheckBox( tr("Annotate"), bg ); | 159 | annotate = new QCheckBox( tr("Annotate"), bg ); |
144 | annotate->setChecked(config.readBoolEntry( "Annotate", false )); | 160 | annotate->setChecked(config.readBoolEntry( "Annotate", false )); |
145 | connect(annotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 161 | connect(annotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
146 | go_to = new QCheckBox( tr("Goto"), bg ); | 162 | go_to = new QCheckBox( tr("Goto"), bg ); |
147 | go_to->setChecked(config.readBoolEntry( "Goto", false )); | 163 | go_to->setChecked(config.readBoolEntry( "Goto", false )); |
@@ -156,48 +172,50 @@ CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFl | |||
156 | clear->setChecked(config.readBoolEntry( "Clear", false )); | 172 | clear->setChecked(config.readBoolEntry( "Clear", false )); |
157 | connect(clear, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 173 | connect(clear, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
158 | save = new QCheckBox( tr("Save"), bg ); | 174 | save = new QCheckBox( tr("Save"), bg ); |
159 | save->setChecked(config.readBoolEntry( "Save", false )); | 175 | save->setChecked(config.readBoolEntry( "Save", false )); |
160 | connect(save, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 176 | connect(save, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
161 | tidy = new QCheckBox( tr("Tidy"), bg ); | 177 | tidy = new QCheckBox( tr("Tidy"), bg ); |
162 | tidy->setChecked(config.readBoolEntry( "Tidy", false )); | 178 | tidy->setChecked(config.readBoolEntry( "Tidy", false )); |
163 | connect(tidy, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 179 | connect(tidy, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
164 | block = new QCheckBox( tr("Mark/Copy"), bg ); | 180 | block = new QCheckBox( tr("Mark/Copy"), bg ); |
165 | block->setChecked(config.readBoolEntry( "Start/Copy Block", false )); | 181 | block->setChecked(config.readBoolEntry( "Start/Copy Block", false )); |
166 | connect(block, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 182 | connect(block, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
167 | 183 | ||
168 | bg = new QGroupBox(1, Qt::Horizontal, "Indicators", this); | 184 | bg = new QGroupBox(1, Qt::Horizontal, "Indicators", this); |
169 | vb->addWidget(bg); | 185 | vb->addWidget(bg); |
170 | indannotate = new QCheckBox( tr("Annotation"), bg ); | 186 | indannotate = new QCheckBox( tr("Annotation"), bg ); |
171 | indannotate->setChecked(config.readBoolEntry( "Annotation indicator", false )); | 187 | indannotate->setChecked(config.readBoolEntry( "Annotation indicator", false )); |
172 | connect(indannotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 188 | connect(indannotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
173 | m_isChanged = false; | 189 | m_isChanged = false; |
174 | } | 190 | } |
175 | 191 | ||
176 | void CBarPrefs2::saveall() | 192 | void CBarPrefs2::saveall() |
177 | { | 193 | { |
178 | config.setGroup( "Toolbar" ); | 194 | config.setGroup( "Toolbar" ); |
179 | config.writeEntry( "Fullscreen", fullscreen->isChecked()); | 195 | config.writeEntry( "Fullscreen", fullscreen->isChecked()); |
196 | config.writeEntry( "Rotate", rotate->isChecked()); | ||
197 | config.writeEntry( "Invert Action", invert->isChecked()); | ||
180 | config.writeEntry( "Zoom In/Out", zoom->isChecked()); | 198 | config.writeEntry( "Zoom In/Out", zoom->isChecked()); |
181 | config.writeEntry( "Set Font", setfont->isChecked()); | 199 | config.writeEntry( "Set Font", setfont->isChecked()); |
182 | config.writeEntry("Encoding Select", encoding->isChecked()); | 200 | config.writeEntry("Encoding Select", encoding->isChecked()); |
183 | config.writeEntry("Ideogram Mode", ideogram->isChecked()); | 201 | config.writeEntry("Ideogram Mode", ideogram->isChecked()); |
184 | 202 | ||
185 | config.writeEntry( "Mark", mark->isChecked()); | 203 | config.writeEntry( "Mark", mark->isChecked()); |
186 | config.writeEntry( "Annotate", annotate->isChecked()); | 204 | config.writeEntry( "Annotate", annotate->isChecked()); |
187 | config.writeEntry( "Goto", go_to->isChecked()); | 205 | config.writeEntry( "Goto", go_to->isChecked()); |
188 | config.writeEntry( "Delete", Delete->isChecked()); | 206 | config.writeEntry( "Delete", Delete->isChecked()); |
189 | config.writeEntry( "Autogen", autogen->isChecked()); | 207 | config.writeEntry( "Autogen", autogen->isChecked()); |
190 | config.writeEntry( "Clear", clear->isChecked()); | 208 | config.writeEntry( "Clear", clear->isChecked()); |
191 | config.writeEntry( "Save", save->isChecked()); | 209 | config.writeEntry( "Save", save->isChecked()); |
192 | config.writeEntry( "Tidy", tidy->isChecked()); | 210 | config.writeEntry( "Tidy", tidy->isChecked()); |
193 | config.writeEntry( "Start/Copy Block", block->isChecked()); | 211 | config.writeEntry( "Start/Copy Block", block->isChecked()); |
194 | config.writeEntry( "Annotation indicator", indannotate->isChecked()); | 212 | config.writeEntry( "Annotation indicator", indannotate->isChecked()); |
195 | } | 213 | } |
196 | 214 | ||
197 | CBarPrefs2::~CBarPrefs2() | 215 | CBarPrefs2::~CBarPrefs2() |
198 | { | 216 | { |
199 | } | 217 | } |
200 | */ | 218 | */ |
201 | 219 | ||
202 | CFileBarPrefs::CFileBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) | 220 | CFileBarPrefs::CFileBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) |
203 | : QWidget( parent, name, fl ), config(_config) | 221 | : QWidget( parent, name, fl ), config(_config) |
@@ -294,71 +312,81 @@ void CNavBarPrefs::saveall() | |||
294 | config.writeEntry( "Page Down", pagedown->isChecked()); | 312 | config.writeEntry( "Page Down", pagedown->isChecked()); |
295 | config.writeEntry( "Goto Start", gotostart->isChecked()); | 313 | config.writeEntry( "Goto Start", gotostart->isChecked()); |
296 | config.writeEntry( "Goto End", gotoend->isChecked()); | 314 | config.writeEntry( "Goto End", gotoend->isChecked()); |
297 | config.writeEntry( "Jump", jump->isChecked()); | 315 | config.writeEntry( "Jump", jump->isChecked()); |
298 | config.writeEntry( "Page/Line Scroll", pageline->isChecked()); | 316 | config.writeEntry( "Page/Line Scroll", pageline->isChecked()); |
299 | } | 317 | } |
300 | 318 | ||
301 | CNavBarPrefs::~CNavBarPrefs() | 319 | CNavBarPrefs::~CNavBarPrefs() |
302 | { | 320 | { |
303 | } | 321 | } |
304 | 322 | ||
305 | CViewBarPrefs::CViewBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) | 323 | CViewBarPrefs::CViewBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) |
306 | : QWidget( parent, name, fl ), config(_config) | 324 | : QWidget( parent, name, fl ), config(_config) |
307 | { | 325 | { |
308 | QVBoxLayout* vb = new QVBoxLayout(this); | 326 | QVBoxLayout* vb = new QVBoxLayout(this); |
309 | 327 | ||
310 | QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "View", this); | 328 | QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "View", this); |
311 | vb->addWidget(bg); | 329 | vb->addWidget(bg); |
312 | 330 | ||
313 | config.setGroup( "Toolbar" ); | 331 | config.setGroup( "Toolbar" ); |
314 | 332 | ||
315 | fullscreen = new QCheckBox( tr("Fullscreen"), bg ); | 333 | fullscreen = new QCheckBox( tr("Fullscreen"), bg ); |
316 | fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false )); | 334 | fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false )); |
317 | connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 335 | connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
336 | rotate = new QCheckBox( tr("Rotate"), bg ); | ||
337 | rotate->setChecked(config.readBoolEntry( "Rotate", false )); | ||
338 | connect(rotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
339 | |||
340 | invert = new QCheckBox( tr("Invert"), bg ); | ||
341 | invert->setChecked(config.readBoolEntry( "Invert Action", false )); | ||
342 | connect(invert, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | ||
343 | |||
318 | zoomin = new QCheckBox( tr("Zoom In"), bg ); | 344 | zoomin = new QCheckBox( tr("Zoom In"), bg ); |
319 | zoomin->setChecked(config.readBoolEntry( "Zoom In", false )); | 345 | zoomin->setChecked(config.readBoolEntry( "Zoom In", false )); |
320 | connect(zoomin, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 346 | connect(zoomin, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
321 | zoomout = new QCheckBox( tr("Zoom Out"), bg ); | 347 | zoomout = new QCheckBox( tr("Zoom Out"), bg ); |
322 | zoomout->setChecked(config.readBoolEntry( "Zoom Out", false )); | 348 | zoomout->setChecked(config.readBoolEntry( "Zoom Out", false )); |
323 | connect(zoomout, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 349 | connect(zoomout, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
324 | setfont = new QCheckBox( tr("Set Font"), bg ); | 350 | setfont = new QCheckBox( tr("Set Font"), bg ); |
325 | setfont->setChecked(config.readBoolEntry( "Set Font", false )); | 351 | setfont->setChecked(config.readBoolEntry( "Set Font", false )); |
326 | connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 352 | connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
327 | 353 | ||
328 | encoding = new QCheckBox( tr("Encoding"), bg ); | 354 | encoding = new QCheckBox( tr("Encoding"), bg ); |
329 | encoding->setChecked(config.readBoolEntry("Encoding Select", false)); | 355 | encoding->setChecked(config.readBoolEntry("Encoding Select", false)); |
330 | connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 356 | connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
331 | ideogram = new QCheckBox( tr("Ideogram"), bg ); | 357 | ideogram = new QCheckBox( tr("Ideogram"), bg ); |
332 | ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false)); | 358 | ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false)); |
333 | connect(ideogram, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 359 | connect(ideogram, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
334 | m_isChanged = false; | 360 | m_isChanged = false; |
335 | } | 361 | } |
336 | 362 | ||
337 | void CViewBarPrefs::saveall() | 363 | void CViewBarPrefs::saveall() |
338 | { | 364 | { |
339 | config.setGroup( "Toolbar" ); | 365 | config.setGroup( "Toolbar" ); |
340 | config.writeEntry( "Fullscreen", fullscreen->isChecked()); | 366 | config.writeEntry( "Fullscreen", fullscreen->isChecked()); |
367 | config.writeEntry( "Rotate", rotate->isChecked()); | ||
368 | config.writeEntry( "Invert Action", invert->isChecked()); | ||
341 | config.writeEntry( "Zoom In", zoomin->isChecked()); | 369 | config.writeEntry( "Zoom In", zoomin->isChecked()); |
342 | config.writeEntry( "Zoom Out", zoomout->isChecked()); | 370 | config.writeEntry( "Zoom Out", zoomout->isChecked()); |
343 | config.writeEntry( "Set Font", setfont->isChecked()); | 371 | config.writeEntry( "Set Font", setfont->isChecked()); |
344 | config.writeEntry("Encoding Select", encoding->isChecked()); | 372 | config.writeEntry("Encoding Select", encoding->isChecked()); |
345 | config.writeEntry("Ideogram Mode", ideogram->isChecked()); | 373 | config.writeEntry("Ideogram Mode", ideogram->isChecked()); |
346 | } | 374 | } |
347 | 375 | ||
348 | CViewBarPrefs::~CViewBarPrefs() | 376 | CViewBarPrefs::~CViewBarPrefs() |
349 | { | 377 | { |
350 | } | 378 | } |
351 | 379 | ||
352 | CMarkBarPrefs::CMarkBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) | 380 | CMarkBarPrefs::CMarkBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) |
353 | : QWidget( parent, name, fl ), config(_config) | 381 | : QWidget( parent, name, fl ), config(_config) |
354 | { | 382 | { |
355 | QVBoxLayout* vb = new QVBoxLayout(this); | 383 | QVBoxLayout* vb = new QVBoxLayout(this); |
356 | 384 | ||
357 | QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "Marks", this); | 385 | QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "Marks", this); |
358 | vb->addWidget(bg); | 386 | vb->addWidget(bg); |
359 | mark = new QCheckBox( tr("Bookmark"), bg ); | 387 | mark = new QCheckBox( tr("Bookmark"), bg ); |
360 | mark->setChecked(config.readBoolEntry( "Mark", false )); | 388 | mark->setChecked(config.readBoolEntry( "Mark", false )); |
361 | connect(mark, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 389 | connect(mark, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
362 | annotate = new QCheckBox( tr("Annotate"), bg ); | 390 | annotate = new QCheckBox( tr("Annotate"), bg ); |
363 | annotate->setChecked(config.readBoolEntry( "Annotate", false )); | 391 | annotate->setChecked(config.readBoolEntry( "Annotate", false )); |
364 | connect(annotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 392 | connect(annotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
@@ -391,95 +419,123 @@ CMarkBarPrefs::CMarkBarPrefs( Config& _config, QWidget* parent, const char* nam | |||
391 | 419 | ||
392 | void CMarkBarPrefs::saveall() | 420 | void CMarkBarPrefs::saveall() |
393 | { | 421 | { |
394 | config.setGroup( "Toolbar" ); | 422 | config.setGroup( "Toolbar" ); |
395 | config.writeEntry( "Mark", mark->isChecked()); | 423 | config.writeEntry( "Mark", mark->isChecked()); |
396 | config.writeEntry( "Annotate", annotate->isChecked()); | 424 | config.writeEntry( "Annotate", annotate->isChecked()); |
397 | config.writeEntry( "Goto", go_to->isChecked()); | 425 | config.writeEntry( "Goto", go_to->isChecked()); |
398 | config.writeEntry( "Delete", Delete->isChecked()); | 426 | config.writeEntry( "Delete", Delete->isChecked()); |
399 | config.writeEntry( "Autogen", autogen->isChecked()); | 427 | config.writeEntry( "Autogen", autogen->isChecked()); |
400 | config.writeEntry( "Clear", clear->isChecked()); | 428 | config.writeEntry( "Clear", clear->isChecked()); |
401 | config.writeEntry( "Save", save->isChecked()); | 429 | config.writeEntry( "Save", save->isChecked()); |
402 | config.writeEntry( "Tidy", tidy->isChecked()); | 430 | config.writeEntry( "Tidy", tidy->isChecked()); |
403 | config.writeEntry( "Start Block", startblock->isChecked()); | 431 | config.writeEntry( "Start Block", startblock->isChecked()); |
404 | config.writeEntry( "Copy Block", copyblock->isChecked()); | 432 | config.writeEntry( "Copy Block", copyblock->isChecked()); |
405 | } | 433 | } |
406 | 434 | ||
407 | CMarkBarPrefs::~CMarkBarPrefs() | 435 | CMarkBarPrefs::~CMarkBarPrefs() |
408 | { | 436 | { |
409 | } | 437 | } |
410 | 438 | ||
411 | CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl ) | 439 | CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl ) |
412 | : QWidget( parent, name, fl ) | 440 | : QWidget( parent, name, fl ) |
413 | { | 441 | { |
414 | 442 | ||
415 | QGridLayout* hl = new QGridLayout(this,1,2); | 443 | QGridLayout* hl = new QGridLayout(this,2,2); |
416 | 444 | ||
417 | hl->setMargin( 0 ); | 445 | hl->setMargin( 0 ); |
418 | 446 | ||
419 | QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Dialogs", this); | 447 | QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Dialogs", this); |
420 | floating = new QCheckBox(gb); | 448 | floating = new QCheckBox(gb); |
421 | floating->setText(tr("Floating")); | 449 | floating->setText(tr("Floating")); |
422 | |||
423 | // QLabel* TextLabel = new QLabel( gb ); | ||
424 | // TextLabel->setText( tr( "Select Button" ) ); | ||
425 | |||
426 | |||
427 | hl->addWidget( gb, 0, 0 ); | 450 | hl->addWidget( gb, 0, 0 ); |
428 | 451 | ||
429 | 452 | ||
430 | gb = new QGroupBox(1, Qt::Horizontal, "Bars (Restart)", this); | 453 | gb = new QGroupBox(1, Qt::Horizontal, "Bars (Restart)", this); |
431 | 454 | ||
432 | // QLabel* ql = new QLabel("Restart to apply changes", gb); | 455 | // QLabel* ql = new QLabel("Restart to apply changes", gb); |
433 | // TextLabel = new QLabel( gb ); | 456 | // TextLabel = new QLabel( gb ); |
434 | // TextLabel->setText( tr( "Policy" ) ); | 457 | // TextLabel->setText( tr( "Policy" ) ); |
435 | 458 | ||
436 | #ifdef USECOMBO | 459 | #ifdef USECOMBO |
437 | tbpolicy = new QComboBox(gb); | 460 | tbpolicy = new QComboBox(gb); |
438 | #else | 461 | #else |
439 | tbpolicy = new MenuButton(gb); | 462 | tbpolicy = new MenuButton(gb); |
440 | #endif | 463 | #endif |
441 | tbpolicy->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); | 464 | tbpolicy->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); |
465 | #ifdef USEQPE | ||
442 | tbpolicy->insertItem(tr("Single bar")); | 466 | tbpolicy->insertItem(tr("Single bar")); |
443 | tbpolicy->insertItem(tr("Menu/tool bar")); | 467 | tbpolicy->insertItem(tr("Menu/tool bar")); |
444 | tbpolicy->insertItem(tr("Multiple bars")); | 468 | tbpolicy->insertItem(tr("Multiple bars")); |
469 | #else | ||
470 | tbpolicy->insertItem(tr("Single bar")); | ||
471 | tbpolicy->insertItem(tr("Multiple bars")); | ||
472 | #endif | ||
445 | 473 | ||
446 | #ifdef USECOMBO | 474 | #ifdef USECOMBO |
447 | tbposition = new QComboBox(gb); | 475 | tbposition = new QComboBox(gb); |
448 | #else | 476 | #else |
449 | tbposition = new MenuButton(gb); | 477 | tbposition = new MenuButton(gb); |
450 | #endif | 478 | #endif |
451 | tbposition->insertItem(tr("Top")); | 479 | tbposition->insertItem(tr("Top")); |
452 | tbposition->insertItem(tr("Bottom")); | 480 | tbposition->insertItem(tr("Bottom")); |
453 | tbposition->insertItem(tr("Right")); | 481 | tbposition->insertItem(tr("Right")); |
454 | tbposition->insertItem(tr("Left")); | 482 | tbposition->insertItem(tr("Left")); |
455 | tbposition->insertItem(tr("Minimised")); | 483 | tbposition->insertItem(tr("Minimised")); |
456 | 484 | ||
457 | tbmovable = new QCheckBox( tr("Movable"), gb ); | 485 | tbmovable = new QCheckBox( tr("Movable"), gb ); |
458 | // ch->setChecked(config.readBoolEntry( "Movable", false )); | ||
459 | 486 | ||
460 | hl->addWidget(gb, 0, 1); | 487 | hl->addWidget(gb, 0, 1); |
461 | 488 | ||
489 | gb = new QGroupBox(1, Qt::Horizontal, "QT Scroll Bar", this); | ||
490 | |||
491 | #ifdef USECOMBO | ||
492 | qtscroll = new QComboBox(gb); | ||
493 | #else | ||
494 | qtscroll = new MenuButton(gb); | ||
495 | #endif | ||
496 | qtscroll->insertItem(tr("None")); | ||
497 | qtscroll->insertItem(tr("Right")); | ||
498 | qtscroll->insertItem(tr("Left")); | ||
499 | |||
500 | hl->addWidget(gb, 1, 0); | ||
501 | gb = new QGroupBox(1, Qt::Horizontal, "Miniscroll", this); | ||
502 | |||
503 | #ifdef USECOMBO | ||
504 | localscroll = new QComboBox(gb); | ||
505 | #else | ||
506 | localscroll = new MenuButton(gb); | ||
507 | #endif | ||
508 | localscroll->insertItem(tr("None")); | ||
509 | localscroll->insertItem(tr("Bottom")); | ||
510 | localscroll->insertItem(tr("Right")); | ||
511 | localscroll->insertItem(tr("Left")); | ||
512 | |||
513 | //scrollonleft = new QCheckBox( tr("... on Left"), gb ); | ||
514 | // ch->setChecked(config.readBoolEntry( "Movable", false )); | ||
515 | |||
516 | hl->addWidget(gb, 1, 1); | ||
517 | |||
462 | } | 518 | } |
463 | 519 | ||
464 | CMiscBarPrefs::~CMiscBarPrefs() | 520 | CMiscBarPrefs::~CMiscBarPrefs() |
465 | { | 521 | { |
466 | // no need to delete child widgets, Qt does it all for us | 522 | // no need to delete child widgets, Qt does it all for us |
467 | } | 523 | } |
468 | 524 | ||
469 | 525 | ||
470 | CIndBarPrefs::CIndBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) | 526 | CIndBarPrefs::CIndBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl ) |
471 | : QWidget( parent, name, fl ), config(_config) | 527 | : QWidget( parent, name, fl ), config(_config) |
472 | { | 528 | { |
473 | QVBoxLayout* vb = new QVBoxLayout(this); | 529 | QVBoxLayout* vb = new QVBoxLayout(this); |
474 | 530 | ||
475 | QGroupBox* bg = new QGroupBox(1, Qt::Horizontal, "Indicators", this); | 531 | QGroupBox* bg = new QGroupBox(1, Qt::Horizontal, "Indicators", this); |
476 | vb->addWidget(bg); | 532 | vb->addWidget(bg); |
477 | indannotate = new QCheckBox( tr("Annotation"), bg ); | 533 | indannotate = new QCheckBox( tr("Annotation"), bg ); |
478 | indannotate->setChecked(config.readBoolEntry( "Annotation indicator", false )); | 534 | indannotate->setChecked(config.readBoolEntry( "Annotation indicator", false )); |
479 | connect(indannotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); | 535 | connect(indannotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); |
480 | m_isChanged = false; | 536 | m_isChanged = false; |
481 | } | 537 | } |
482 | 538 | ||
483 | void CIndBarPrefs::saveall() | 539 | void CIndBarPrefs::saveall() |
484 | { | 540 | { |
485 | config.setGroup( "Toolbar" ); | 541 | config.setGroup( "Toolbar" ); |