author | zecke <zecke> | 2004-03-14 17:37:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 17:37:48 (UTC) |
commit | d69b11f67e3118f86d068c38c422984d754e13cc (patch) (side-by-side diff) | |
tree | 9733e26ab49003bead06d820d70a14babd0c09f0 | |
parent | 64820b76cc9d1c06a6967cd34114f3b95896aaeb (diff) | |
download | opie-d69b11f67e3118f86d068c38c422984d754e13cc.zip opie-d69b11f67e3118f86d068c38c422984d754e13cc.tar.gz opie-d69b11f67e3118f86d068c38c422984d754e13cc.tar.bz2 |
Updatet the applets
33 files changed, 66 insertions, 70 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index b2cef55..18e368e 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp @@ -21,8 +21,10 @@ #include "batterystatus.h" /* OPIE */ #include <opie2/otaskbarapplet.h> + +#include <qpe/qpeapplication.h> #include <qpe/applnk.h> #include <qpe/config.h> #include <qpe/power.h> @@ -30,8 +32,9 @@ #include <qpainter.h> #include <qtimer.h> +using namespace Opie::Ui; BatteryMeter::BatteryMeter( QWidget *parent ) : QWidget( parent ), charging(false) { ps = new PowerStatus; @@ -174,9 +177,6 @@ int BatteryMeter::position() { return 8; } -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( OTaskbarAppletWrapper<BatteryMeter> ); -} +EXPORT_OPIE_APPLET_v1( BatteryMeter ) diff --git a/core/applets/batteryapplet/batterystatus.cpp b/core/applets/batteryapplet/batterystatus.cpp index ea11495..bd86f77 100644 --- a/core/applets/batteryapplet/batterystatus.cpp +++ b/core/applets/batteryapplet/batterystatus.cpp @@ -12,9 +12,9 @@ #include <qlayout.h> #include <qtextstream.h> #include <qmessagebox.h> -using namespace Opie; +using namespace Opie::Core; BatteryStatus::BatteryStatus( const PowerStatus *p, QWidget *parent ) : QWidget( parent, 0, WDestructiveClose), ps(p), bat2(false) { setCaption( tr("Battery status") ); diff --git a/core/applets/batteryapplet/config.in b/core/applets/batteryapplet/config.in index 3067317..eca07e3 100644 --- a/core/applets/batteryapplet/config.in +++ b/core/applets/batteryapplet/config.in @@ -1,4 +1,4 @@ config BATTERYAPPLET boolean "opie-batteryapplet (Applet to monitor battery status)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 6090b68..ed4bfc7 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp @@ -46,8 +46,9 @@ using namespace Opie; using namespace Opie::Ui; +using namespace Opie::Ui; using namespace Opie::Core; CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ), pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) diff --git a/core/applets/cardmon/config.in b/core/applets/cardmon/config.in index f3d57fd..8626c75 100644 --- a/core/applets/cardmon/config.in +++ b/core/applets/cardmon/config.in @@ -1,4 +1,4 @@ config CARDMON boolean "opie-cardmon (monitor cf/sd/mmc card status, and eject function)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 diff --git a/core/applets/clipboardapplet/clipboard.cpp b/core/applets/clipboardapplet/clipboard.cpp index 4fc8076..57a4088 100644 --- a/core/applets/clipboardapplet/clipboard.cpp +++ b/core/applets/clipboardapplet/clipboard.cpp @@ -33,8 +33,9 @@ //=========================================================================== +using namespace Opie::Ui; ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedWidth ( AppLnk::smallIconSize() ); setFixedHeight ( AppLnk::smallIconSize() ); @@ -182,8 +183,6 @@ void ClipboardApplet::newData ( ) excllock = false; } -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( OTaskbarAppletWrapper<ClipboardApplet> ); -} +EXPORT_OPIE_APPLET_v1( ClipboardApplet ) + diff --git a/core/applets/clipboardapplet/config.in b/core/applets/clipboardapplet/config.in index 1205b26..e58d239 100644 --- a/core/applets/clipboardapplet/config.in +++ b/core/applets/clipboardapplet/config.in @@ -1,4 +1,4 @@ config CLIPBOARDAPPLET boolean "opie-clipboardapplet (copy/cut/paste applet)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/applets/clockapplet/clock.cpp b/core/applets/clockapplet/clock.cpp index 120a019..3b13d74 100644 --- a/core/applets/clockapplet/clock.cpp +++ b/core/applets/clockapplet/clock.cpp @@ -24,8 +24,9 @@ #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> +using namespace Opie::Ui; LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) { // If you want a sunken border around the clock do this: // setFrameStyle( QFrame::Panel | QFrame::Sunken ); @@ -113,9 +114,7 @@ void LauncherClock::slotClockChanged( bool pm ) readConfig(); updateTime(); } -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( OTaskbarAppletWrapper<LauncherClock> ); -} + +EXPORT_OPIE_APPLET_v1( LauncherClock ) diff --git a/core/applets/clockapplet/config.in b/core/applets/clockapplet/config.in index 20bd39d..6c32f79 100644 --- a/core/applets/clockapplet/config.in +++ b/core/applets/clockapplet/config.in @@ -1,4 +1,4 @@ config CLOCKAPPLET boolean "opie-clockapplet (Digital clock applet)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/applets/homeapplet/config.in b/core/applets/homeapplet/config.in index 1828da0..53d7882 100644 --- a/core/applets/homeapplet/config.in +++ b/core/applets/homeapplet/config.in @@ -1,4 +1,4 @@ config HOMEAPPLET boolean "Home" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/applets/irdaapplet/config.in b/core/applets/irdaapplet/config.in index 56ec664..0976e8f 100644 --- a/core/applets/irdaapplet/config.in +++ b/core/applets/irdaapplet/config.in @@ -1,4 +1,4 @@ config IRDAAPPLET boolean "opie-irdaapplet (applet for IR beaming/discovery)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index dde8050..2196d18 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp @@ -36,8 +36,9 @@ #include <sys/ioctl.h> //=========================================================================== +using namespace Opie::Ui; IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { setFixedHeight ( 18 ); @@ -358,8 +359,5 @@ void IrdaApplet::slotMessage( const QCString& str, const QByteArray& ar ) { e << list; } } -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( OTaskbarAppletWrapper<IrdaApplet> ); -} +EXPORT_OPIE_APPLET_v1( IrdaApplet ) diff --git a/core/applets/logoutapplet/config.in b/core/applets/logoutapplet/config.in index 385b02f..0d48c6a 100644 --- a/core/applets/logoutapplet/config.in +++ b/core/applets/logoutapplet/config.in @@ -1,4 +1,4 @@ config LOGOUTAPPLET boolean "Logout" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/applets/multikeyapplet/multikey.cpp b/core/applets/multikeyapplet/multikey.cpp index fc5f093..195ada5 100644 --- a/core/applets/multikeyapplet/multikey.cpp +++ b/core/applets/multikeyapplet/multikey.cpp @@ -16,12 +16,14 @@ /* OPIE */ #include <opie2/otaskbarapplet.h> #include <qpe/qcopenvelope_qws.h> +#include <qpe/qpeapplication.h> /* QT */ #include <qdir.h> +using namespace Opie::Ui; Multikey::Multikey(QWidget *parent) : QLabel(parent), popupMenu(this), current("EN") { QCopChannel* swChannel = new QCopChannel("MultiKey/Switcher", this); connect( swChannel, SIGNAL(received(const QCString&,const QByteArray&)), @@ -136,8 +138,5 @@ int Multikey::position() { return 10; } -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( OTaskbarAppletWrapper<Multikey> ); -} +EXPORT_OPIE_APPLET_v1( Multikey ) diff --git a/core/applets/restartapplet/config.in b/core/applets/restartapplet/config.in index aa2580f..764ae58 100644 --- a/core/applets/restartapplet/config.in +++ b/core/applets/restartapplet/config.in @@ -1,4 +1,4 @@ config RESTARTAPPLET boolean "opie-restartapplet (Restart Opie via taskbar)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/applets/rotateapplet/config.in b/core/applets/rotateapplet/config.in index 1a0d923..d3de89a 100644 --- a/core/applets/rotateapplet/config.in +++ b/core/applets/rotateapplet/config.in @@ -1,4 +1,4 @@ config ROTATEAPPLET boolean "Rotate" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp index 0488c36..f621aa9 100644 --- a/core/applets/rotateapplet/rotate.cpp +++ b/core/applets/rotateapplet/rotate.cpp @@ -30,14 +30,14 @@ #include "rotate.h" /* OPIE */ -#include <opie/odevice.h> +#include <opie2/odevice.h> #include <qpe/config.h> #include <qpe/power.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/resource.h> -using namespace Opie; +using namespace Opie::Core; /* QT */ #include <time.h> diff --git a/core/applets/rotateapplet/rotateapplet.pro b/core/applets/rotateapplet/rotateapplet.pro index f24682c..7a4420f 100644 --- a/core/applets/rotateapplet/rotateapplet.pro +++ b/core/applets/rotateapplet/rotateapplet.pro @@ -5,9 +5,9 @@ SOURCES = rotate.cpp TARGET = rotateapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/screenshotapplet/config.in b/core/applets/screenshotapplet/config.in index cafd470..98f2b61 100644 --- a/core/applets/screenshotapplet/config.in +++ b/core/applets/screenshotapplet/config.in @@ -1,4 +1,4 @@ config SCREENSHOTAPPLET boolean "opie-screenshotapplet (create images from your current display)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/applets/screenshotapplet/inputDialog.cpp b/core/applets/screenshotapplet/inputDialog.cpp index 73ec773..ce03ec0 100644 --- a/core/applets/screenshotapplet/inputDialog.cpp +++ b/core/applets/screenshotapplet/inputDialog.cpp @@ -14,8 +14,9 @@ #include <qlineedit.h> #include <qpushbutton.h> +using namespace Opie::Ui; InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) @@ -57,8 +58,8 @@ void InputDialog::browse() { types.insert("All Media Files", all ); types.insert("Audio", audio ); types.insert("Video", video ); - QString str = Opie::OFileDialog::getOpenFileName( 1,"/","", types, 0 ); + QString str = Opie::Ui::OFileDialog::getOpenFileName( 1,"/","", types, 0 ); LineEdit1->setText(str); } diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp index 20e1c9b..9aa012a 100644 --- a/core/applets/screenshotapplet/screenshot.cpp +++ b/core/applets/screenshotapplet/screenshot.cpp @@ -38,8 +38,9 @@ #include <netdb.h> #include <unistd.h> /* XPM */ +using namespace Opie::Ui; static char * snapshot_xpm[] = { "32 32 177 2", " c None", ". c #042045", @@ -535,9 +536,7 @@ void ScreenshotApplet::paintEvent( QPaintEvent* ) QPainter p ( this ); p.drawPixmap( 0,0, m_icon ); } -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( OTaskbarAppletWrapper<ScreenshotApplet> ); -} + +EXPORT_OPIE_APPLET_v1( ScreenshotApplet ) diff --git a/core/applets/suspendapplet/config.in b/core/applets/suspendapplet/config.in index fdbe8b3..d75f581 100644 --- a/core/applets/suspendapplet/config.in +++ b/core/applets/suspendapplet/config.in @@ -1,4 +1,4 @@ config SUSPENDAPPLET boolean "Suspend" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/applets/vmemo/config.in b/core/applets/vmemo/config.in index d13492d..356ab16 100644 --- a/core/applets/vmemo/config.in +++ b/core/applets/vmemo/config.in @@ -1,4 +1,4 @@ config VMEMO boolean "opie-vmemo (take voice memos)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 27f6015..7dd5b4b 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -192,8 +192,9 @@ static char * vmemo_xpm[] = { " *.B =. ", " n n n n n n n n n "}; +using namespace Opie::Ui; VMemo::VMemo( QWidget *parent, const char *_name ) : QWidget( parent, _name ) { setFixedHeight( 18 ); setFixedWidth( 14 ); @@ -637,9 +638,7 @@ void VMemo::timerBreak() { stopRecording(); QMessageBox::message("Vmemo","Vmemo recording has ended"); } -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( OTaskbarAppletWrapper<VMemo> ); -} + +EXPORT_OPIE_APPLET_v1( VMemo ) diff --git a/core/applets/volumeapplet/config.in b/core/applets/volumeapplet/config.in index 1233d9f..f097591 100644 --- a/core/applets/volumeapplet/config.in +++ b/core/applets/volumeapplet/config.in @@ -1,4 +1,4 @@ config VOLUMEAPPLET boolean "opie-volumeapplet (set volume for microphone and speaker)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp index 942cebb..276f47f 100644 --- a/core/applets/volumeapplet/volume.cpp +++ b/core/applets/volumeapplet/volume.cpp @@ -38,16 +38,17 @@ #include <qtimer.h> #include <stdio.h> -using namespace Opie; +using namespace Opie::Core; #define RATE_TIMER_INTERVAL 100 // Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time // results in "hanging" buttons on the iPAQ due to quite high CPU consumption. /* XPM */ +using namespace Opie::Ui; static const char * vol_xpm[] = { "20 20 3 1", " c None", ". c #0000FF", @@ -776,8 +777,5 @@ void VolumeApplet::paintEvent ( QPaintEvent * ) } } -Q_EXPORT_INTERFACE() -{ - Q_CREATE_INSTANCE( OTaskbarAppletWrapper<VolumeApplet> ); -} +EXPORT_OPIE_APPLET_v1( VolumeApplet ) diff --git a/core/applets/volumeapplet/volumeapplet.pro b/core/applets/volumeapplet/volumeapplet.pro index b14956e..b478ed1 100644 --- a/core/applets/volumeapplet/volumeapplet.pro +++ b/core/applets/volumeapplet/volumeapplet.pro @@ -5,9 +5,9 @@ SOURCES = volume.cpp oledbox.cpp TARGET = volumeapplet DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include -LIBS += -lqpe +LIBS += -lqpe -lopiecore2 VERSION = 1.0.0 include ( $(OPIEDIR)/include.pro ) target.path = $$prefix/plugins/applets diff --git a/core/applets/vtapplet/config.in b/core/applets/vtapplet/config.in index 85692a5..8fe4200 100644 --- a/core/applets/vtapplet/config.in +++ b/core/applets/vtapplet/config.in @@ -1,4 +1,4 @@ config VTAPPLET boolean "VT (switch to another virtual terminal)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/core/obex/config.in b/core/obex/config.in index ef09f7a..c0208d1 100644 --- a/core/obex/config.in +++ b/core/obex/config.in @@ -1,4 +1,4 @@ config OBEX boolean "libopieobex0 (library needed for beaming in Opie)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 diff --git a/core/obex/obex.cc b/core/obex/obex.cc index 50e5201..3c99af6 100644 --- a/core/obex/obex.cc +++ b/core/obex/obex.cc @@ -1,13 +1,14 @@ #include <qfileinfo.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> #include "obex.h" using namespace OpieObex; +using namespace Opie::Core; /* TRANSLATOR OpieObex::Obex */ Obex::Obex( QObject *parent, const char* name ) : QObject(parent, name ) @@ -31,13 +32,13 @@ void Obex::receive() { qWarning("Receive" ); m_rec = new OProcess(); *m_rec << "irobex_palm3"; // connect to the necessary slots - connect(m_rec, SIGNAL(processExited(OProcess*) ), - this, SLOT(slotExited(OProcess*) ) ); + connect(m_rec, SIGNAL(processExited(Opie::Core::OProcess*) ), + this, SLOT(slotExited(Opie::Core::OProcess*) ) ); - connect(m_rec, SIGNAL(receivedStdout(OProcess*, char*, int ) ), - this, SLOT(slotStdOut(OProcess*, char*, int) ) ); + connect(m_rec, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), + this, SLOT(slotStdOut(Opie::Core::OProcess*, char*, int) ) ); if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning("could not start :("); emit done( false ); @@ -79,12 +80,12 @@ void Obex::sendNow(){ *m_send << "irobex_palm3"; *m_send << QFile::encodeName(m_file); // connect to slots Exited and and StdOut - connect(m_send, SIGNAL(processExited(OProcess*) ), - this, SLOT(slotExited(OProcess*)) ); - connect(m_send, SIGNAL(receivedStdout(OProcess*, char*, int )), - this, SLOT(slotStdOut(OProcess*, char*, int) ) ); + connect(m_send, SIGNAL(processExited(Opie::Core::OProcess*) ), + this, SLOT(slotExited(Opie::Core::OProcess*)) ); + connect(m_send, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int )), + this, SLOT(slotStdOut(Opie::Core::OProcess*, char*, int) ) ); // now start it if (!m_send->start(/*OProcess::NotifyOnExit, OProcess::AllOutput*/ ) ) { qWarning("could not send" ); diff --git a/core/obex/obex.h b/core/obex/obex.h index 60f5d28..284cb12 100644 --- a/core/obex/obex.h +++ b/core/obex/obex.h @@ -4,9 +4,9 @@ #define OpieObex_H #include <qobject.h> -class OProcess; +namespace Opie {namespace Core {class OProcess;}} class QCopChannel; namespace OpieObex { class Obex : public QObject { Q_OBJECT @@ -52,10 +52,10 @@ namespace OpieObex { private: uint m_count; QString m_file; QString m_outp; - OProcess *m_send; - OProcess *m_rec; + Opie::Core::OProcess *m_send; + Opie::Core::OProcess *m_rec; bool m_receive : 1; void shutDownReceive(); private slots: @@ -66,10 +66,10 @@ private slots: //void send(const QString&); // the process exited - void slotExited(OProcess* proc) ; - void slotStdOut(OProcess*, char*, int); + void slotExited(Opie::Core::OProcess* proc) ; + void slotStdOut(Opie::Core::OProcess*, char*, int); void slotError(); private: void sendNow(); diff --git a/core/obex/obex.pro b/core/obex/obex.pro index a296b2c..51fa300 100644 --- a/core/obex/obex.pro +++ b/core/obex/obex.pro @@ -1,8 +1,8 @@ TEMPLATE = lib CONFIG += qt warn_on release -HEADERS = obex.h obexhandler.h obexsend.h receiver.h -SOURCES = obex.cc obexsend.cpp obexhandler.cpp receiver.cpp +HEADERS = obex.h obexhandler.h obexsend.h receiver.h obeximpl.h +SOURCES = obex.cc obexsend.cpp obexhandler.cpp receiver.cpp obeximpl.cpp TARGET = opieobex DESTDIR = $(OPIEDIR)/plugins/obex INCLUDEPATH += $(OPIEDIR)/include $(OPIEDIR)/core/launcher DEPENDPATH += ../$(OPIEDIR)/include diff --git a/core/obex/obeximpl.cpp b/core/obex/obeximpl.cpp index 5b53644..ca6ce7b 100644 --- a/core/obex/obeximpl.cpp +++ b/core/obex/obeximpl.cpp @@ -1,7 +1,9 @@ #include "obexhandler.h" #include "obeximpl.h" + + using namespace OpieObex; /* TRANSLATOR OpieObex::ObexImpl */ |