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 @@ -3,20 +3,29 @@ ** ** Created: Tue Feb 11 23:53:35 2003 ** by: The User Interface Compiler (uic) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ +#include "useqpe.h" #include "ToolbarPrefs.h" +#include <qcheckbox.h> +#include <qlabel.h> +#include <qpushbutton.h> +#include <qspinbox.h> #include <qlayout.h> +#include <qvariant.h> +#include <qtooltip.h> +#include <qwhatsthis.h> +#include <qcombobox.h> #include <qbuttongroup.h> +#include <qlineedit.h> #ifdef USEQPE #include <qpe/menubutton.h> #endif -#include <qpe/qpeapplication.h> CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true), config( appdir ) { setCaption(tr( "Toolbar Settings" ) ); QTabWidget* td = new QTabWidget(this); misc = new CMiscBarPrefs(this); @@ -31,14 +40,13 @@ CBarPrefs::CBarPrefs(const QString& appdir, bool fs, QWidget* parent, const char td->addTab(markbar, tr("Marks")); td->addTab(indbar, tr("Indicators")); td->addTab(misc, tr("Policy")); QVBoxLayout* v = new QVBoxLayout(this); v->addWidget(td); - if (fs) - QPEApplication::showDialog( this ); + if (fs) showMaximized(); } /* CBarPrefs1::CBarPrefs1( Config& _config, QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ), config(_config) { @@ -118,12 +126,20 @@ CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFl config.setGroup( "Toolbar" ); fullscreen = new QCheckBox( tr("Fullscreen"), bg ); fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false )); connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); + rotate = new QCheckBox( tr("Rotate"), bg ); + rotate->setChecked(config.readBoolEntry( "Rotate", false )); + connect(rotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); + + invert = new QCheckBox( tr("Invert"), bg ); + invert->setChecked(config.readBoolEntry( "Invert Action", false )); + connect(invert, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); + zoom = new QCheckBox( tr("Zoom"), bg ); zoom->setChecked(config.readBoolEntry( "Zoom In/Out", false )); connect(zoom, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); setfont = new QCheckBox( tr("Set Font"), bg ); setfont->setChecked(config.readBoolEntry( "Set Font", false )); connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); @@ -174,12 +190,14 @@ CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFl } void CBarPrefs2::saveall() { config.setGroup( "Toolbar" ); config.writeEntry( "Fullscreen", fullscreen->isChecked()); + config.writeEntry( "Rotate", rotate->isChecked()); + config.writeEntry( "Invert Action", invert->isChecked()); config.writeEntry( "Zoom In/Out", zoom->isChecked()); config.writeEntry( "Set Font", setfont->isChecked()); config.writeEntry("Encoding Select", encoding->isChecked()); config.writeEntry("Ideogram Mode", ideogram->isChecked()); config.writeEntry( "Mark", mark->isChecked()); @@ -312,12 +330,20 @@ CViewBarPrefs::CViewBarPrefs( Config& _config, QWidget* parent, const char* nam config.setGroup( "Toolbar" ); fullscreen = new QCheckBox( tr("Fullscreen"), bg ); fullscreen->setChecked(config.readBoolEntry( "Fullscreen", false )); connect(fullscreen, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); + rotate = new QCheckBox( tr("Rotate"), bg ); + rotate->setChecked(config.readBoolEntry( "Rotate", false )); + connect(rotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); + + invert = new QCheckBox( tr("Invert"), bg ); + invert->setChecked(config.readBoolEntry( "Invert Action", false )); + connect(invert, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); + zoomin = new QCheckBox( tr("Zoom In"), bg ); zoomin->setChecked(config.readBoolEntry( "Zoom In", false )); connect(zoomin, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); zoomout = new QCheckBox( tr("Zoom Out"), bg ); zoomout->setChecked(config.readBoolEntry( "Zoom Out", false )); connect(zoomout, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) ); @@ -335,12 +361,14 @@ CViewBarPrefs::CViewBarPrefs( Config& _config, QWidget* parent, const char* nam } void CViewBarPrefs::saveall() { config.setGroup( "Toolbar" ); config.writeEntry( "Fullscreen", fullscreen->isChecked()); + config.writeEntry( "Rotate", rotate->isChecked()); + config.writeEntry( "Invert Action", invert->isChecked()); config.writeEntry( "Zoom In", zoomin->isChecked()); config.writeEntry( "Zoom Out", zoomout->isChecked()); config.writeEntry( "Set Font", setfont->isChecked()); config.writeEntry("Encoding Select", encoding->isChecked()); config.writeEntry("Ideogram Mode", ideogram->isChecked()); } @@ -409,24 +437,19 @@ CMarkBarPrefs::~CMarkBarPrefs() } CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { - QGridLayout* hl = new QGridLayout(this,1,2); + QGridLayout* hl = new QGridLayout(this,2,2); hl->setMargin( 0 ); QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Dialogs", this); floating = new QCheckBox(gb); floating->setText(tr("Floating")); - -// QLabel* TextLabel = new QLabel( gb ); -// TextLabel->setText( tr( "Select Button" ) ); - - hl->addWidget( gb, 0, 0 ); gb = new QGroupBox(1, Qt::Horizontal, "Bars (Restart)", this); // QLabel* ql = new QLabel("Restart to apply changes", gb); @@ -436,15 +459,20 @@ CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl ) #ifdef USECOMBO tbpolicy = new QComboBox(gb); #else tbpolicy = new MenuButton(gb); #endif tbpolicy->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); +#ifdef USEQPE tbpolicy->insertItem(tr("Single bar")); tbpolicy->insertItem(tr("Menu/tool bar")); tbpolicy->insertItem(tr("Multiple bars")); +#else + tbpolicy->insertItem(tr("Single bar")); + tbpolicy->insertItem(tr("Multiple bars")); +#endif #ifdef USECOMBO tbposition = new QComboBox(gb); #else tbposition = new MenuButton(gb); #endif @@ -452,16 +480,44 @@ CMiscBarPrefs::CMiscBarPrefs( QWidget* parent, const char* name, WFlags fl ) tbposition->insertItem(tr("Bottom")); tbposition->insertItem(tr("Right")); tbposition->insertItem(tr("Left")); tbposition->insertItem(tr("Minimised")); tbmovable = new QCheckBox( tr("Movable"), gb ); -// ch->setChecked(config.readBoolEntry( "Movable", false )); hl->addWidget(gb, 0, 1); + gb = new QGroupBox(1, Qt::Horizontal, "QT Scroll Bar", this); + +#ifdef USECOMBO + qtscroll = new QComboBox(gb); +#else + qtscroll = new MenuButton(gb); +#endif + qtscroll->insertItem(tr("None")); + qtscroll->insertItem(tr("Right")); + qtscroll->insertItem(tr("Left")); + + hl->addWidget(gb, 1, 0); + gb = new QGroupBox(1, Qt::Horizontal, "Miniscroll", this); + +#ifdef USECOMBO + localscroll = new QComboBox(gb); +#else + localscroll = new MenuButton(gb); +#endif + localscroll->insertItem(tr("None")); + localscroll->insertItem(tr("Bottom")); + localscroll->insertItem(tr("Right")); + localscroll->insertItem(tr("Left")); + + //scrollonleft = new QCheckBox( tr("... on Left"), gb ); + // ch->setChecked(config.readBoolEntry( "Movable", false )); + + hl->addWidget(gb, 1, 1); + } CMiscBarPrefs::~CMiscBarPrefs() { // no need to delete child widgets, Qt does it all for us } |