summaryrefslogtreecommitdiff
path: root/recipes/opie-reader
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/opie-reader
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/opie-reader')
-rw-r--r--recipes/opie-reader/files/qt4.patch2572
-rw-r--r--recipes/opie-reader/opie-reader.inc71
-rw-r--r--recipes/opie-reader/opie-reader_1.2.2.bb6
-rw-r--r--recipes/opie-reader/opie-reader_1.2.3.bb8
-rw-r--r--recipes/opie-reader/opie-reader_1.2.4.bb8
-rw-r--r--recipes/opie-reader/opie-reader_cvs.bb9
-rw-r--r--recipes/opie-reader/uqtreader_cvs.bb72
7 files changed, 2746 insertions, 0 deletions
diff --git a/recipes/opie-reader/files/qt4.patch b/recipes/opie-reader/files/qt4.patch
new file mode 100644
index 0000000000..f19000f12f
--- /dev/null
+++ b/recipes/opie-reader/files/qt4.patch
@@ -0,0 +1,2572 @@
+diff --git a/Aportis.cpp b/Aportis.cpp
+index 37dcc99..03c26ea 100644
+--- a/Aportis.cpp
++++ b/Aportis.cpp
+@@ -443,8 +443,7 @@ unsuspend();
+ gotorecordnumber(tgtrec);
+ UInt8* imgbuffer = new UInt8[reclen];
+ fread(imgbuffer, 1, reclen, fin);
+- QByteArray arr;
+- arr.assign((const char*)imgbuffer, reclen);
++ QByteArray arr((const char*)imgbuffer, reclen);
+
+ QImage* qimage = new QImage(arr);
+ fseek(fin, cur, SEEK_SET);
+diff --git a/Bkmks.cpp b/Bkmks.cpp
+index 45aa045..c67db9e 100644
+--- a/Bkmks.cpp
++++ b/Bkmks.cpp
+@@ -32,8 +32,7 @@ Bkmk::Bkmk(const Bkmk& rhs) :
+ m_annolen(0),
+ m_position(0)
+ {
+- init(rhs.name(), sizeof(tchar)*(ustrlen(rhs.name())+1), rhs.anno(),
+- sizeof(tchar)*(ustrlen(rhs.anno())+1), rhs.value());
++ *this = rhs;
+ }
+
+ Bkmk::Bkmk(const tchar* _nm, const tchar* _anno, unsigned int _p) : m_position(_p)
+diff --git a/BuffDoc.cpp b/BuffDoc.cpp
+index 355d14d..170ed43 100644
+--- a/BuffDoc.cpp
++++ b/BuffDoc.cpp
+@@ -23,6 +23,8 @@
+ #include "Reb.h"
+ #endif
+
++#include "uqtcommon.h"
++
+
+ linkType BuffDoc::hyperlink(unsigned int n, unsigned int noff, QString& wrd, QString& nm)
+ {
+@@ -674,35 +676,19 @@ int BuffDoc::openfile(QWidget* _parent, const char *src)
+ }
+ // //qDebug("Doing final open:%x:%x",exp,filt);
+ #else
+-#ifdef USEQPE
+-#ifdef OPIE
+- QString codecpath(getenv("OPIEDIR"));
+-#else
+- QString codecpath(getenv("QTDIR"));
+-#endif
+- codecpath += "/plugins/reader/codecs";
+-#else
+- QString codecpath(getenv("READERDIR"));
+- codecpath += "/codecs";
+-#endif
+- QDir d(codecpath, "*.so");
++ QDir d(uqt_codecspath(), "*.so");
+
+ if (d.exists())
+ {
+
+- const QFileInfoList *list = d.entryInfoList();
+- QFileInfoListIterator it( *list ); // create list iterator
+- QFileInfo *fi; // pointer for traversing
+-
++ QFileInfoList list = d.entryInfoList();
+ int ret = -1;
+- while ( ret != 0 && (fi=it.current()) )
+- { // for each file...
++ for(QFileInfoListIterator it=list.begin();ret && it!=list.end();++it) {
+ if (exp != NULL) delete exp;
+- qDebug("Trying %s", (const char*)fi->fileName());
+- exp = new ebookcodec(fi->fileName());
++ qDebug("Trying %s", (const char*)it->fileName());
++ exp = new ebookcodec(it->fileName());
+ ret = exp->openfile(src);
+- ++it;
+- }
++ }
+ qDebug("Buffdoc:Finished opening");
+ if (ret != 0)
+ {
+diff --git a/ButtonPrefs.cpp b/ButtonPrefs.cpp
+index 762de55..2c4cad7 100644
+--- a/ButtonPrefs.cpp
++++ b/ButtonPrefs.cpp
+@@ -17,7 +17,7 @@
+ #include <qtooltip.h>
+ #include <qwhatsthis.h>
+ #include <qbuttongroup.h>
+-#include <qmultilineedit.h>
++#include <Qt3Support/Q3MultiLineEdit>
+ #ifdef USECOMBO
+ #include <qcombobox.h>
+ #else
+@@ -26,12 +26,14 @@
+ #include <qfontdatabase.h>
+
+ #include <qlistview.h>
++#include <Qt3Support/Q3ListViewItem>
++#include <QtGui/QKeyEvent>
+
+-class MyQListViewItem : public QListViewItem
++class MyQListViewItem : public Q3ListViewItem
+ {
+ orKey o;
+ public:
+- MyQListViewItem(const orKey& _o, QListView* p, const QString& c1, const QString& c2, const QString& c3) : QListViewItem(p, c1, c2, c3), o(_o) { }
++ MyQListViewItem(const orKey& _o, Q3ListView* p, const QString& c1, const QString& c2, const QString& c3) : Q3ListViewItem(p, c1, c2, c3), o(_o) { }
+ orKey getKey() { return o; }
+ };
+
+@@ -43,7 +45,7 @@ void CButtonPrefs::mapkey(Qt::ButtonState st, int _key)
+ void CButtonPrefs::mapkey(Qt::ButtonState st, int _key, int act)
+ {
+ orKey key(st, _key, ((act == cesScrollMore) || (act == cesScrollLess)));
+- QMap<orKey,QListViewItem*>::Iterator iter = listmap.find(key);
++ QMap<orKey,Q3ListViewItem*>::Iterator iter = listmap.find(key);
+ if (iter != listmap.end())
+ {
+ lb->takeItem(iter.data());
+@@ -112,7 +114,7 @@ CButtonPrefs::CButtonPrefs( QMap<orKey, int>* _kmap, QWidget* parent, const cha
+ {
+ QVBoxLayout* vo = new QVBoxLayout(this);
+ QHBoxLayout* lo = new QHBoxLayout();
+- setFocusPolicy(QWidget::StrongFocus);
++ setFocusPolicy(Qt::StrongFocus);
+ #ifdef USECOMBO
+ action = new QComboBox( this );
+ #else
+@@ -123,17 +125,17 @@ CButtonPrefs::CButtonPrefs( QMap<orKey, int>* _kmap, QWidget* parent, const cha
+
+
+
+- QMultiLineEdit* TextLabel1 = new QMultiLineEdit( this );
++ Q3MultiLineEdit* TextLabel1 = new Q3MultiLineEdit( this );
+ TextLabel1->setText( tr( "Press the key(s) you want assigned to the highlighted function.\n\nPress the delete button to unmap the key.\n\nUse the \"Close\" button (not the [x]) to finish." ) );
+ TextLabel1->setReadOnly(true);
+- TextLabel1->setWordWrap(QMultiLineEdit::WidgetWidth);
++ TextLabel1->setWordWrap(Q3MultiLineEdit::WidgetWidth);
+
+ // lo->addWidget(TextLabel, 0, Qt::AlignTop);
+ // lo->addWidget(action, 0, Qt::AlignTop);
+ lo->addWidget(TextLabel1);
+ lo->addWidget(action);
+ vo->addLayout(lo);
+- lb = new QListView(this);
++ lb = new Q3ListView(this);
+ lb->addColumn( tr( "Key" ) );
+ lb->addColumn( tr( "Function" ) );
+ lb->addColumn( tr( "Scroll" ) );
+diff --git a/ButtonPrefs.h b/ButtonPrefs.h
+index 9af04e1..f09ad02 100644
+--- a/ButtonPrefs.h
++++ b/ButtonPrefs.h
+@@ -11,11 +11,13 @@
+
+ #include <qvariant.h>
+ #include <qwidget.h>
+-#include <qtabdialog.h>
++#include <Qt3Support/Q3TabDialog>
+ #include <qtabwidget.h>
+ #include <qspinbox.h>
+ #include <qcheckbox.h>
+ #include <qlineedit.h>
++#include <qnamespace.h>
++using namespace Qt;
+
+ #define USECOMBO
+
+@@ -33,18 +35,18 @@ class QGridLayout;
+ //class QCheckBox;
+ class QLabel;
+ //class QSpinBox;
+-class QListViewItem;
++class Q3ListViewItem;
+
+-class QListView;
+-class QListViewItem;
++class Q3ListView;
++class Q3ListViewItem;
+
+ class CButtonPrefs : public QWidget
+ {
+ Q_OBJECT
+
+ QMap<orKey, int> *kmap;
+- QMap<orKey, QListViewItem*> listmap;
+- QListView* lb;
++ QMap<orKey, Q3ListViewItem*> listmap;
++ Q3ListView* lb;
+ void keyPressEvent(QKeyEvent* e);
+ #ifdef USECOMBO
+ void populate(QComboBox*);
+diff --git a/CAnnoEdit.cpp b/CAnnoEdit.cpp
+index 35821ed..6ee1321 100644
+--- a/CAnnoEdit.cpp
++++ b/CAnnoEdit.cpp
+@@ -83,8 +83,8 @@ CAnnoEdit::CAnnoEdit(QWidget *parent, const char *name, WFlags f) :
+ {
+ QVBoxLayout* grid = new QVBoxLayout(this);
+ m_name = new QLineEdit(this, "Name");
+- m_anno = new QMultiLineEdit(this, "Annotation");
+- m_anno->setWordWrap(QMultiLineEdit::WidgetWidth);
++ m_anno = new Q3MultiLineEdit(this, "Annotation");
++ m_anno->setWordWrap(Q3MultiLineEdit::WidgetWidth);
+ QPushButton* exitButton = new QPushButton("Okay", this);
+ connect(exitButton, SIGNAL( clicked() ), this, SLOT( slotOkay() ) );
+ QPushButton* cancelButton = new QPushButton("Cancel", this);
+diff --git a/CAnnoEdit.h b/CAnnoEdit.h
+index 78d3eeb..c74c560 100644
+--- a/CAnnoEdit.h
++++ b/CAnnoEdit.h
+@@ -4,15 +4,17 @@
+ #include <qlayout.h>
+ #include <qpushbutton.h>
+ #include <qlineedit.h>
+-#include <qmultilineedit.h>
++#include <Qt3Support/Q3MultiLineEdit>
+ #include <qcombobox.h>
++#include <qnamespace.h>
++using namespace Qt;
+
+ class CAnnoEdit : public QWidget
+ {
+ Q_OBJECT
+
+ QLineEdit* m_name;
+- QMultiLineEdit* m_anno;
++ Q3MultiLineEdit* m_anno;
+ size_t m_posn, m_posn2;
+ QComboBox* colorbox;
+ public:
+diff --git a/CFilter.cpp b/CFilter.cpp
+index a4ea60a..84fa451 100644
+--- a/CFilter.cpp
++++ b/CFilter.cpp
+@@ -9,6 +9,7 @@
+ #include "CDrawBuffer.h"
+ #include "CFilter.h"
+ #include "hrule.h"
++#include "uqtcommon.h"
+
+ #include <qregexp.h>
+ #include <qimage.h>
+@@ -665,17 +666,8 @@ class ErrorFilter : public CFilter
+ #ifndef __STATIC
+ ExternFilter::ExternFilter(const QString& nm, const QString& optional) : filt(NULL), handle(NULL)
+ {
+-#ifdef USEQPE
+-#ifdef OPIE
+- QString filterpath(getenv("OPIEDIR"));
+-#else
+- QString filterpath(getenv("QTDIR"));
+-#endif
+- filterpath += "/plugins/reader/filters/lib";
+-#else
+- QString filterpath(getenv("READERDIR"));
+- filterpath += "/filters/lib";
+-#endif
++ QString filterpath = uqt_filterspath();
++ filterpath += "lib";
+ filterpath += nm;
+ filterpath += ".so";
+ if (QFile::exists(filterpath))
+diff --git a/CHM.cpp b/CHM.cpp
+index ace5abc..3c325bb 100644
+--- a/CHM.cpp
++++ b/CHM.cpp
+@@ -335,7 +335,7 @@ int CHM::getch() {
+ #else
+ QChar letter = chmBuffer[bufpos++];
+ #endif
+- return (int)(char)letter;
++ return letter.unicode();
+ }
+
+ void CHM::getch(tchar& ch, CStyle& sty)
+diff --git a/CloseDialog.cpp b/CloseDialog.cpp
+index 741fa67..62ae906 100644
+--- a/CloseDialog.cpp
++++ b/CloseDialog.cpp
+@@ -5,7 +5,7 @@ CCloseDialog::CCloseDialog(const QString& fname, bool fs, QWidget* parent, const
+ {
+ setCaption(tr("Tidy-up"));
+ QVBoxLayout *tmp = new QVBoxLayout(this);
+- QVButtonGroup* vb = new QVButtonGroup(tr("Delete"), this);
++ Q3VButtonGroup* vb = new Q3VButtonGroup(tr("Delete"), this);
+ tmp->addWidget(vb);
+ QString filestring = tr("Delete") + " " + fname;
+ file = new QCheckBox(filestring, vb);
+diff --git a/CloseDialog.h b/CloseDialog.h
+index 54aaf1c..84609f5 100644
+--- a/CloseDialog.h
++++ b/CloseDialog.h
+@@ -11,14 +11,17 @@
+
+ #include <qvariant.h>
+ #include <qwidget.h>
+-#include <qtabdialog.h>
++#include <Qt3Support/Q3TabDialog>
+ #include <qtabwidget.h>
+ #include <qspinbox.h>
+ #include <qcheckbox.h>
+ #include <qcombobox.h>
+ #include <qlineedit.h>
+ //#include <qpe/menubutton.h>
+-#include <qvbuttongroup.h>
++#include <Qt3Support/Q3VButtonGroup>
++#include <QtGui/QKeyEvent>
++#include <qnamespace.h>
++using namespace Qt;
+
+ class QVBoxLayout;
+ class QHBoxLayout;
+diff --git a/FontControl.cpp b/FontControl.cpp
+index 08b8c52..0be54ba 100644
+--- a/FontControl.cpp
++++ b/FontControl.cpp
+@@ -1,4 +1,5 @@
+ #include <qfontdatabase.h>
++#include <Qt3Support/Q3ValueList>
+
+ #include "FontControl.h"
+
+@@ -33,9 +34,9 @@ int FontControl::gzoom()
+
+ bool FontControl::ChangeFont(QString& n, int tgt)
+ {
+- QValueList<int>::Iterator it;
++ Q3ValueList<int>::Iterator it;
+ QFontDatabase fdb;
+- QValueList<int> sizes = fdb.pointSizes(n);
++ Q3ValueList<int> sizes = fdb.pointSizes(n);
+ if (sizes.count() == 0)
+ {
+ return false;
+@@ -65,3 +66,25 @@ bool FontControl::ChangeFont(QString& n, int tgt)
+ }
+ return true;
+ }
++
++void FontControl::setCourier() {
++ setCourier(m_fontname);
++}
++void FontControl::setCourier(const QString fn) {
++ QFontDatabase fdb;
++ QStringList fl = fdb.families();
++ setCourier(fn,fl);
++}
++void FontControl::setCourier(const QString fn,const QStringList fl) {
++ QString fp;
++ int sp = fn.indexOf(' ');
++ if(sp>=0) fp = fn.left(sp);
++ for(QStringList::const_iterator i=fl.begin();i!=fl.end();++i) {
++ if(
++ ( i->startsWith(fn,Qt::CaseInsensitive)
++ || ( (!fp.isEmpty()) && i->startsWith(fp,Qt::CaseInsensitive) ) )
++ && ( i->endsWith("mono",Qt::CaseInsensitive)
++ || i->endsWith("Fixed") ) )
++ hasCourier(true,*i);
++ }
++}
+diff --git a/FontControl.h b/FontControl.h
+index 563e1a8..c7a54ab 100644
+--- a/FontControl.h
++++ b/FontControl.h
+@@ -2,6 +2,7 @@
+ #define __FONTCONTROL_H
+
+ #include <qfontmetrics.h>
++#include <QFontDatabase>
+ #include "StyleConsts.h"
+
+ class FontControl
+@@ -32,6 +33,7 @@ class FontControl
+ m_fontsizes(NULL), m_hasCourier(false), m_leading(0), m_extraspace(0), m_fixgraphics(true)
+ {
+ ChangeFont(n, size);
++ setCourier();
+ }
+ ~FontControl()
+ {
+@@ -167,6 +169,10 @@ class FontControl
+ {
+ return m_extraspace;
+ }
++
++ void setCourier();
++ void setCourier(const QString fn);
++ void setCourier(const QString fn,const QStringList fl);
+ };
+
+ #endif
+diff --git a/GraphicWin.h b/GraphicWin.h
+index 70d5f7e..a6c556a 100644
+--- a/GraphicWin.h
++++ b/GraphicWin.h
+@@ -1,14 +1,16 @@
+ #ifndef __GRAPHICWIN_H
+ #define __GRAPHICWIN_H
+
+-#include <qscrollview.h>
++#include <Qt3Support/Q3ScrollView>
+ #include <qpixmap.h>
+ #include <qimage.h>
+ #include <qpushbutton.h>
+ #include <qlayout.h>
+ #include <qwmatrix.h>
++#include <qnamespace.h>
++using namespace Qt;
+
+-class GraphicScroll : public QScrollView
++class GraphicScroll : public Q3ScrollView
+ {
+ Q_OBJECT
+ QWidget* m_picture;
+@@ -19,7 +21,7 @@ class GraphicScroll : public QScrollView
+ }
+ public:
+ GraphicScroll( QWidget *parent=0, const char *name=0, WFlags f = 0)
+- : QScrollView(parent, name, f)
++ : Q3ScrollView(parent, name, f)
+ {
+ m_picture = new QWidget(viewport());
+ addChild(m_picture);
+diff --git a/Prefs.cpp b/Prefs.cpp
+index 6c4d45b..d20dc00 100644
+--- a/Prefs.cpp
++++ b/Prefs.cpp
+@@ -7,6 +7,7 @@
+ ** WARNING! All changes made in this file will be lost!
+ ****************************************************************************/
+ #include "Prefs.h"
++#include "uqtcommon.h"
+
+ #include <stdlib.h>
+
+@@ -27,6 +28,7 @@
+ #include <qpe/menubutton.h>
+ #endif
+ #include <qfontdatabase.h>
++#include <Qt3Support/Q3ButtonGroup>
+
+ #ifdef USECOMBO
+ void populate_colours(QComboBox *mb)
+@@ -58,7 +60,7 @@ CLayoutPrefs::CLayoutPrefs( QWidget* parent, const char* name, WFlags fl )
+ : QWidget( parent, name, fl )
+ {
+ QHBoxLayout* hb = new QHBoxLayout(this);
+- QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, "Text", this);
++ Q3ButtonGroup* bg = new Q3ButtonGroup(2, Qt::Horizontal, "Text", this);
+ hb->addWidget(bg);
+
+ StripCR = new QCheckBox( bg );
+@@ -592,7 +594,7 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
+ vl->setMargin( 0 );
+ hl->setMargin( 0 );
+
+- QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Select Action", this);
++ Q3GroupBox* gb = new Q3GroupBox(1, Qt::Horizontal, "Select Action", this);
+ hl->addWidget( gb );
+
+ annotation = new QCheckBox( gb );
+@@ -607,7 +609,7 @@ 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);
++ Q3ButtonGroup* bg = new Q3ButtonGroup(1, Qt::Horizontal, "Plucker", this);
+ hl->addWidget( bg );
+
+ Depluck = new QCheckBox( bg );
+@@ -618,7 +620,7 @@ CMiscPrefs::CMiscPrefs( QWidget* parent, const char* name, WFlags fl )
+
+ Continuous = new QCheckBox( bg );
+ Continuous->setText( tr( "Continuous" ) );
+- bg = new QButtonGroup(2, Qt::Horizontal, "Background", this);
++ bg = new Q3ButtonGroup(2, Qt::Horizontal, "Background", this);
+ vl->addWidget( bg );
+
+ // QLabel* TextLabel = new QLabel( bg );
+@@ -662,7 +664,7 @@ CScrollPrefs::CScrollPrefs( QWidget* parent, const char* name, WFlags fl )
+
+ hl->setMargin( 0 );
+
+- QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, "Scroll", this);
++ Q3ButtonGroup* bg = new Q3ButtonGroup(2, Qt::Horizontal, "Scroll", this);
+ hl->addWidget( bg );
+
+ // scrollinplace = new QCheckBox( bg );
+@@ -707,18 +709,8 @@ CScrollPrefs::CScrollPrefs( QWidget* parent, const char* name, WFlags fl )
+ #else
+ outcodec = new MenuButton( this);
+ #endif
+-#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");
++ QString codecpath = uqt_outcodecspath();
++ QDir ocd(uqt_outcodecspath(), "lib*.so");
+ for (int i = 0; i < ocd.count(); ++i)
+ {
+ QString tmp(ocd[i]);
+@@ -772,7 +764,7 @@ CInterPrefs::CInterPrefs( QWidget* parent, const char* name, WFlags fl )
+ {
+ QHBoxLayout* hb = new QHBoxLayout(this);
+
+- QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, tr("International"), this);
++ Q3GroupBox* gb = new Q3GroupBox(1, Qt::Horizontal, tr("International"), this);
+
+ hb->addWidget(gb);
+
+@@ -784,7 +776,7 @@ CInterPrefs::CInterPrefs( QWidget* parent, const char* name, WFlags fl )
+ TextLabel = new QLabel( gb );
+ TextLabel->setText( tr( "Ideogram Width" ) );
+ ideogramwidth = new QSpinBox( gb );
+- ideogramwidth->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
++ // ideogramwidth->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ ideogramwidth->setRange(1,200);
+
+ propfontchange = new QCheckBox( gb );
+@@ -809,7 +801,7 @@ CInterPrefs::CInterPrefs( QWidget* parent, const char* name, WFlags fl )
+
+ QVBoxLayout* vb = new QVBoxLayout;
+
+- gb = new QGroupBox(1, Qt::Horizontal, "Dictionary", this);
++ gb = new Q3GroupBox(1, Qt::Horizontal, "Dictionary", this);
+
+ TextLabel = new QLabel( gb );
+ TextLabel->setText( tr( "Application" ) );
+diff --git a/Prefs.h b/Prefs.h
+index 103484e..a499506 100644
+--- a/Prefs.h
++++ b/Prefs.h
+@@ -11,11 +11,14 @@
+
+ #include <qvariant.h>
+ #include <qwidget.h>
+-#include <qtabdialog.h>
++#include <Qt3Support/Q3TabDialog>
+ #include <qtabwidget.h>
+ #include <qspinbox.h>
+ #include <qcheckbox.h>
+ #include <qlineedit.h>
++#include <qnamespace.h>
++using namespace Qt;
++#include <QtGui/QKeyEvent>
+
+ #define USECOMBO
+
+diff --git a/QFloatBar.h b/QFloatBar.h
+index cc98233..0144fce 100644
+--- a/QFloatBar.h
++++ b/QFloatBar.h
+@@ -1,10 +1,11 @@
+ #ifndef __QFLOATBAR_H
+ #define __QFLOATBAR_H
+
+-#include <qtoolbar.h>
+-#include <qmainwindow.h>
++#include <Qt3Support/Q3ToolBar>
++#include <Qt3Support/Q3MainWindow>
++#include <qnamespace.h>
+
+-class QFloatBar : public QToolBar
++class QFloatBar : public Q3ToolBar
+ {
+ Q_OBJECT
+ virtual void hideEvent(QHideEvent* e)
+@@ -12,7 +13,7 @@ class QFloatBar : public QToolBar
+ /*if (e->spontaneous())*/ emit OnHide();
+ }
+ public:
+- QFloatBar(char* t, QMainWindow* mw, QMainWindow::ToolBarDock td, bool f) : QToolBar(t, mw, td, f) {}
++ QFloatBar(char* t, Q3MainWindow* mw, Qt::ToolBarDock td, bool f) : Q3ToolBar(t, mw, td, f) {}
+ signals:
+ void OnHide();
+ };
+diff --git a/QTReader.cpp b/QTReader.cpp
+index 75da8ac..2c698ba 100644
+--- a/QTReader.cpp
++++ b/QTReader.cpp
+@@ -1999,6 +1999,7 @@ void QTReader::drawFonts()
+ }
+ }
+ emitRedraw();
++ update();
+ }
+ /*
+ else
+@@ -2221,7 +2222,7 @@ void QTReader::init()
+ setBackgroundColor( m_bg );
+ buffdoc.setfilter(getfilter());
+ ChangeFont(m_textsize);
+- setFocusPolicy(QWidget::StrongFocus);
++ setFocusPolicy(Qt::StrongFocus);
+ timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(doscroll()));
+ #ifdef USETIMER
+@@ -3096,7 +3097,7 @@ void QTReader::blitRot(int dx, int dy, int sw, int sh, CDrawBuffer* txt)
+
+ QPixmap pm(sw, sh);
+
+- QPainter pd(&pm, this);
++ QPainter pd(&pm); // , this);
+ if (m_bgpm.isNull())
+ {
+ pd.eraseRect(pm.rect());
+@@ -3136,7 +3137,7 @@ void QTReader::blitRot(int dx, int dy, int sw, int sh, CDrawBuffer* txt)
+ /*
+ p.drawPixmap(QPoint(dx, dy), rp);
+ */
+- bitBlt(this, dx, dy, &rp, 0, 0, -1, -1, CopyROP);
++ bitBlt(this, dx, dy, &rp, 0, 0, -1, -1, QPainter::CompositionMode_Source);
+ }
+
+ QString QTReader::about()
+diff --git a/QTReader.h b/QTReader.h
+index 9daa07a..6afa3e7 100644
+--- a/QTReader.h
++++ b/QTReader.h
+@@ -8,6 +8,9 @@
+ #include "BuffDoc.h"
+ #include "FontControl.h"
+
++#include <qnamespace.h>
++using namespace Qt;
++
+ //#include <qtimer.h>
+
+ class CDrawBuffer;
+diff --git a/QTReaderApp.cpp b/QTReaderApp.cpp
+index b985094..529ec9e 100644
+--- a/QTReaderApp.cpp
++++ b/QTReaderApp.cpp
+@@ -20,7 +20,9 @@
+
+ #include <qregexp.h>
+ #include <qclipboard.h>
+-#include <qwidgetstack.h>
++#include <QStackedWidget>
++#include <Qt3Support/Q3Action>
++#include <qdesktopwidget.h>
+ #ifdef USEQPE
+ #include <qpe/qpemenubar.h>
+ #include <qpe/qpetoolbar.h>
+@@ -31,13 +33,12 @@
+ #include <qpe/menubutton.h>
+ #endif
+ #include <qcombobox.h>
+-#include <qpopupmenu.h>
++#include <Qt3Support/Q3PopupMenu>
+ #include <qaction.h>
+ #include <qapplication.h>
+ #include <qlineedit.h>
+ #include <qtoolbutton.h>
+ #include <qspinbox.h>
+-#include <qobjectlist.h>
+ #include <qstatusbar.h>
+ #ifdef USEQPE
+ #include <qpe/global.h>
+@@ -66,6 +67,7 @@
+ #include "FixedFont.h"
+ #include "URLDialog.h"
+ #include "util.h"
++#include "uqtcommon.h"
+ #include <qfontdatabase.h>
+
+ #ifdef USEQPE
+@@ -103,18 +105,10 @@ bool CheckVersion(int&, int&, char&, QWidget*);
+ #define USEMSGS
+ #define PICDIR "opie-reader/"
+ #else
+-//#define PICDIR "/home/tim/uqtreader/pics/"
+-QString picdir()
+-{
+- QString hd(getenv("READERDIR"));
+- return hd + "/pics";
+-}
+-#define PICDIR picdir()
++#define PICDIR uqt_picspath()
+ #endif
+ #endif
+
+-unsigned long QTReaderApp::m_uid = 0;
+-
+ void QTReaderApp::setScrollState(bool _b) { m_scrollButton->setOn(_b); }
+
+ #ifdef USEQPE
+@@ -156,16 +150,9 @@ void QTReaderApp::listBkmkFiles()
+ d.setFilter( QDir::Files | QDir::NoSymLinks );
+ // d.setSorting( QDir::Size | QDir::Reversed );
+
+- const QFileInfoList *list = d.entryInfoList();
+- QFileInfoListIterator it( *list ); // create list iterator
+- QFileInfo *fi; // pointer for traversing
+- while ( (fi=it.current()) ) { // for each file...
+-
+- bkmkselector->insertItem(fi->fileName(), cnt++);
+-
+- //qDebug( "%10li %s", fi->size(), fi->fileName().data() );
+- ++it; // goto next list element
+- }
++ QFileInfoList list = d.entryInfoList();
++ for(QFileInfoListIterator it=list.begin();it!=list.end();++it)
++ bkmkselector->insertItem(it->fileName(), cnt++);
+
+ #else /* USEQPE */
+ int cnt = 0;
+@@ -192,7 +179,7 @@ void QTReaderApp::listBkmkFiles()
+ //tjw menu->hide();
+
+
+- editorStack->raiseWidget( bkmkselector );
++ editorStack->setCurrentWidget( bkmkselector );
+ hidetoolbars();
+ m_nBkmkAction = cRmBkmkFile;
+ }
+@@ -207,6 +194,8 @@ void QTReaderApp::hidetoolbars()
+
+ #if defined(USEQPE)
+ menubar->hide();
++#else
++ mb->hide();
+ #endif
+
+ if (m_scrollbar != NULL) m_scrollbar->hide();
+@@ -233,7 +222,7 @@ void QTReaderApp::hidetoolbars()
+ }
+
+ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
+- : QMainWindow( parent, name, f ), m_dontSave(false),
++ : Q3MainWindow( parent, name, f ), m_dontSave(false),
+ fileBar(NULL), navBar(NULL), viewBar(NULL), markBar(NULL), m_scrollbar(NULL), m_localscroll(2), m_hidebars(false), m_kmapchanged(false)
+ {
+ {
+@@ -337,41 +326,41 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
+ // QToolBar* markBar = new QToolBar("File", this);
+
+ #if defined(USEQPE)
+- menubar = new QToolBar("Menus", this, m_tbposition);
++ menubar = new Q3ToolBar("Menus", this, m_tbposition);
+ mb = new QPEMenuBar( menubar );
+ #else
+ mb = new QMenuBar( this );
+ #endif
+
+ #if defined(USEQPE)
+- QPopupMenu* tmp = new QPopupMenu(mb);
++ Q3PopupMenu* tmp = new Q3PopupMenu(mb);
+ mb->insertItem( geticon( "AppsIcon" ), tmp );
+ #else
+ QMenuBar* tmp = mb;
+ #endif
+
+- QPopupMenu *file = new QPopupMenu( mb );
++ Q3PopupMenu *file = new Q3PopupMenu( mb );
+ tmp->insertItem( tr( "File" ), file );
+
+- QPopupMenu *navigation = new QPopupMenu(mb);
++ Q3PopupMenu *navigation = new Q3PopupMenu(mb);
+ tmp->insertItem( tr( "Navigation" ), navigation );
+
+- QPopupMenu *view = new QPopupMenu( mb );
++ Q3PopupMenu *view = new Q3PopupMenu( mb );
+ tmp->insertItem( tr( "View" ), view );
+
+- QPopupMenu *marks = new QPopupMenu( this );
++ Q3PopupMenu *marks = new Q3PopupMenu( this );
+ tmp->insertItem( tr( "Marks" ), marks );
+
+- QPopupMenu *settings = new QPopupMenu( this );
++ Q3PopupMenu *settings = new Q3PopupMenu( this );
+ tmp->insertItem( tr( "Settings" ), settings );
+
+ // addToolBar(menubar, "Menus",QMainWindow::Top);
+ // addToolBar(fileBar, "Toolbar",QMainWindow::Top);
+
+- // QPopupMenu *edit = new QPopupMenu( this );
++ // Q3PopupMenu *edit = new Q3PopupMenu( this );
+
+ /*
+- QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
++ Q3Action *a = new Q3Action( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 );
+ connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
+ a->addTo( bar );
+ a->addTo( file );
+@@ -379,34 +368,35 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
+ QWidget* widge = new QWidget(this);
+ setCentralWidget( widge );
+ QVBoxLayout* vlayout = new QVBoxLayout(widge);
++ vlayout->setMargin(0);
+ m_layout = new QBoxLayout(QBoxLayout::LeftToRight);
+ m_prog = new QLabel(widge);
+ vlayout->addLayout(m_layout, 1);
+ vlayout->addWidget(m_prog);
+
+- editorStack = new QWidgetStack( widge );
++ editorStack = new QStackedWidget( widge );
+ // setCentralWidget( editorStack );
+
+ searchVisible = FALSE;
+ regVisible = FALSE;
+ m_fontVisible = false;
+
+- m_buttonprefs = new CButtonPrefs(&kmap, this);
+- editorStack->addWidget(m_buttonprefs, get_unique_id());
++ m_buttonprefs = new CButtonPrefs(&kmap, editorStack);
++ editorStack->addWidget(m_buttonprefs);
+ connect( m_buttonprefs, SIGNAL( Closed() ), this, SLOT( infoClose() ) );
+
+
+ m_annoWin = new CAnnoEdit(editorStack);
+- editorStack->addWidget(m_annoWin, get_unique_id());
++ editorStack->addWidget(m_annoWin);
+ connect( m_annoWin, SIGNAL( finished(const QString&, const QString&) ), this, SLOT( addAnno(const QString&, const QString&) ) );
+ connect( m_annoWin, SIGNAL( cancelled() ), this, SLOT( infoClose() ) );
+
+ m_infoWin = new infowin(editorStack);
+- editorStack->addWidget(m_infoWin, get_unique_id());
++ editorStack->addWidget(m_infoWin);
+ connect( m_infoWin, SIGNAL( Close() ), this, SLOT( infoClose() ) );
+
+ m_graphicwin = new GraphicWin(editorStack);
+- editorStack->addWidget(m_graphicwin, get_unique_id());
++ editorStack->addWidget(m_graphicwin);
+ connect( m_graphicwin, SIGNAL( Closed() ), this, SLOT( infoClose() ) );
+
+ // bkmkselector = new QListBox(editorStack, "Bookmarks");
+@@ -414,7 +404,7 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
+ // connect(bkmkselector, SIGNAL( selected(const QString&) ), this, SLOT( gotobkmk(const QString&) ) );
+ connect(bkmkselector, SIGNAL( selected(int) ), this, SLOT( gotobkmk(int) ) );
+ connect(bkmkselector, SIGNAL( cancelled() ), this, SLOT( cancelbkmk() ) );
+- editorStack->addWidget( bkmkselector, get_unique_id() );
++ editorStack->addWidget( bkmkselector);
+
+ /*
+ importSelector = new FileSelector( "*", editorStack, "importselector", false );
+@@ -572,139 +562,139 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f )
+ connect( reader, SIGNAL( HandleKeyRequest(QKeyEvent*) ), this, SLOT( handlekey(QKeyEvent*) ) );
+ connect( reader, SIGNAL( SetScrollState(bool) ), this, SLOT( setScrollState(bool) ) );
+ connect( reader, SIGNAL(RefreshBitmap()), this, SLOT(setBackgroundBitmap()));
+- editorStack->addWidget( reader, get_unique_id() );
++ editorStack->addWidget( reader );
+
+- m_preferences_action = new QAction( tr( "Configuration" ), geticon( "SettingsIcon" ), QString::null, 0, this, NULL);
++ m_preferences_action = new Q3Action( tr( "Configuration" ), geticon( "SettingsIcon" ), QString::null, 0, this, NULL);
+ connect( m_preferences_action, SIGNAL( activated() ), this, SLOT( showprefs() ) );
+ m_preferences_action->addTo( settings );
+
+- m_saveconfig_action = new QAction( tr( "Save Config" ), QString::null, 0, this, NULL);
++ m_saveconfig_action = new Q3Action( tr( "Save Config" ), QString::null, 0, this, NULL);
+ connect( m_saveconfig_action, SIGNAL( activated() ), this, SLOT( SaveConfig() ) );
+ m_saveconfig_action->addTo( settings );
+
+- m_loadconfig_action = new QAction( tr( "Load Config" ), QString::null, 0, this, NULL);
++ m_loadconfig_action = new Q3Action( tr( "Load Config" ), QString::null, 0, this, NULL);
+ connect( m_loadconfig_action, SIGNAL( activated() ), this, SLOT( LoadConfig() ) );
+ m_loadconfig_action->addTo( settings );
+
+- m_tidyconfig_action = new QAction( tr( "Delete Config" ), QString::null, 0, this, NULL);
++ m_tidyconfig_action = new Q3Action( tr( "Delete Config" ), QString::null, 0, this, NULL);
+ connect( m_tidyconfig_action, SIGNAL( activated() ), this, SLOT( TidyConfig() ) );
+ m_tidyconfig_action->addTo( settings );
+
+ settings->insertSeparator();
+- m_toolbarprefs_action = new QAction( tr( "Toolbars" ), QString::null, 0, this, NULL);
++ m_toolbarprefs_action = new Q3Action( tr( "Toolbars" ), QString::null, 0, this, NULL);
+ connect( m_toolbarprefs_action, SIGNAL( activated() ), this, SLOT( showtoolbarprefs() ) );
+ m_toolbarprefs_action->addTo( settings );
+
+- m_buttonprefs_action = new QAction( tr( "Buttons" ), QString::null, 0, this, NULL);
++ m_buttonprefs_action = new Q3Action( tr( "Buttons" ), QString::null, 0, this, NULL);
+ connect( m_buttonprefs_action, SIGNAL( activated() ), this, SLOT( showbuttonprefs() ) );
+ m_buttonprefs_action->addTo( settings );
+
+- m_loadtheme_action = new QAction( tr( "Load Theme" ), QString::null, 0, this, NULL);
++ m_loadtheme_action = new Q3Action( tr( "Load Theme" ), QString::null, 0, this, NULL);
+ connect( m_loadtheme_action, SIGNAL( activated() ), this, SLOT( LoadTheme() ) );
+ m_loadtheme_action->addTo( settings );
+
+- m_repara_action = new QAction( tr( "EOP Marker" ), QString::null, 0, this, NULL);
++ m_repara_action = new Q3Action( tr( "EOP Marker" ), QString::null, 0, this, NULL);
+ connect( m_repara_action, SIGNAL( activated() ), this, SLOT( reparastring() ) );
+ m_repara_action->addTo(settings);
+
+ #ifdef USEQPE
+- m_grab_action = new QAction( tr( "Grab Buttons" ), QString::null, 0, this, NULL, true );
++ m_grab_action = new Q3Action( tr( "Grab Buttons" ), QString::null, 0, this, NULL, true );
+ connect( m_grab_action, SIGNAL( toggled(bool) ), this, SLOT( setgrab(bool) ) );
+ m_grab_action->setOn(m_grabkeyboard);
+ m_grab_action->addTo( settings );
+ #endif
+
+- m_open_action = new QAction( tr( "Open" ), geticon( "fileopen" ), QString::null, 0, this, 0 );
++ m_open_action = new Q3Action( tr( "Open" ), geticon( "fileopen" ), QString::null, 0, this, 0 );
+ connect( m_open_action, SIGNAL( activated() ), this, SLOT( fileOpen() ) );
+ m_open_action->addTo( file );
+
+- m_close_action = new QAction( tr( "Close" ), geticon( "close" ), QString::null, 0, this, 0 );
++ m_close_action = new Q3Action( tr( "Close" ), geticon( "close" ), QString::null, 0, this, 0 );
+ connect( m_close_action, SIGNAL( activated() ), this, SLOT( fileClose() ) );
+ m_close_action->addTo( file );
+
+ #ifdef _SCRIPT
+- a = new QAction( tr( "Run Script" ), QString::null, 0, this, NULL);
++ a = new Q3Action( tr( "Run Script" ), QString::null, 0, this, NULL);
+ connect( a, SIGNAL( activated() ), this, SLOT( RunScript() ) );
+ a->addTo( file );
+ #endif
+ /*
+- a = new QAction( tr( "Revert" ), geticon( "close" ), QString::null, 0, this, 0 );
++ a = new Q3Action( tr( "Revert" ), geticon( "close" ), QString::null, 0, this, 0 );
+ connect( a, SIGNAL( activated() ), this, SLOT( fileRevert() ) );
+ a->addTo( file );
+
+- a = new QAction( tr( "Cut" ), geticon( "cut" ), QString::null, 0, this, 0 );
++ a = new Q3Action( tr( "Cut" ), geticon( "cut" ), QString::null, 0, this, 0 );
+ connect( a, SIGNAL( activated() ), this, SLOT( editCut() ) );
+ a->addTo( filebar() );
+ a->addTo( edit );
+ */
+
+- m_info_action = new QAction( tr( "Info" ), geticon( "UtilsIcon" ), QString::null, 0, this, NULL);
++ m_info_action = new Q3Action( tr( "Info" ), geticon( "UtilsIcon" ), QString::null, 0, this, NULL);
+ connect( m_info_action, SIGNAL( activated() ), this, SLOT( showinfo() ) );
+ m_info_action->addTo( file );
+
+- m_touch_action = new QAction( tr( "Two/One To