summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/Prefs.cpp
Unidiff
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 @@
10 10
11#include <stdlib.h>
12
11#include <qcheckbox.h> 13#include <qcheckbox.h>
@@ -20,2 +22,3 @@
20#include <qlineedit.h> 22#include <qlineedit.h>
23#include <qdir.h>
21#ifdef USECOMBO 24#ifdef USECOMBO
@@ -104,2 +107,7 @@ CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl )
104 107
108 InlineTables = new QCheckBox( bg );
109 InlineTables->setText( tr( "Inline Tables" ) );
110
111 Underlinelinks = new QCheckBox( bg );
112 Underlinelinks->setText( tr( "Underline Links" ) );
105 /* 113 /*
@@ -564,2 +572,5 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
564 572
573 QCheckBox* outcodec = new QCheckBox( bg );
574 outcodec->setText( tr( "Output" ) );
575
565} 576}
@@ -595,2 +606,5 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
595 606
607 boutput = new QCheckBox( gb );
608 boutput->setText( tr( "Output" ) );
609
596 QButtonGroup* bg = new QButtonGroup(1, Qt::Horizontal, "Plucker", this); 610 QButtonGroup* bg = new QButtonGroup(1, Qt::Horizontal, "Plucker", this);
@@ -606,29 +620,51 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
606 Continuous->setText( tr( "Continuous" ) ); 620 Continuous->setText( tr( "Continuous" ) );
607 621 bg = new QButtonGroup(2, Qt::Horizontal, "Background", this);
608 bg = new QButtonGroup(2, Qt::Horizontal, "Scroll", this);
609 vl->addWidget( bg ); 622 vl->addWidget( bg );
610 623
611 // scrollinplace = new QCheckBox( bg ); 624// QLabel* TextLabel = new QLabel( bg );
612 // scrollinplace->setText( tr( "In Place" ) ); 625// TextLabel->setText( tr( "Copy an image to \"background\" in\n~/Applications/uqtreader/Theme/" ) );
626
613#ifdef USECOMBO 627#ifdef USECOMBO
614 scrolltype = new QComboBox( bg ); 628 bgtype = new QComboBox( bg );
615#else 629#else
616 scrolltype = new MenuButton( this); 630 bgtype = new MenuButton( this);
617#endif 631#endif
618 scrolltype->insertItem("In Place"); 632 bgtype->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
619 scrolltype->insertItem("Rolling (moving bg)"); 633
620 scrolltype->insertItem("Rolling (window)"); 634 bgtype->insertItem( tr("Centred") );
621 scrolltype->insertItem("Rolling (static bg)"); 635 bgtype->insertItem( tr("Tiled") );
622 scrolltype->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); 636 bgtype->insertItem( tr("Fitted") );
623 637
638 DoubleBuffer = new QCheckBox( bg );
639 DoubleBuffer->setText( tr( "Double Buffer" ) );
624 640
641 QLabel* TextLabel = new QLabel( bg );
642 TextLabel->setText( tr( "Minibar Colour" ) );
625#ifdef USECOMBO 643#ifdef USECOMBO
626 scrollcolor = new QComboBox( bg ); 644 minibarcol = new QComboBox( bg );
627#else 645#else
628 scrollcolor = new MenuButton( this); 646 minibarcol = new MenuButton( this);
629#endif 647#endif
630 populate_colours(scrollcolor); 648 populate_colours(minibarcol);
631 scrollcolor->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); 649 minibarcol->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
650}
651
652CMiscPrefs::~CMiscPrefs()
653{
654 // no need to delete child widgets, Qt does it all for us
655}
656
657CScrollPrefs::CScrollPrefs( QWidget* parent, const char* name, WFlags fl )
658 : QWidget( parent, name, fl )
659{
660
661 QHBoxLayout* hl = new QHBoxLayout(this);
632 662
663 hl->setMargin( 0 );
664
665 QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, "Scroll", this);
666 hl->addWidget( bg );
633 667
668 // scrollinplace = new QCheckBox( bg );
669 // scrollinplace->setText( tr( "In Place" ) );
634 QLabel* TextLabel = new QLabel( bg ); 670 QLabel* TextLabel = new QLabel( bg );
@@ -641,31 +677,55 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
641 TextLabel = new QLabel( bg ); 677 TextLabel = new QLabel( bg );
642 TextLabel->setText( tr( "Minibar Colour" ) ); 678 TextLabel->setText( tr( "Scroll type" ) );
643#ifdef USECOMBO 679#ifdef USECOMBO
644 minibarcol = new QComboBox( bg ); 680 scrolltype = new QComboBox( bg );
645#else 681#else
646 minibarcol = new MenuButton( this); 682 scrolltype = new MenuButton( this);
647#endif 683#endif
648 populate_colours(minibarcol); 684 scrolltype->insertItem("In Place");
649 minibarcol->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); 685 scrolltype->insertItem("Rolling (moving bg)");
686 scrolltype->insertItem("Rolling (window)");
687 scrolltype->insertItem("Rolling (static bg)");
688 scrolltype->insertItem("Send to output");
689 scrolltype->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
650 690
691 TextLabel = new QLabel( bg );
692 TextLabel->setText( tr( "Colour of scroll\nprogress indicator" ) );
651 693
652 bg = new QButtonGroup(2, Qt::Vertical, "Background", this); 694#ifdef USECOMBO
653 vl->addWidget( bg ); 695 scrollcolor = new QComboBox( bg );
696#else
697 scrollcolor = new MenuButton( this);
698#endif
699 populate_colours(scrollcolor);
700 scrollcolor->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
654 701
655// QLabel* TextLabel = new QLabel( bg ); 702 TextLabel = new QLabel( bg );
656// TextLabel->setText( tr( "Copy an image to \"background\" in\n~/Applications/uqtreader/Theme/" ) ); 703 TextLabel->setText( tr( "Output" ) );
657 704
658#ifdef USECOMBO 705#ifdef USECOMBO
659 bgtype = new QComboBox( bg ); 706 outcodec = new QComboBox( bg );
660#else 707#else
661 bgtype = new MenuButton( this); 708 outcodec = new MenuButton( this);
662#endif 709#endif
663 bgtype->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); 710#ifdef USEQPE
664 711#ifdef OPIE
665 bgtype->insertItem( tr("Centred") ); 712 QString codecpath(getenv("OPIEDIR"));
666 bgtype->insertItem( tr("Tiled") ); 713#else
667 bgtype->insertItem( tr("Fitted") ); 714 QString codecpath(getenv("QTDIR"));
715#endif
716 codecpath += "/plugins/reader/outcodecs";
717#else
718 QString codecpath(getenv("READERDIR"));
719 codecpath += "/outcodecs";
720#endif
721 QDir ocd(codecpath, "lib*.so");
722 for (int i = 0; i < ocd.count(); ++i)
723 {
724 QString tmp(ocd[i]);
725 outcodec->insertItem(tmp.mid(3,tmp.length()-6));
726 }
727 outcodec->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
668} 728}
669 729
670CMiscPrefs::~CMiscPrefs() 730CScrollPrefs::~CScrollPrefs()
671{ 731{
@@ -674,2 +734,3 @@ CMiscPrefs::~CMiscPrefs()
674 734
735
675CPrefs::CPrefs( int w, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true) 736CPrefs::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
680 layout2 = new CLayoutPrefs2(w, this); 741 layout2 = new CLayoutPrefs2(w, this);
742 scroll = new CScrollPrefs(this);
681 misc = new CMiscPrefs(this); 743 misc = new CMiscPrefs(this);
@@ -686,2 +748,3 @@ CPrefs::CPrefs( int w, bool fs, QWidget* parent, const char* name) : QDialog(par
686 td->addTab(inter, tr("Locale")); 748 td->addTab(inter, tr("Locale"));
749 td->addTab(scroll, tr("Scroll"));
687 td->addTab(misc, tr("Misc")); 750 td->addTab(misc, tr("Misc"));