summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ToolbarPrefs.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/ToolbarPrefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ToolbarPrefs.cpp76
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
@@ -6,14 +6,23 @@
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
18CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir ) 27CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir )
19{ 28{
@@ -34,8 +43,7 @@ CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char
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/*
@@ -121,6 +129,14 @@ CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFl
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) ) );
@@ -177,6 +193,8 @@ 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());
@@ -315,6 +333,14 @@ CViewBarPrefs::CViewBarPrefs( Config& _config, QWidget* parent, const char* nam
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) ) );
@@ -338,6 +364,8 @@ 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());
@@ -412,18 +440,13 @@ 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
@@ -439,9 +462,14 @@ CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl )
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);
@@ -455,10 +483,38 @@ CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl )
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
464CMiscBarPrefs::~CMiscBarPrefs() 520CMiscBarPrefs::~CMiscBarPrefs()