summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ToolbarPrefs.cpp
Side-by-side diff
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
@@ -1,50 +1,58 @@
/****************************************************************************
** Form implementation generated from reading ui file 'Prefs.ui'
**
** 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);
filebar = new CFileBarPrefs(config, this);
navbar = new CNavBarPrefs(config, this);
viewbar = new CViewBarPrefs(config, this);
markbar = new CMarkBarPrefs(config, this);
indbar = new CIndBarPrefs(config, this);
td->addTab(filebar, tr("File"));
td->addTab(navbar, tr("Navigation"));
td->addTab(viewbar, tr("View"));
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)
{
config.setGroup( "Toolbar" );
QVBoxLayout* vb = new QVBoxLayout(this);
QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "File", this);
vb->addWidget(bg);
@@ -112,24 +120,32 @@ CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFl
: QWidget( parent, name, fl ), config(_config)
{
QVBoxLayout* vb = new QVBoxLayout(this);
QGroupBox* bg = new QGroupBox(3, Qt::Horizontal, "View", this);
vb->addWidget(bg);
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) ) );
encoding = new QCheckBox( tr("Encoding"), bg );
encoding->setChecked(config.readBoolEntry("Encoding Select", false));
connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
ideogram = new QCheckBox( tr("Ideogram"), bg );
ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false));
@@ -168,24 +184,26 @@ CBarPrefs2::CBarPrefs2( Config& _config, QWidget* parent, const char* name, WFl
bg = new QGroupBox(1, Qt::Horizontal, "Indicators", this);
vb->addWidget(bg);
indannotate = new QCheckBox( tr("Annotation"), bg );
indannotate->setChecked(config.readBoolEntry( "Annotation indicator", false ));
connect(indannotate, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
m_isChanged = false;
}
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());
config.writeEntry( "Annotate", annotate->isChecked());
config.writeEntry( "Goto", go_to->isChecked());
config.writeEntry( "Delete", Delete->isChecked());
config.writeEntry( "Autogen", autogen->isChecked());
config.writeEntry( "Clear", clear->isChecked());
config.writeEntry( "Save", save->isChecked());
@@ -306,47 +324,57 @@ CViewBarPrefs::CViewBarPrefs( Config& _config, QWidget* parent, const char* nam
: QWidget( parent, name, fl ), config(_config)
{
QVBoxLayout* vb = new QVBoxLayout(this);
QGroupBox* bg = new QGroupBox(2, Qt::Horizontal, "View", this);
vb->addWidget(bg);
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) ) );
setfont = new QCheckBox( tr("Set Font"), bg );
setfont->setChecked(config.readBoolEntry( "Set Font", false ));
connect(setfont, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
encoding = new QCheckBox( tr("Encoding"), bg );
encoding->setChecked(config.readBoolEntry("Encoding Select", false));
connect(encoding, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
ideogram = new QCheckBox( tr("Ideogram"), bg );
ideogram->setChecked(config.readBoolEntry("Ideogram Mode", false));
connect(ideogram, SIGNAL(stateChanged(int)), this, SLOT( isChanged(int) ) );
m_isChanged = false;
}
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());
}
CViewBarPrefs::~CViewBarPrefs()
{
}
CMarkBarPrefs::CMarkBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl )
@@ -403,71 +431,99 @@ void CMarkBarPrefs::saveall()
config.writeEntry( "Start Block", startblock->isChecked());
config.writeEntry( "Copy Block", copyblock->isChecked());
}
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);
// TextLabel = new QLabel( gb );
// TextLabel->setText( tr( "Policy" ) );
#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
tbposition->insertItem(tr("Top"));
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
}
CIndBarPrefs::CIndBarPrefs( Config& _config, QWidget* parent, const char* name, WFlags fl )
: QWidget( parent, name, fl ), config(_config)
{
QVBoxLayout* vb = new QVBoxLayout(this);