author | pohly <pohly> | 2005-05-05 14:39:33 (UTC) |
---|---|---|
committer | pohly <pohly> | 2005-05-05 14:39:33 (UTC) |
commit | 39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91 (patch) (unidiff) | |
tree | 96e66fdc18dca4d4ab8611133e072f57dea224b9 /noncore/apps/opie-reader/Prefs.cpp | |
parent | 279fc4fd1986074acbadd3a8e86fcf3968a8dd5c (diff) | |
download | opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.zip opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.gz opie-39fbfd5eb7e45d73d38e8a2ce9437a3d7e1b8e91.tar.bz2 |
new opie-reader sources with support for ArriereGo, Reb input and flite output plugins
Diffstat (limited to 'noncore/apps/opie-reader/Prefs.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Prefs.cpp | 127 |
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 | |||
@@ -9,4 +9,6 @@ | |||
9 | #include "Prefs.h" | 9 | #include "Prefs.h" |
10 | 10 | ||
11 | #include <stdlib.h> | ||
12 | |||
11 | #include <qcheckbox.h> | 13 | #include <qcheckbox.h> |
12 | #include <qlabel.h> | 14 | #include <qlabel.h> |
@@ -19,4 +21,5 @@ | |||
19 | #include <qbuttongroup.h> | 21 | #include <qbuttongroup.h> |
20 | #include <qlineedit.h> | 22 | #include <qlineedit.h> |
23 | #include <qdir.h> | ||
21 | #ifdef USECOMBO | 24 | #ifdef USECOMBO |
22 | #include <qcombobox.h> | 25 | #include <qcombobox.h> |
@@ -103,4 +106,9 @@ CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
103 | pkern->setText( tr( "Kern" ) ); | 106 | pkern->setText( tr( "Kern" ) ); |
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 | /* |
106 | Negative = new QCheckBox( bg ); | 114 | Negative = new QCheckBox( bg ); |
@@ -563,4 +571,7 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
563 | clipboard->setText( tr( "Clipboard" ) ); | 571 | clipboard->setText( tr( "Clipboard" ) ); |
564 | 572 | ||
573 | QCheckBox* outcodec = new QCheckBox( bg ); | ||
574 | outcodec->setText( tr( "Output" ) ); | ||
575 | |||
565 | } | 576 | } |
566 | 577 | ||
@@ -594,4 +605,7 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
594 | clipboard->setText( tr( "Clipboard" ) ); | 605 | clipboard->setText( tr( "Clipboard" ) ); |
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); |
597 | hl->addWidget( bg ); | 611 | hl->addWidget( bg ); |
@@ -605,31 +619,53 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
605 | Continuous = new QCheckBox( bg ); | 619 | Continuous = new QCheckBox( bg ); |
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 | |||
652 | CMiscPrefs::~CMiscPrefs() | ||
653 | { | ||
654 | // no need to delete child widgets, Qt does it all for us | ||
655 | } | ||
656 | |||
657 | CScrollPrefs::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 ); |
635 | TextLabel->setText( tr( "Scroll step" ) ); | 671 | TextLabel->setText( tr( "Scroll step" ) ); |
@@ -640,37 +676,62 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
640 | 676 | ||
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 | ||
670 | CMiscPrefs::~CMiscPrefs() | 730 | CScrollPrefs::~CScrollPrefs() |
671 | { | 731 | { |
672 | // no need to delete child widgets, Qt does it all for us | 732 | // no need to delete child widgets, Qt does it all for us |
673 | } | 733 | } |
674 | 734 | ||
735 | |||
675 | CPrefs::CPrefs( int w, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true) | 736 | CPrefs::CPrefs( int w, bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true) |
676 | { | 737 | { |
@@ -679,4 +740,5 @@ CPrefs::CPrefs( int w, bool fs, QWidget* parent, const char* name) : QDialog(par | |||
679 | layout = new CLayoutPrefs(this); | 740 | layout = new CLayoutPrefs(this); |
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); |
682 | // button = new CButtonPrefs(kmap, this); | 744 | // button = new CButtonPrefs(kmap, this); |
@@ -685,4 +747,5 @@ CPrefs::CPrefs( int w, bool fs, QWidget* parent, const char* name) : QDialog(par | |||
685 | td->addTab(layout2, tr("Layout(2)")); | 747 | td->addTab(layout2, tr("Layout(2)")); |
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")); |
688 | // td->addTab(button, tr("Buttons")); | 751 | // td->addTab(button, tr("Buttons")); |