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) (ignore 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 | |||
@@ -3,26 +3,29 @@ | |||
3 | ** | 3 | ** |
4 | ** Created: Tue Feb 11 23:53:35 2003 | 4 | ** Created: Tue Feb 11 23:53:35 2003 |
5 | ** by: The User Interface Compiler (uic) | 5 | ** by: The User Interface Compiler (uic) |
6 | ** | 6 | ** |
7 | ** WARNING! All changes made in this file will be lost! | 7 | ** WARNING! All changes made in this file will be lost! |
8 | ****************************************************************************/ | 8 | ****************************************************************************/ |
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> |
13 | #include <qpushbutton.h> | 15 | #include <qpushbutton.h> |
14 | #include <qspinbox.h> | 16 | #include <qspinbox.h> |
15 | #include <qlayout.h> | 17 | #include <qlayout.h> |
16 | #include <qvariant.h> | 18 | #include <qvariant.h> |
17 | #include <qtooltip.h> | 19 | #include <qtooltip.h> |
18 | #include <qwhatsthis.h> | 20 | #include <qwhatsthis.h> |
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> |
23 | #else | 26 | #else |
24 | #include <qpe/menubutton.h> | 27 | #include <qpe/menubutton.h> |
25 | #endif | 28 | #endif |
26 | #include <qfontdatabase.h> | 29 | #include <qfontdatabase.h> |
27 | 30 | ||
28 | #ifdef USECOMBO | 31 | #ifdef USECOMBO |
@@ -97,16 +100,21 @@ CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
97 | */ | 100 | */ |
98 | 101 | ||
99 | prepalm = new QCheckBox( bg ); | 102 | prepalm = new QCheckBox( bg ); |
100 | prepalm->setText( tr( "Repalm(Baen)" ) ); | 103 | prepalm->setText( tr( "Repalm(Baen)" ) ); |
101 | 104 | ||
102 | pkern = new QCheckBox( bg ); | 105 | pkern = new QCheckBox( bg ); |
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 ); |
107 | Negative->setText( tr( "Negative" ) ); | 115 | Negative->setText( tr( "Negative" ) ); |
108 | */ | 116 | */ |
109 | 117 | ||
110 | // Inverse = new QCheckBox( bg ); | 118 | // Inverse = new QCheckBox( bg ); |
111 | // Inverse->setText( tr( "Inverse" ) ); | 119 | // Inverse->setText( tr( "Inverse" ) ); |
112 | } | 120 | } |
@@ -557,16 +565,19 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
557 | annotation->setText( tr( "Annotation" ) ); | 565 | annotation->setText( tr( "Annotation" ) ); |
558 | 566 | ||
559 | dictionary = new QCheckBox( bg ); | 567 | dictionary = new QCheckBox( bg ); |
560 | dictionary->setText( tr( "Dictionary" ) ); | 568 | dictionary->setText( tr( "Dictionary" ) ); |
561 | 569 | ||
562 | clipboard = new QCheckBox( bg ); | 570 | clipboard = new QCheckBox( bg ); |
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 | ||
567 | CMiscPrefs::~CMiscPrefs() | 578 | CMiscPrefs::~CMiscPrefs() |
568 | { | 579 | { |
569 | // no need to delete child widgets, Qt does it all for us | 580 | // no need to delete child widgets, Qt does it all for us |
570 | } | 581 | } |
571 | */ | 582 | */ |
572 | 583 | ||
@@ -588,107 +599,159 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl ) | |||
588 | annotation->setText( tr( "Annotation" ) ); | 599 | annotation->setText( tr( "Annotation" ) ); |
589 | 600 | ||
590 | dictionary = new QCheckBox( gb ); | 601 | dictionary = new QCheckBox( gb ); |
591 | dictionary->setText( tr( "Dictionary" ) ); | 602 | dictionary->setText( tr( "Dictionary" ) ); |
592 | 603 | ||
593 | clipboard = new QCheckBox( gb ); | 604 | clipboard = new QCheckBox( gb ); |
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 ); |
598 | 612 | ||
599 | Depluck = new QCheckBox( bg ); | 613 | Depluck = new QCheckBox( bg ); |
600 | Depluck->setText( tr( "Depluck" ) ); | 614 | Depluck->setText( tr( "Depluck" ) ); |
601 | 615 | ||
602 | Dejpluck = new QCheckBox( bg ); | 616 | Dejpluck = new QCheckBox( bg ); |
603 | Dejpluck->setText( tr( "Dejpluck" ) ); | 617 | Dejpluck->setText( tr( "Dejpluck" ) ); |
604 | 618 | ||
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" ) ); |
636 | // gl->addWidget(TextLabel, 2, 0); | 672 | // gl->addWidget(TextLabel, 2, 0); |
637 | scrollstep = new QSpinBox( bg ); | 673 | scrollstep = new QSpinBox( bg ); |
638 | scrollstep->setRange(1, 10); | 674 | scrollstep->setRange(1, 10); |
639 | scrollstep->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); | 675 | scrollstep->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); |
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 | { |
677 | setCaption(tr( "OpieReader Settings" ) ); | 738 | setCaption(tr( "OpieReader Settings" ) ); |
678 | QTabWidget* td = new QTabWidget(this); | 739 | QTabWidget* td = new QTabWidget(this); |
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); |
683 | inter = new CInterPrefs(this); | 745 | inter = new CInterPrefs(this); |
684 | td->addTab(layout, tr("Layout")); | 746 | td->addTab(layout, tr("Layout")); |
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")); |
689 | QVBoxLayout* v = new QVBoxLayout(this); | 752 | QVBoxLayout* v = new QVBoxLayout(this); |
690 | v->addWidget(td); | 753 | v->addWidget(td); |
691 | 754 | ||
692 | if (fs) showMaximized(); | 755 | if (fs) showMaximized(); |
693 | } | 756 | } |
694 | 757 | ||