author | tille <tille> | 2003-08-25 12:56:53 (UTC) |
---|---|---|
committer | tille <tille> | 2003-08-25 12:56:53 (UTC) |
commit | c817abf3b81ca47927433ede1efd9afddfc15a72 (patch) (side-by-side diff) | |
tree | 3e5727ad9bd9b54475f04d2be33bb8db6e26636f | |
parent | ff72e85696d070efa03975ea8130807579a6e1d9 (diff) | |
download | opie-c817abf3b81ca47927433ede1efd9afddfc15a72.zip opie-c817abf3b81ca47927433ede1efd9afddfc15a72.tar.gz opie-c817abf3b81ca47927433ede1efd9afddfc15a72.tar.bz2 |
libopie2 compiles for qt3/x11 now
run:
qmake "platform=x11" libopie2.pro
-rw-r--r-- | libopie2/README | 19 | ||||
-rw-r--r-- | libopie2/libopie2.pro | 9 | ||||
-rw-r--r-- | libopie2/opiecore/oapplication.cpp | 12 | ||||
-rw-r--r-- | libopie2/opiecore/oapplication.h | 10 | ||||
-rw-r--r-- | libopie2/opiecore/opiecore.pro | 11 | ||||
-rw-r--r-- | libopie2/opiedb/opiedb.pro | 8 | ||||
-rw-r--r-- | libopie2/opiedb/osqlmanager.h | 2 | ||||
-rw-r--r-- | libopie2/opiemm/opiemm.pro | 8 | ||||
-rw-r--r-- | libopie2/opiemm/osoundsystem.cpp | 1 | ||||
-rw-r--r-- | libopie2/opienet/opienet.pro | 8 | ||||
-rw-r--r-- | libopie2/opiepim/opiepim.pro | 9 | ||||
-rw-r--r-- | libopie2/opieui/opieui.pro | 20 | ||||
-rw-r--r-- | libopie2/opieui/oversatileview.h | 2 |
13 files changed, 105 insertions, 14 deletions
diff --git a/libopie2/README b/libopie2/README index 57172a7..daf6b27 100644 --- a/libopie2/README +++ b/libopie2/README @@ -1,37 +1,56 @@ /******************************************************************** /* This is an overview of the opielibs2 project /********************************************************************/ Origin: opielibs is about creating classes to * optimize Qt classes for the embedded environment * provide sophisticated abstractions for developers * provide complete documentation and working examples * provide end users with a common look and feel * reduce memory footprint through sharing code * reduce possible bugs through reusing tested code -------------------------------------------------------- +0. Building +-------------------------------------------------------- + +* for QPE run: + qmake libopie2.pro + make + +OR (even better) + cd $OPIEDIR + make menuconfig + make -k + +* for QT/X11 run: + qmake "platform=x11" libopie2.pro + make + +Make sure you have set $PLATFORM=x86-linux + +-------------------------------------------------------- 1. General Overview -------------------------------------------------------- libopie is functionally seperated into the following libraries: - libopiecore - libopieui - libopiepim - libopiedb - libopienet - libopiemm 1.1 Contents of libopiecore [ opiecore ] -------------------------------------------------------- - odbgstream - ondbgstream - oprocctrl - oprocess - odevice - odevicebutton - oconfig - oconfiggroupsaver diff --git a/libopie2/libopie2.pro b/libopie2/libopie2.pro index 0bd1d06..e734654 100644 --- a/libopie2/libopie2.pro +++ b/libopie2/libopie2.pro @@ -1,4 +1,11 @@ TEMPLATE = subdirs unix:SUBDIRS = opiecore opiedb opiepim opieui opienet opiemm examples -include ( $(OPIEDIR)/include.pro ) +!contains( platform, x11 ) { + message( Configuring libopie2 for build on Opie ) + include ( $(OPIEDIR)/include.pro ) +} + +contains( platform, x11 ) { + message( Configuring libopie2 for build on Qt/X11 ) +} diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp index 06d8ba2..84cab48 100644 --- a/libopie2/opiecore/oapplication.cpp +++ b/libopie2/opiecore/oapplication.cpp @@ -9,72 +9,77 @@ .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <opie2/oapplication.h> #include <opie2/oconfig.h> +#include <opie2/odebug.h> #include <signal.h> #include <stdio.h> OApplication* OApplication::_instance = 0; /**************************************************************************************************/ /* OApplicationPrivate /**************************************************************************************************/ class OApplicationPrivate { public: OApplicationPrivate() {}; ~OApplicationPrivate() {}; }; /**************************************************************************************************/ /* OApplication /**************************************************************************************************/ OApplication::OApplication( int& argc, char** argv, const QCString& rAppName ) +#ifdef QWS :QPEApplication( argc, argv ), +#else + :QApplication( argc, argv ), +#endif _appname( rAppName ), _config( 0 ) { init(); } OApplication::~OApplication() { delete d; if ( _config ) delete _config; OApplication::_instance = 0; // after deconstruction of the one-and-only application object, // the construction of another object is allowed } OConfig* OApplication::config() { if ( !_config ) { _config = new OConfig( _appname ); } @@ -86,40 +91,47 @@ void OApplication::init() { d = new OApplicationPrivate(); if ( !OApplication::_instance ) { OApplication::_instance = this; /* register SIGSEGV handler to give programs an option * to exit gracefully, e.g. save or close devices or files. struct sigaction sa; sa.sa_handler = ( void (*)(int) ) &segv_handler; sa.sa_flags = SA_SIGINFO | SA_RESTART; sigemptyset(&sa.sa_mask); sigaction(SIGSEGV, &sa, NULL); */ } else { qFatal( "OApplication: Can't create more than one OApplication object. Aborting." ); } } void OApplication::showMainWidget( QWidget* widget, bool nomax ) { +#ifdef QWS QPEApplication::showMainWidget( widget, nomax ); +#else +// tille: I am quit sure if this is the right way to do.. + odDebug(nomax,7) << "ignoring nomax"; + setMainWidget( widget ); + widget->show(); +#endif widget->setCaption( _appname ); } void OApplication::setTitle( const QString& title ) const { if ( mainWidget() ) { if ( !title.isNull() ) mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); else mainWidget()->setCaption( _appname ); } } diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h index 6bc2b1c..3043910 100644 --- a/libopie2/opiecore/oapplication.h +++ b/libopie2/opiecore/oapplication.h @@ -12,54 +12,62 @@ - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OAPPLICATION_H #define OAPPLICATION_H #define oApp OApplication::oApplication() +#ifdef QWS #include <qpe/qpeapplication.h> +#else +#include <qapplication.h> +#endif class OApplicationPrivate; class OConfig; -class OApplication: public QPEApplication +#ifdef QWS +class OApplication : public QPEApplication +#else +class OApplication : public QApplication +#endif { Q_OBJECT public: /** * Constructor. Parses command-line arguments and sets the window caption. * * @param rAppName application name. Will be used for finding the * associated message, icon and configuration files * */ OApplication( int& argc, char** argv, const QCString& rAppName ); /** * Destructor. Destroys the application object and its children. */ virtual ~OApplication(); /** * @returns the process-wide application object * * This is similar to the global @ref QApplication pointer qApp. It * allows access to the single global OApplication object, since * more than one cannot be created in the same application. It * saves you the trouble of having to pass the pointer explicitly * to every function that may require it. diff --git a/libopie2/opiecore/opiecore.pro b/libopie2/opiecore/opiecore.pro index ed7d6d7..c8a291a 100644 --- a/libopie2/opiecore/opiecore.pro +++ b/libopie2/opiecore/opiecore.pro @@ -2,30 +2,37 @@ TEMPLATE = lib CONFIG += qt warn_on debug DESTDIR = $(OPIEDIR)/lib HEADERS = oapplication.h \ oconfig.h \ ocompletionbase.h \ ocompletion.h \ odebug.h \ oglobal.h \ oglobalsettings.h \ osortablevaluelist.h SOURCES = oapplication.cpp \ oconfig.cpp \ ocompletionbase.cpp \ ocompletion.cpp \ odebug.cpp \ oglobal.cpp \ oglobalsettings.cpp INTERFACES = TARGET = opiecore2 VERSION = 1.8.1 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS = -lqpe MOC_DIR = moc OBJECTS_DIR = obj -include ( $(OPIEDIR)/include.pro ) + +!contains( platform, x11 ) { + LIBS = -lqpe + include ( $(OPIEDIR)/include.pro ) +} + +contains( platform, x11 ) { + LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib +} diff --git a/libopie2/opiedb/opiedb.pro b/libopie2/opiedb/opiedb.pro index 401646a..3612f0e 100644 --- a/libopie2/opiedb/opiedb.pro +++ b/libopie2/opiedb/opiedb.pro @@ -7,26 +7,32 @@ HEADERS = osqlbackend.h \ osqlmanager.h \ osqlquery.h \ osqlresult.h \ osqltable.h \ osqlbackendmanager.h \ osqlitedriver.h SOURCES = osqlbackend.cpp \ osqldriver.cpp \ osqlerror.cpp \ osqlmanager.cpp \ osqlquery.cpp \ osqlresult.cpp \ osqltable.cpp \ osqlbackendmanager.cpp \ osqlitedriver.cpp INTERFACES = TARGET = opiedb2 VERSION = 1.8.1 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include MOC_DIR = moc OBJECTS_DIR = obj -include ( $(OPIEDIR)/include.pro ) +!contains( platform, x11 ) { + include ( $(OPIEDIR)/include.pro ) +} + +contains( platform, x11 ) { + LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib +} diff --git a/libopie2/opiedb/osqlmanager.h b/libopie2/opiedb/osqlmanager.h index b3d8d69..5323b14 100644 --- a/libopie2/opiedb/osqlmanager.h +++ b/libopie2/opiedb/osqlmanager.h @@ -1,32 +1,34 @@ #ifndef OSQL_MANAGER_H #define OSQL_MANAGER_H #include <qobject.h> +#include <qstringlist.h> #include "osqlbackend.h" + /** * OSQLManager is responsible for loading * and unloading, querying different OSQL * services * Load a OSQLDriver and delete it yourself * */ class OSQLDriver; class OSQLManager : public QObject { Q_OBJECT public: /** * Empty c'tor */ OSQLManager(); /** * Query the Manager for different backends */ OSQLBackEnd::ValueList queryBackEnd(); /** * Load a backend with it's name from param name */ diff --git a/libopie2/opiemm/opiemm.pro b/libopie2/opiemm/opiemm.pro index 8e5eeb4..d3ce8f7 100644 --- a/libopie2/opiemm/opiemm.pro +++ b/libopie2/opiemm/opiemm.pro @@ -1,16 +1,22 @@ TEMPLATE = lib CONFIG += qt warn_on debug DESTDIR = $(OPIEDIR)/lib HEADERS = osoundsystem.h SOURCES = osoundsystem.cpp INTERFACES = TARGET = opiemm2 VERSION = 1.8.1 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += MOC_DIR = moc OBJECTS_DIR = obj -include ( $(OPIEDIR)/include.pro ) +!contains( platform, x11 ) { + include ( $(OPIEDIR)/include.pro ) +} + +contains( platform, x11 ) { + LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib +} diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp index fd23bea..d857659 100644 --- a/libopie2/opiemm/osoundsystem.cpp +++ b/libopie2/opiemm/osoundsystem.cpp @@ -18,48 +18,49 @@ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <opie2/osoundsystem.h> #include <errno.h> #include <fcntl.h> #include <string.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/soundcard.h> #include <sys/stat.h> +#include <qstringlist.h> /*====================================================================================== * OSoundSystem *======================================================================================*/ OSoundSystem* OSoundSystem::_instance = 0; OSoundSystem::OSoundSystem() { qDebug( "OSoundSystem::OSoundSystem()" ); synchronize(); } void OSoundSystem::synchronize() { // gather available interfaces by inspecting /dev //FIXME: we could use SIOCGIFCONF here, but we aren't interested in virtual (e.g. eth0:0) devices //FIXME: Use SIOCGIFCONF anway, because we can disable listing of aliased devices _interfaces.clear(); _interfaces.insert( "soundcard", new OSoundCard( this, "soundcard" ) ); /* diff --git a/libopie2/opienet/opienet.pro b/libopie2/opienet/opienet.pro index 3f9166a..93389db 100644 --- a/libopie2/opienet/opienet.pro +++ b/libopie2/opienet/opienet.pro @@ -1,22 +1,28 @@ TEMPLATE = lib CONFIG += qt warn_on debug DESTDIR = $(OPIEDIR)/lib HEADERS = omanufacturerdb.cpp \ onetutils.cpp \ onetwork.h \ opcap.h SOURCES = omanufacturerdb.cpp \ onetutils.cpp \ onetwork.cpp \ opcap.cpp INTERFACES = TARGET = opienet2 VERSION = 1.8.1 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lpcap MOC_DIR = moc OBJECTS_DIR = obj -include ( $(OPIEDIR)/include.pro ) +!contains( platform, x11 ) { + include ( $(OPIEDIR)/include.pro ) +} + +contains( platform, x11 ) { + LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib +} diff --git a/libopie2/opiepim/opiepim.pro b/libopie2/opiepim/opiepim.pro index 7fc7bb7..cc6ee90 100644 --- a/libopie2/opiepim/opiepim.pro +++ b/libopie2/opiepim/opiepim.pro @@ -1,17 +1,24 @@ TEMPLATE = lib CONFIG += qt warn_on debug DESTDIR = $(OPIEDIR)/lib HEADERS = SOURCES = INTERFACES = TARGET = opiepim2 VERSION = 1.8.1 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include MOC_DIR = moc OBJECTS_DIR = obj -include ( $(OPIEDIR)/include.pro ) + +!contains( platform, x11 ) { + include ( $(OPIEDIR)/include.pro ) +} + +contains( platform, x11 ) { + LIBS = -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib +} diff --git a/libopie2/opieui/opieui.pro b/libopie2/opieui/opieui.pro index aa85955..1b6ecdf 100644 --- a/libopie2/opieui/opieui.pro +++ b/libopie2/opieui/opieui.pro @@ -1,48 +1,58 @@ TEMPLATE = lib CONFIG += qt warn_on debug DESTDIR = $(OPIEDIR)/lib HEADERS = ocompletionbox.h \ ocombobox.h \ oeditlistbox.h \ olineedit.h \ olistview.h \ oimageeffect.h \ opixmapeffect.h \ opopupmenu.h \ opixmapprovider.h \ oselector.h \ oversatileview.h \ oversatileviewitem.h \ #ojanuswidget.h \ odialog.h \ - oseparator.h \ - otaskbarapplet.h + oseparator.h +# otaskbarapplet.h SOURCES = ocompletionbox.cpp \ ocombobox.cpp \ oeditlistbox.cpp \ olineedit.cpp \ olistview.cpp \ oimageeffect.cpp \ opixmapeffect.cpp \ opopupmenu.cpp \ opixmapprovider.cpp \ oselector.cpp \ oversatileview.cpp \ oversatileviewitem.cpp \ #ojanuswidget.cpp \ odialog.cpp \ - oseparator.cpp \ - otaskbarapplet.cpp + oseparator.cpp #\ +# otaskbarapplet.cpp INTERFACES = TARGET = opieui2 VERSION = 1.8.1 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lopiecore2 MOC_DIR = moc OBJECTS_DIR = obj -include ( $(OPIEDIR)/include.pro ) + +!contains( platform, x11 ) { + include ( $(OPIEDIR)/include.pro ) + HEADERS += otaskbarapplet.h + SOURCES += otaskbarapplet.cpp +} + +contains( platform, x11 ) { + LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib + message( Warning: NO otaskbarapplet ATM ) +} diff --git a/libopie2/opieui/oversatileview.h b/libopie2/opieui/oversatileview.h index 1df8154..8af21dc 100644 --- a/libopie2/opieui/oversatileview.h +++ b/libopie2/opieui/oversatileview.h @@ -17,49 +17,49 @@ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OVERSATILEVIEW_H #define OVERSATILEVIEW_H /* QT */ #include <qwidgetstack.h> #include <qiconview.h> /* OPIE */ -#include <qpe/qpeapplication.h> +#include <opie2/oapplication.h> /* FORWARDS */ class QHeader; class QIconSet; class QIconViewItem; class OListView; class QListViewItem; class QPopupMenu; class QString; #ifndef QT_NO_DRAGANDDROP class QIconDragItem; #endif class OVersatileView : public QWidgetStack { Q_OBJECT friend class OVersatileViewItem; //==============================================================================================// // OVersatileView High Level API //==============================================================================================// |