Diffstat (limited to 'noncore/apps/opie-reader/ToolbarPrefs.cpp') (more/less context) (show 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 | |||
@@ -7,12 +7,21 @@ | |||
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 ) |
@@ -35,6 +44,5 @@ CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char | |||
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 | ||
@@ -122,4 +130,12 @@ CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFl | |||
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 )); |
@@ -178,4 +194,6 @@ void CBarPrefs2::saveall() | |||
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()); |
@@ -316,4 +334,12 @@ CViewBarPrefs::CViewBarPrefs( Config& _config, QWidget* parent, const char* nam | |||
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 )); |
@@ -339,4 +365,6 @@ void CViewBarPrefs::saveall() | |||
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()); |
@@ -413,5 +441,5 @@ CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags 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 ); |
@@ -420,9 +448,4 @@ CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
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 | ||
@@ -440,7 +463,12 @@ CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
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 |
@@ -456,8 +484,36 @@ CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
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 | ||