diff options
| -rw-r--r-- | packages/opie-reader/files/qt4.patch | 2091 | ||||
| -rw-r--r-- | packages/opie-reader/uqtreader_cvs.bb | 71 |
2 files changed, 2162 insertions, 0 deletions
diff --git a/packages/opie-reader/files/qt4.patch b/packages/opie-reader/files/qt4.patch new file mode 100644 index 0000000000..82f3b9fdd1 --- /dev/null +++ b/packages/opie-reader/files/qt4.patch @@ -0,0 +1,2091 @@ +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..8c1eadc 100644 +--- a/BuffDoc.cpp ++++ b/BuffDoc.cpp +@@ -682,7 +682,8 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) + #endif + codecpath += "/plugins/reader/codecs"; + #else +- QString codecpath(getenv("READERDIR")); ++ const char *rd = getenv("READERDIR"); ++ QString codecpath(rd?rd:"/usr/lib/uqtreader"); + codecpath += "/codecs"; + #endif + QDir d(codecpath, "*.so"); +@@ -690,19 +691,14 @@ int BuffDoc::openfile(QWidget* _parent, const char *src) + 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..4baa890 100644 +--- a/CFilter.cpp ++++ b/CFilter.cpp +@@ -673,7 +673,8 @@ ExternFilter::ExternFilter(const QString& nm, const QString& optional) : filt(NU + #endif + filterpath += "/plugins/reader/filters/lib"; + #else +- QString filterpath(getenv("READERDIR")); ++ const char *rd = getenv("READERDIR"); ++ QString filterpath(rd?rd:"/usr/lib/uqtreader"); + filterpath += "/filters/lib"; + #endif + filterpath += nm; +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..b80dd6e 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; +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..f3df856 100644 +--- a/Prefs.cpp ++++ b/Prefs.cpp +@@ -27,6 +27,7 @@ + #include <qpe/menubutton.h> + #endif + #include <qfontdatabase.h> ++#include <Qt3Support/Q3ButtonGroup> + + #ifdef USECOMBO + void populate_colours(QComboBox *mb) +@@ -58,7 +59,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 +593,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 +608,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 +619,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 +663,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 ); +@@ -715,7 +716,8 @@ CScrollPrefs::CScrollPrefs( QWidget* parent, const char* name, WFlags fl ) + #endif + codecpath += "/plugins/reader/outcodecs"; + #else +- QString codecpath(getenv("READERDIR")); ++ const char *rd = getenv("READERDIR"); ++ QString codecpath(rd?rd:"/usr/lib/uqtreader"); + codecpath += "/outcodecs"; + #endif + QDir ocd(codecpath, "lib*.so"); +@@ -772,7 +774,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 +786,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 +811,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..b525435 100644 +--- a/QTReaderApp.cpp ++++ b/QTReaderApp.cpp +@@ -20,7 +20,9 @@ + + #include <qregexp.h> + #include <qclipboard.h> +-#include <qwidgetstack.h> ++#include <Qt3Support/Q3WidgetStack> ++#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> +@@ -106,7 +107,8 @@ bool CheckVersion(int&, int&, char&, QWidget*); + //#define PICDIR "/home/tim/uqtreader/pics/" + QString picdir() + { +- QString hd(getenv("READERDIR")); ++ const char *rd = getenv("READERDIR"); ++ QString hd(rd?rd:"/usr/share/uqtreader"); + return hd + "/pics"; + } + #define PICDIR picdir() +@@ -156,16 +158,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; +@@ -207,6 +202,8 @@ void QTReaderApp::hidetoolbars() + + #if defined(USEQPE) + menubar->hide(); ++#else ++ mb->hide(); + #endif + + if (m_scrollbar != NULL) m_scrollbar->hide(); +@@ -233,7 +230,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 +334,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 ); +@@ -384,7 +381,7 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) + vlayout->addLayout(m_layout, 1); + vlayout->addWidget(m_prog); + +- editorStack = new QWidgetStack( widge ); ++ editorStack = new Q3WidgetStack( widge ); + // setCentralWidget( editorStack ); + + searchVisible = FALSE; +@@ -574,137 +571,137 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) + connect( reader, SIGNAL(RefreshBitmap()), this, SLOT(setBackgroundBitmap())); + editorStack->addWidget( reader, get_unique_id() ); + +- 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 Touch" ), geticon( "1to1" ), QString::null, 0, this, NULL, true ); ++ m_touch_action = new Q3Action( tr( "Two/One Touch" ), geticon( "1to1" ), QString::null, 0, this, NULL, true ); + connect( m_touch_action, SIGNAL( toggled(bool) ), this, SLOT( setTwoTouch(bool) ) ); + m_touch_action->setOn(m_twoTouch); + m_touch_action->addTo( file ); + +- m_find_action = new QAction( tr( "Find..." ), geticon( "find" ), QString::null, 0, this, NULL); ++ m_find_action = new Q3Action( tr( "Find..." ), geticon( "find" ), QString::null, 0, this, NULL); + connect( m_find_action, SIGNAL( activated() ), this, SLOT( editFind() ) ); + file->insertSeparator(); + // a->addTo( bar ); + m_find_action->addTo( file ); + +- m_exportlinks_action = new QAction( tr( "Export Links" ), QString::null, 0, this, NULL); ++ m_exportlinks_action = new Q3Action( tr( "Export Links" ), QString::null, 0, this, NULL); + connect( m_exportlinks_action, SIGNAL( activated() ), this, SLOT( ExportLinks() ) ); + m_exportlinks_action->addTo( file ); + +- m_scrollButton = new QAction( tr( "Scroll" ), getmyicon( "panel-arrow-down" ), QString::null, 0, this, 0, true ); ++ m_scrollButton = new Q3Action( tr( "Scroll" ), getmyicon( "panel-arrow-down" ), QString::null, 0, this, 0, true ); + connect( m_scrollButton, SIGNAL( toggled(bool) ), this, SLOT( autoScroll(bool) ) ); + m_scrollButton->addTo(navigation); + m_scrollButton->setOn(false); + +- m_start_action = new QAction( tr( "Goto Start" ), geticon( "start" ), QString::null, 0, this, NULL); ++ m_start_action = new Q3Action( tr( "Goto Start" ), geticon( "start" ), QString::null, 0, this, NULL); + connect( m_start_action, SIGNAL( activated() ), this, SLOT( gotoStart() ) ); + m_start_action->addTo(navigation); + +- m_end_action = new QAction( tr( "Goto End" ), geticon( "finish" ), QString::null, 0, this, NULL); ++ m_end_action = new Q3Action( tr( "Goto End" ), geticon( "finish" ), QString::null, 0, this, NULL); + connect( m_end_action, SIGNAL( activated() ), this, SLOT( gotoEnd() ) ); + m_end_action->addTo(navigation); + +- m_jump_action = new QAction( tr( "Jump" ), geticon( "rotate" ), QString::null, 0, this, NULL); ++ m_jump_action = new Q3Action( tr( "Jump" ), geticon( "rotate" ), QString::null, 0, this, NULL); + connect( m_jump_action, SIGNAL( activated() ), this, SLOT( jump() ) ); + m_jump_action->addTo(navigation); + +- m_pageline_action = new QAction( tr( "Page/Line Scroll" ), geticon( "pass" ), QString::null, 0, this, NULL, true ); ++ m_pageline_action = new Q3Action( tr( "Page/Line Scroll" ), geticon( "pass" ), QString::null, 0, this, NULL, true ); + connect( m_pageline_action, SIGNAL( toggled(bool) ), this, SLOT( pagemode(bool) ) ); + m_pageline_action->addTo(navigation); + m_pageline_action->setOn(reader->m_bpagemode); + +- m_pageup_action = new QAction( tr( "Up" ), geticon( "up" ), QString::null, 0, this, 0 ); ++ m_pageup_action = new Q3Action( tr( "Up" ), geticon( "up" ), QString::null, 0, this, 0 ); + connect( m_pageup_action, SIGNAL( activated() ), this, SLOT( pageup() ) ); + m_pageup_action->addTo( navigation ); + +- m_pagedn_action = new QAction( tr( "Down" ), geticon( "down" ), QString::null, 0, this, 0 ); ++ m_pagedn_action = new Q3Action( tr( "Down" ), geticon( "down" ), QString::null, 0, this, 0 ); + connect( m_pagedn_action, SIGNAL( activated() ), this, SLOT( pagedn() ) ); + m_pagedn_action->addTo( navigation ); + +- m_back_action = new QAction( tr( "Back" ), geticon( "back" ), QString::null, 0, this, 0 ); ++ m_back_action = new Q3Action( tr( "Back" ), geticon( "back" ), QString::null, 0, this, 0 ); + connect( m_back_action, SIGNAL( activated() ), reader, SLOT( goBack() ) ); + m_back_action->addTo( navigation ); + +- m_home_action = new QAction( tr( "Home" ), geticon( "home" ), QString::null, 0, this, 0 ); ++ m_home_action = new Q3Action( tr( "Home" ), geticon( "home" ), QString::null, 0, this, 0 ); + connect( m_home_action, SIGNAL( activated() ), reader, SLOT( goHome() ) ); + m_home_action->addTo( navigation ); + +- m_forward_action = new QAction( tr( "Forward" ), geticon( "forward" ), QString::null, 0, this, 0 ); ++ m_forward_action = new Q3Action( tr( "Forward" ), geticon( "forward" ), QString::null, 0, this, 0 ); + connect( m_forward_action, SIGNAL( activated() ), reader, SLOT( goForward() ) ); + m_forward_action->addTo( navigation ); + + /* +- a = new QAction( tr( "Find" ), QString::null, 0, this, NULL, true ); ++ a = new Q3Action( tr( "Find" ), QString::null, 0, this, NULL, true ); + // connect( a, SIGNAL( activated() ), this, SLOT( pagedn() ) ); + a->addTo( file ); + +- a = new QAction( tr( "Find Again" ), QString::null, 0, this, NULL, true ); ++ a = new Q3Action( tr( "Find Again" ), QString::null, 0, this, NULL, true ); + // connect( a, SIGNAL( activated() ), this, SLOT( pagedn() ) ); + a->addTo( file ); + */ +@@ -715,13 +712,13 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) + + QActionGroup* ag = new QActionGroup(this); + ag->setExclusive(false); +- spacemenu = new QPopupMenu(this); ++ spacemenu = new Q3PopupMenu(this); + file->insertItem( tr( "Scrolling" ), spacemenu ); + +- a = new QAction( tr( "Set Target" ), QString::null, 0, ag, NULL); ++ a = new Q3Action( tr( "Set Target" ), QString::null, 0, ag, NULL); + connect( a, SIGNAL( activated() ), this, SLOT( setpipetarget() ) ); + +- a = new QAction( tr( "Pause Paras" ), QString::null, 0, ag, NULL, true ); ++ a = new Q3Action( tr( "Pause Paras" ), QString::null, 0, ag, NULL, true ); + connect( a, SIGNAL( toggled(bool) ), this, SLOT( setpause(bool) ) ); + a->setOn(reader->m_pauseAfterEachPara); + +@@ -731,64 +728,64 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) + #endif + + /* +- a = new QAction( tr( "Import" ), QString::null, 0, this, NULL ); ++ a = new Q3Action( tr( "Import" ), QString::null, 0, this, NULL ); + connect( a, SIGNAL( activated() ), this, SLOT( importFiles() ) ); + a->addTo( file ); + */ + + /* +- a = new QAction( tr( "Paste" ), geticon( "paste" ), QString::null, 0, this, 0 ); ++ a = new Q3Action( tr( "Paste" ), geticon( "paste" ), QString::null, 0, this, 0 ); + connect( a, SIGNAL( activated() ), this, SLOT( editPaste() ) ); + a->addTo( fileBar ); + a->addTo( edit ); + */ + +-// a = new QAction( tr( "Find..." ), geticon( "find" ), QString::null, 0, this, 0 ); ++// a = new Q3Action( tr( "Find..." ), geticon( "find" ), QString::null, 0, this, 0 ); + + m_fullscreen = false; +- m_actFullscreen = new QAction( tr( "Fullscreen" ), geticon( "fullscreen" ), QString::null, 0, this, NULL, true ); ++ m_actFullscreen = new Q3Action( tr( "Fullscreen" ), geticon( "fullscreen" ), QString::null, 0, this, NULL, true ); + connect( m_actFullscreen, SIGNAL( toggled(bool) ), this, SLOT( setfullscreen(bool) ) ); + m_actFullscreen->setOn(m_fullscreen); + m_actFullscreen->addTo( view ); + +- m_rotate_action = new QAction( tr( "Rotate" ), geticon( "repeat" ), QString::null, 0, this, NULL, true ); ++ m_rotate_action = new Q3Action( tr( "Rotate" ), geticon( "repeat" ), QString::null, 0, this, NULL, true ); + connect( m_rotate_action, SIGNAL( toggled(bool) ), this, SLOT( setrotated(bool) ) ); + m_rotate_action->setOn(reader->m_rotated); + m_rotate_action->addTo( view ); + +- m_inverse_action = new QAction( tr( "Invert" ), getmyicon( "invert" ), QString::null, 0, this, NULL, true ); ++ m_inverse_action = new Q3Action( tr( "Invert" ), getmyicon( "invert" ), QString::null, 0, this, NULL, true ); + connect( m_inverse_action, SIGNAL( toggled(bool) ), this, SLOT( setinverted(bool) ) ); + m_inverse_action->setOn(reader->bInverse); + m_inverse_action->addTo( view ); + + view->insertSeparator(); + +- m_zoomin_action = new QAction( tr( "Zoom In" ), geticon( "zoom" ), QString::null, 0, this); ++ m_zoomin_action = new Q3Action( tr( "Zoom In" ), geticon( "zoom" ), QString::null, 0, this); + connect( m_zoomin_action, SIGNAL( activated() ), this, SLOT( zoomin() ) ); + m_zoomin_action->addTo( view ); + +- m_zoomout_action = new QAction( tr( "Zoom Out" ), geticon( "mag" ), QString::null, 0, this); ++ m_zoomout_action = new Q3Action( tr( "Zoom Out" ), geticon( "mag" ), QString::null, 0, this); + connect( m_zoomout_action, SIGNAL( activated() ), this, SLOT( zoomout() ) ); + m_zoomout_action->addTo( view ); + + view->insertSeparator(); +- m_setfont_action = new QAction( tr( "Set Font" ), getmyicon( "font" ), QString::null, 0, this); ++ m_setfont_action = new Q3Action( tr( "Set Font" ), getmyicon( "font" ), QString::null, 0, this); + connect( m_setfont_action, SIGNAL( activated() ), this, SLOT( setfont() ) ); + m_setfont_action->addTo( view ); + + view->insertSeparator(); +- m_setenc_action = new QAction( tr( "Set Encoding" ), getmyicon( "charset" ), QString::null, 0, this); ++ m_setenc_action = new Q3Action( tr( "Set Encoding" ), getmyicon( "charset" ), QString::null, 0, this); + connect( m_setenc_action, SIGNAL( activated() ), this, SLOT( chooseencoding() ) ); + m_setenc_action->addTo( view ); + +- m_setmono_action = new QAction( tr( "Ideogram" ), getmyicon( "ideogram" ), QString::null, 0, this, NULL, true); ++ m_setmono_action = new Q3Action( tr( "Ideogram" ), getmyicon( "ideogram" ), QString::null, 0, this, NULL, true); + connect( m_setmono_action, SIGNAL( toggled(bool) ), this, SLOT( monospace(bool) ) ); + m_setmono_action->addTo( view ); + m_setmono_action->setOn(reader->m_bMonoSpaced); + + +- // a = new QAction( tr( "Zoom" ), QString::null, 0, this, NULL, true ); +- // a = new QAction( tr( "Zoom" ), geticon( "mag" ), QString::null, 0, this, 0 ); ++ // a = new Q3Action( tr( "Zoom" ), QString::null, 0, this, NULL, true ); ++ // a = new Q3Action( tr( "Zoom" ), geticon( "mag" ), QString::null, 0, this, 0 ); + + + +@@ -796,57 +793,57 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) + // view->insertSeparator(); + + /* +- a = new QAction( tr( "Ideogram/Word" ), QString::null, 0, this, NULL, true ); ++ a = new Q3Action( tr( "Ideogram/Word" ), QString::null, 0, this, NULL, true ); + connect( a, SIGNAL( toggled(bool) ), this, SLOT( monospace(bool) ) ); + a->setOn(reader->m_bMonoSpaced); + a->addTo( view ); + */ + /* +- a = new QAction( tr( "Set Width" ), QString::null, 0, this, NULL); ++ a = new Q3Action( tr( "Set Width" ), QString::null, 0, this, NULL); + connect( a, SIGNA |
