author | drw <drw> | 2005-05-17 22:48:25 (UTC) |
---|---|---|
committer | drw <drw> | 2005-05-17 22:48:25 (UTC) |
commit | 0892a9d473bfeacc921d586266e6889153654737 (patch) (side-by-side diff) | |
tree | d3ea1c3b08ac642b999db357a3ccbff691ce8bce | |
parent | 58c3aa9b498e43665511fbe8f32995e0a4cb29d6 (diff) | |
download | opie-0892a9d473bfeacc921d586266e6889153654737.zip opie-0892a9d473bfeacc921d586266e6889153654737.tar.gz opie-0892a9d473bfeacc921d586266e6889153654737.tar.bz2 |
Resource -> OResource
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/opie-reader/opie-reader.control | 2 | ||||
-rw-r--r-- | noncore/apps/opie-reader/opie-reader.pro | 1 |
3 files changed, 6 insertions, 5 deletions
diff --git a/noncore/apps/opie-reader/QTReaderApp.cpp b/noncore/apps/opie-reader/QTReaderApp.cpp index 8ef0674..b985094 100644 --- a/noncore/apps/opie-reader/QTReaderApp.cpp +++ b/noncore/apps/opie-reader/QTReaderApp.cpp @@ -24,147 +24,147 @@ #ifdef USEQPE #include <qpe/qpemenubar.h> #include <qpe/qpetoolbar.h> #endif #include <qmenubar.h> #include <qtoolbar.h> #ifdef USEQPE #include <qpe/menubutton.h> #endif #include <qcombobox.h> #include <qpopupmenu.h> #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> #include <qpe/applnk.h> #endif #include <qfileinfo.h> #include <stdlib.h> //getenv #include <qprogressbar.h> #ifdef USEQPE #include <qpe/config.h> #endif #include <qbuttongroup.h> #include <qradiobutton.h> #ifdef USEQPE #include <qpe/qcopenvelope_qws.h> #endif #include "QTReader.h" #include "GraphicWin.h" #include "Bkmks.h" #include "cbkmkselector.h" #include "infowin.h" #include "ToolbarPrefs.h" #include "Prefs.h" #include "CAnnoEdit.h" #include "QFloatBar.h" #include "FixedFont.h" #include "URLDialog.h" #include "util.h" #include <qfontdatabase.h> #ifdef USEQPE -#include <qpe/resource.h> +#include <opie2/oresource.h> #ifdef OPIE #if defined(OPIEFILEDIALOG) #include <qpe/applnk.h> #include <opie2/ofiledialog.h> using namespace Opie::Ui; #else #include "fileBrowser.h" #endif #else #include "fileBrowser.h" #endif #else #include "qfiledialog.h" #endif #include "QTReaderApp.h" #include "CDrawBuffer.h" #include "Filedata.h" #include "names.h" #include "CEncoding_tables.h" #include "CloseDialog.h" #include "ButtonPrefs.h" bool CheckVersion(int&, int&, char&, QWidget*); #ifdef _WINDOWS #define PICDIR "c:\\uqtreader\\pics\\" #else #ifdef USEQPE #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() #endif #endif unsigned long QTReaderApp::m_uid = 0; void QTReaderApp::setScrollState(bool _b) { m_scrollButton->setOn(_b); } #ifdef USEQPE -#define geticon(iconname) Resource::loadPixmap( iconname ) -#define getmyicon(iconname) Resource::loadPixmap( PICDIR iconname ) +#define geticon(iconname) Opie::Core::OResource::loadPixmap( iconname, Opie::Core::OResource::SmallIcon ) +#define getmyicon(iconname) Opie::Core::OResource::loadPixmap( PICDIR iconname, Opie::Core::OResource::SmallIcon ) #else //#define geticon(iconname) QPixmap(PICDIR iconname ".png") #define geticon(iconname) QPixmap(PICDIR +"/"+iconname+".png") #define getmyicon(iconname) geticon(iconname) //#define geticon(iconname) QIconSet( QPixmap(PICDIR iconname) ) #endif #ifndef _WINDOWS #include <unistd.h> #endif #include <stddef.h> #ifndef _WINDOWS #include <dirent.h> #endif void QTReaderApp::listBkmkFiles() { bkmkselector->clear(); bkmkselector->setText("Cancel"); #ifndef USEQPE int cnt = 0; QDir d = QDir::home(); // "/" if ( !d.cd(APPDIR) ) { // "/tmp" qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); d = QDir::home(); d.mkdir(APPDIR); d.cd(APPDIR); } 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 } #else /* USEQPE */ @@ -258,97 +258,97 @@ QTReaderApp::QTReaderApp( QWidget *parent, const char *name, WFlags f ) int data; fread(&key, sizeof(key), 1, f); fread(&data, sizeof(data), 1, f); kmap[key] = data; } } fclose(f); } } m_url_clipboard = false; m_url_localfile = false; m_url_globalfile = false; ftime(&m_lastkeytime); //// qDebug("Application directory = %s", (const tchar *)QPEApplication::documentDir()); //// qDebug("Application directory = %s", (const tchar *)Global::applicationFileName("uqtreader","bkmks.xml")); m_bcloseDisabled = true; m_disableesckey = false; pBkmklist = NULL; pOpenlist = NULL; // doc = 0; m_fBkmksChanged = false; QString lang = getenv( "LANG" ); QString rot = getenv( "QWS_DISPLAY" ); /* int m_rot = 0; if (rot.contains("Rot90")) { m_rot = 90; } else if (rot.contains("Rot180")) { m_rot = 180; } else if (rot.contains("Rot270")) { m_rot = 270; } // qDebug("Initial Rotation(%d):%s", m_rot, (const char*)rot); */ m_autogenstr = "^ *[A-Z].*[a-z] *$"; #ifdef USEQPE - setIcon( Resource::loadPixmap( PICDIR "uqtreader") ); + setIcon( Opie::Core::OResource::loadPixmap( PICDIR "uqtreader", Opie::Core::OResource::SmallIcon ) ); #else setIcon( QPixmap (PICDIR + "/uqtreader.png") ); #endif /* USEQPE */ // QPEToolBar *bar = new QPEToolBar( this ); // menubar = new QPEToolBar( this ); #ifdef USEQPE Config config( APPDIR ); #else QDir d = QDir::home(); // "/" if ( !d.cd(APPDIR) ) { // "/tmp" qWarning( "Cannot find the \"~/" APPDIR "\" directory" ); d = QDir::home(); d.mkdir(APPDIR); d.cd(APPDIR); } QFileInfo fi(d, INIFILE); // qDebug("Path:%s", (const char*)fi.absFilePath()); Config config(fi.absFilePath()); #endif config.setGroup("Toolbar"); m_tbmovesave = m_tbmove = config.readBoolEntry("Movable", false); m_tbpolsave = m_tbpol = (ToolbarPolicy)config.readNumEntry("Policy", 1); m_tbposition = (ToolBarDock)config.readNumEntry("Position", 2); m_qtscroll = config.readNumEntry("QTScrollBar", false); m_localscroll = config.readNumEntry("LocalScrollBar", false); // fileBar = new QToolBar("File", this); // QToolBar* viewBar = new QToolBar("File", this); // QToolBar* navBar = new QToolBar("File", this); // QToolBar* markBar = new QToolBar("File", this); #if defined(USEQPE) menubar = new QToolBar("Menus", this, m_tbposition); mb = new QPEMenuBar( menubar ); #else mb = new QMenuBar( this ); #endif #if defined(USEQPE) QPopupMenu* tmp = new QPopupMenu(mb); mb->insertItem( geticon( "AppsIcon" ), tmp ); #else QMenuBar* tmp = mb; #endif QPopupMenu *file = new QPopupMenu( mb ); tmp->insertItem( tr( "File" ), file ); diff --git a/noncore/apps/opie-reader/opie-reader.control b/noncore/apps/opie-reader/opie-reader.control index 60976b2..d53f70d 100644 --- a/noncore/apps/opie-reader/opie-reader.control +++ b/noncore/apps/opie-reader/opie-reader.control @@ -1,10 +1,10 @@ Package: opie-reader Files: bin/reader lib/libreader* plugins/reader/* apps/Applications/opie-reader.desktop pics/opie-reader/* Priority: optional Section: opie/applications Maintainer: Tim Wentford <timwentford@hotmail.com> Architecture: arm -Depends: task-opie-minimal +Depends: task-opie-minimal, libopiecore2 License: GPL Description: E-Book reader Version: $QPE_VERSION$EXTRAVERSION diff --git a/noncore/apps/opie-reader/opie-reader.pro b/noncore/apps/opie-reader/opie-reader.pro index 47980e1..da39154 100644 --- a/noncore/apps/opie-reader/opie-reader.pro +++ b/noncore/apps/opie-reader/opie-reader.pro @@ -1,24 +1,25 @@ TEMPLATE = subdirs SUBDIRS = pluckerbaselib \ codeclib \ pdblib \ PluckerCodec \ AportisCodec \ CHM \ HTMLFilter \ WeaselCodec \ iSiloCodec \ ppmsCodec \ FliteCmd \ pluckerdecompress \ ArriereCodec \ RebCodec \ reader +LIBS += -lopiecore2 # these are added only built if enabled in "make menuconfig" # FliteDyn # FliteDyn16 include( $(OPIEDIR)/include.pro ) |