summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/Prefs.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/Prefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/Prefs.cpp127
1 files changed, 95 insertions, 32 deletions
diff --git a/noncore/apps/opie-reader/Prefs.cpp b/noncore/apps/opie-reader/Prefs.cpp
index 2733faa..6c4d45b 100644
--- a/noncore/apps/opie-reader/Prefs.cpp
+++ b/noncore/apps/opie-reader/Prefs.cpp
@@ -10,2 +10,4 @@
+#include <stdlib.h>
+
#include <qcheckbox.h>
@@ -20,2 +22,3 @@
#include <qlineedit.h>
+#include <qdir.h>
#ifdef USECOMBO
@@ -104,2 +107,7 @@ CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl )
+ InlineTables = new QCheckBox( bg );
+ InlineTables->setText( tr( "Inline Tables" ) );
+
+ Underlinelinks = new QCheckBox( bg );
+ Underlinelinks->setText( tr( "Underline Links" ) );
/*
@@ -564,2 +572,5 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
+ QCheckBox* outcodec = new QCheckBox( bg );
+ outcodec->setText( tr( "Output" ) );
+
}
@@ -595,2 +606,5 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
+ boutput = new QCheckBox( gb );
+ boutput->setText( tr( "Output" ) );
+
QButtonGroup* bg = new QButtonGroup(1, Qt::Horizontal, "Plucker", this);
@@ -606,29 +620,51 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
Continuous->setText( tr( "Continuous" ) );
-
- bg = new QButtonGroup(2, Qt::Horizontal, "Scroll", this);
+ bg = new QButtonGroup(2, Qt::Horizontal, "Background", this);
vl->addWidget( bg );
- // scrollinplace = new QCheckBox( bg );
- // scrollinplace->setText( tr( "In Place" ) );
+// QLabel* TextLabel = new QLabel( bg );
+// TextLabel->setText( tr( "Copy an image to \"background\" in\n~/Applications/uqtreader/Theme/" ) );
+
#ifdef USECOMBO
- scrolltype = new QComboBox( bg );
+ bgtype = new QComboBox( bg );
#else
- scrolltype = new MenuButton( this);
+ bgtype = new MenuButton( this);
#endif
- scrolltype->insertItem("In Place");
- scrolltype->insertItem("Rolling (moving bg)");
- scrolltype->insertItem("Rolling (window)");
- scrolltype->insertItem("Rolling (static bg)");
- scrolltype->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ bgtype->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+
+ bgtype->insertItem( tr("Centred") );
+ bgtype->insertItem( tr("Tiled") );
+ bgtype->insertItem( tr("Fitted") );
+ DoubleBuffer = new QCheckBox( bg );
+ DoubleBuffer->setText( tr( "Double Buffer" ) );
+ QLabel* TextLabel = new QLabel( bg );
+ TextLabel->setText( tr( "Minibar Colour" ) );
#ifdef USECOMBO
- scrollcolor = new QComboBox( bg );
+ minibarcol = new QComboBox( bg );
#else
- scrollcolor = new MenuButton( this);
+ minibarcol = new MenuButton( this);
#endif
- populate_colours(scrollcolor);
- scrollcolor->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ populate_colours(minibarcol);
+ minibarcol->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+}
+
+CMiscPrefs::~CMiscPrefs()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+CScrollPrefs::CScrollPrefs( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+{
+
+ QHBoxLayout* hl = new QHBoxLayout(this);
+ hl->setMargin( 0 );
+
+ QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, "Scroll", this);
+ hl->addWidget( bg );
+ // scrollinplace = new QCheckBox( bg );
+ // scrollinplace->setText( tr( "In Place" ) );
QLabel* TextLabel = new QLabel( bg );
@@ -641,31 +677,55 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
TextLabel = new QLabel( bg );
- TextLabel->setText( tr( "Minibar Colour" ) );
+ TextLabel->setText( tr( "Scroll type" ) );
#ifdef USECOMBO
- minibarcol = new QComboBox( bg );
+ scrolltype = new QComboBox( bg );
#else
- minibarcol = new MenuButton( this);
+ scrolltype = new MenuButton( this);
#endif
- populate_colours(minibarcol);
- minibarcol->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ scrolltype->insertItem("In Place");
+ scrolltype->insertItem("Rolling (moving bg)");
+ scrolltype->insertItem("Rolling (window)");
+ scrolltype->insertItem("Rolling (static bg)");
+ scrolltype->insertItem("Send to output");
+ scrolltype->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ TextLabel = new QLabel( bg );
+ TextLabel->setText( tr( "Colour of scroll\nprogress indicator" ) );
- bg = new QButtonGroup(2, Qt::Vertical, "Background", this);
- vl->addWidget( bg );
+#ifdef USECOMBO
+ scrollcolor = new QComboBox( bg );
+#else
+ scrollcolor = new MenuButton( this);
+#endif
+ populate_colours(scrollcolor);
+ scrollcolor->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
-// QLabel* TextLabel = new QLabel( bg );
-// TextLabel->setText( tr( "Copy an image to \"background\" in\n~/Applications/uqtreader/Theme/" ) );
+ TextLabel = new QLabel( bg );
+ TextLabel->setText( tr( "Output" ) );
#ifdef USECOMBO
- bgtype = new QComboBox( bg );
+ outcodec = new QComboBox( bg );
#else
- bgtype = new MenuButton( this);
+ outcodec = new MenuButton( this);
#endif
- bgtype->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
-
- bgtype->insertItem( tr("Centred") );
- bgtype->insertItem( tr("Tiled") );
- bgtype->insertItem( tr("Fitted") );
+#ifdef USEQPE
+#ifdef OPIE
+ QString codecpath(getenv("OPIEDIR"));
+#else
+ QString codecpath(getenv("QTDIR"));
+#endif
+ codecpath += "/plugins/reader/outcodecs";
+#else
+ QString codecpath(getenv("READERDIR"));
+ codecpath += "/outcodecs";
+#endif
+ QDir ocd(codecpath, "lib*.so");
+ for (int i = 0; i < ocd.count(); ++i)
+ {
+ QString tmp(ocd[i]);
+ outcodec->insertItem(tmp.mid(3,tmp.length()-6));
+ }
+ outcodec->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
}
-CMiscPrefs::~CMiscPrefs()
+CScrollPrefs::~CScrollPrefs()
{
@@ -674,2 +734,3 @@ CMiscPrefs::~CMiscPrefs()
+
CPrefs::CPrefs( int w, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true)
@@ -680,2 +741,3 @@ CPrefs::CPrefs( int w, bool fs, QWidget* parent, const char* name) : QDialog(par
layout2 = new CLayoutPrefs2(w, this);
+ scroll = new CScrollPrefs(this);
misc = new CMiscPrefs(this);
@@ -686,2 +748,3 @@ CPrefs::CPrefs( int w, bool fs, QWidget* parent, const char* name) : QDialog(par
td->addTab(inter, tr("Locale"));
+ td->addTab(scroll, tr("Scroll"));
td->addTab(misc, tr("Misc"));