28 files changed, 1 insertions, 110 deletions
diff --git a/core/applets/batteryapplet/battery.cpp b/core/applets/batteryapplet/battery.cpp index fed9b34..b2cef55 100644 --- a/core/applets/batteryapplet/battery.cpp +++ b/core/applets/batteryapplet/battery.cpp @@ -4,49 +4,48 @@ ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "battery.h" #include "batterystatus.h" /* OPIE */ #include <opie2/otaskbarapplet.h> #include <qpe/applnk.h> #include <qpe/config.h> #include <qpe/power.h> -#include <qpe/qpeapplication.h> /* QT */ #include <qpainter.h> #include <qtimer.h> BatteryMeter::BatteryMeter( QWidget *parent ) : QWidget( parent ), charging(false) { ps = new PowerStatus; startTimer( 10000 ); setFixedWidth( QMAX(AppLnk::smallIconSize()*3/4, 6) ); setFixedHeight( AppLnk::smallIconSize() ); chargeTimer = new QTimer( this ); connect( chargeTimer, SIGNAL(timeout()), this, SLOT(chargeTimeout()) ); timerEvent(0); QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold ); Config c( "qpe" ); c.setGroup( "Battery" ); style = c.readNumEntry( "Style", 0 ); } diff --git a/core/applets/batteryapplet/batterystatus.cpp b/core/applets/batteryapplet/batterystatus.cpp index b9ca7b5..ea11495 100644 --- a/core/applets/batteryapplet/batterystatus.cpp +++ b/core/applets/batteryapplet/batterystatus.cpp @@ -1,39 +1,37 @@ #include "batterystatus.h" /* OPIE */ #include <opie2/odevice.h> #include <qpe/power.h> /* QT */ -#include <qpainter.h> #include <qpushbutton.h> #include <qdrawutil.h> #include <qfile.h> #include <qlayout.h> #include <qtextstream.h> -#include <qapplication.h> #include <qmessagebox.h> using namespace Opie; BatteryStatus::BatteryStatus( const PowerStatus *p, QWidget *parent ) : QWidget( parent, 0, WDestructiveClose), ps(p), bat2(false) { setCaption( tr("Battery status") ); setMinimumSize( 150, 200 ); QPushButton *pb = new QPushButton( tr("Close"), this ); QVBoxLayout *layout = new QVBoxLayout ( this ); jackPercent = 0; pb->setMaximumSize( 120, 40 ); pb->show(); layout->addStretch(); layout->addWidget( pb ); if ( ODevice::inst ( )-> series ( ) == Model_iPAQ ) { getProcApmStatusIpaq(); } diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 8ffaada..7625545 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp @@ -4,52 +4,50 @@ * --------------------- * * copyright : (c) 2002 by Maximilian Reiss * email : max.reiss@gmx.de * based on two apps by Devin Butterfield */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "cardmon.h" /* OPIE */ #include <opie2/odevice.h> #include <opie2/otaskbarapplet.h> #include <qpe/applnk.h> #include <qpe/resource.h> /* QT */ -#include <qapplication.h> #include <qcopchannel_qws.h> #include <qpainter.h> -#include <qmessagebox.h> #include <qfile.h> #include <qtextstream.h> #include <qsound.h> #include <qtimer.h> /* STD */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <sys/vfs.h> #include <mntent.h> #endif using namespace Opie; CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ), pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) { QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this ); diff --git a/core/applets/homeapplet/home.cpp b/core/applets/homeapplet/home.cpp index 455575f..8a930be 100644 --- a/core/applets/homeapplet/home.cpp +++ b/core/applets/homeapplet/home.cpp @@ -1,30 +1,28 @@ #include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> #include <qapplication.h> -#include <qiconset.h> -#include <qpopupmenu.h> #include "home.h" HomeApplet::HomeApplet ( ) : QObject ( 0, "HomeApplet" ) { } HomeApplet::~HomeApplet ( ) { } int HomeApplet::position ( ) const { return 4; } QString HomeApplet::name ( ) const { return tr( "Home shortcut" ); } QString HomeApplet::text ( ) const diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index f850424..a47f33d 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp @@ -1,53 +1,48 @@ /********************************************************************** ** Copyright (C) 2002 David Woodhouse <dwmw2@infradead.org> ** Max Reiss <harlekin@handhelds.org> [trivial stuff] ** Robert Griebl <sandman@handhelds.org> ** Holger Freyther <zecke@handhelds.org> QCOP Interface ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ -#include <qcopchannel_qws.h> -#include <qpe/qpeapplication.h> #include <qpe/resource.h> -#include <qpe/ir.h> #include <qpe/qcopenvelope_qws.h> -#include <qpe/sound.h> #include <qpainter.h> #include <qfile.h> #include <qtimer.h> #include <qtextstream.h> -#include <qpopupmenu.h> #include <unistd.h> #include <net/if.h> #include <netinet/in.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #include "irda.h" //=========================================================================== IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { setFixedHeight ( 18 ); setFixedWidth ( 14 ); m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ); m_irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" ); m_irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" ); m_irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" ); m_receiveActivePixmap = Resource::loadPixmap( "irdaapplet/receive" ); diff --git a/core/applets/logoutapplet/logout.cpp b/core/applets/logoutapplet/logout.cpp index 92222c9..0ac0067 100644 --- a/core/applets/logoutapplet/logout.cpp +++ b/core/applets/logoutapplet/logout.cpp @@ -1,30 +1,28 @@ #include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> #include <qapplication.h> -#include <qiconset.h> -#include <qpopupmenu.h> #include <qmessagebox.h> #include <unistd.h> #include "logout.h" LogoutApplet::LogoutApplet ( ) : QObject ( 0, "LogoutApplet" ) { } LogoutApplet::~LogoutApplet ( ) { } int LogoutApplet::position ( ) const { return 0; } QString LogoutApplet::name ( ) const { return tr( "Logout shortcut" ); diff --git a/core/applets/multikeyapplet/multikey.cpp b/core/applets/multikeyapplet/multikey.cpp index b36ee12..b17498d 100644 --- a/core/applets/multikeyapplet/multikey.cpp +++ b/core/applets/multikeyapplet/multikey.cpp @@ -1,52 +1,46 @@ /********************************************************************** ** Copyright (C) 2004 Anton Kachalov mouse@altlinux.ru ** All rights reserved. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "multikey.h" /* OPIE */ #include <opie2/otaskbarapplet.h> -#include <qpe/global.h> -#include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> -#include <qpe/qpeapplication.h> /* QT */ -#include <qlabel.h> #include <qdir.h> -#include <qfileinfo.h> -#include <qcopchannel_qws.h> 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 &)), this, SLOT(message(const QCString &, const QByteArray &))); setFont( QFont( "Helvetica", 10, QFont::Normal ) ); QPEApplication::setStylusOperation(this, QPEApplication::RightOnHold); lang = 0; QCopEnvelope e("MultiKey/Keyboard", "getmultikey()"); setText("EN"); popupMenu.insertItem("EN", 0); show(); } void Multikey::mousePressEvent(QMouseEvent *ev) { if (!sw_maps.count()) return; if (ev->button() == RightButton) { QPoint p = mapToGlobal(QPoint(0, 0)); diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp index c3584ad..7d3c032 100644 --- a/core/launcher/applauncher.cpp +++ b/core/launcher/applauncher.cpp @@ -29,56 +29,52 @@ #endif #include <opie2/oglobal.h> #ifndef Q_OS_WIN32 #include <sys/stat.h> #include <sys/wait.h> #include <sys/file.h> #include <unistd.h> #include <sys/time.h> #include <sys/resource.h> #include <errno.h> #else #include <process.h> #include <windows.h> #include <winbase.h> #endif #include <signal.h> #include <sys/types.h> #include <stdlib.h> #include <qtimer.h> #include <qwindowsystem_qws.h> #include <qmessagebox.h> -#include <qfile.h> #include <qfileinfo.h> #include <qtopia/qcopenvelope_qws.h> -#include <qtopia/applnk.h> #include <qtopia/qpeapplication.h> -#include <qtopia/config.h> -#include <qtopia/global.h> #include "applauncher.h" #include "documentlist.h" const int AppLauncher::RAISE_TIMEOUT_MS = 5000; //--------------------------------------------------------------------------- static AppLauncher* appLauncherPtr; const int appStopEventID = 1290; class AppStoppedEvent : public QCustomEvent { public: AppStoppedEvent(int pid, int status) : QCustomEvent( appStopEventID ), mPid(pid), mStatus(status) { } int pid() { return mPid; } int status() { return mStatus; } private: int mPid, mStatus; }; diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp index e07920f..50ae6c2 100644 --- a/core/launcher/firstuse.cpp +++ b/core/launcher/firstuse.cpp @@ -15,71 +15,63 @@ ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ // I need access to some things you don't normally get access to. #ifndef _MSC_VER //### revise to allow removal of translators under MSVC #define private public #define protected public #endif #include "firstuse.h" #include "inputmethods.h" #include "applauncher.h" #include "serverapp.h" //#include <qtopia/custom.h> #include "calibrate.h" #include "documentlist.h" #include <qtopia/resource.h> #include <qtopia/qcopenvelope_qws.h> -#include <qtopia/qpeapplication.h> #include <qtopia/config.h> -#include <qtopia/applnk.h> -#include <qtopia/mimetype.h> #include <qtopia/fontmanager.h> -#include <qapplication.h> #include <qfile.h> #include <qpainter.h> -#include <qcstring.h> #include <qsimplerichtext.h> -#include <qcolor.h> #include <qpushbutton.h> -#include <qhbox.h> #include <qlabel.h> #include <qtimer.h> #if defined( Q_WS_QWS ) #include <qwsdisplay_qws.h> #include <qgfx_qws.h> #endif -#include <qwindowsystem_qws.h> #include <stdlib.h> #include <sys/types.h> #if defined(Q_OS_LINUX) || defined(_OS_LINUX_) #include <unistd.h> #endif struct { bool enabled; const char *app; const char *start; const char *stop; const char *desc; } settingsTable [] = { { FALSE, "language", "raise()", "accept()", // No tr QT_TR_NOOP("Language") }, { FALSE, "doctab", "raise()", "accept()", // No tr QT_TR_NOOP("DocTab") }, #ifndef Q_OS_WIN32 { FALSE, "systemtime", "raise()", "accept()", // No tr QT_TR_NOOP("Time and Date") }, diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp index 5d8faf7..683f1e2 100644 --- a/core/launcher/inputmethods.cpp +++ b/core/launcher/inputmethods.cpp @@ -2,61 +2,55 @@ ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #define QTOPIA_INTERNAL_LANGLIST #include "inputmethods.h" #include <qtopia/config.h> #include <qtopia/qpeapplication.h> -#include <qtopia/inputmethodinterface.h> -#include <qtopia/global.h> #include <qpopupmenu.h> -#include <qpushbutton.h> #include <qtoolbutton.h> #include <qwidgetstack.h> -#include <qwidget.h> #include <qlayout.h> -#include <qtimer.h> #include <qdir.h> #include <stdlib.h> -#include <qtranslator.h> #include <qtl.h> #ifdef Q_WS_QWS #include <qwindowsystem_qws.h> #include <qwsevent_qws.h> #include <qcopchannel_qws.h> #endif /* ### SingleFloppy if someone is interested? */ #if 0 #ifdef QT_NO_COMPONENT #include "../plugins/inputmethods/handwriting/handwritingimpl.h" #include "../plugins/inputmethods/keyboard/keyboardimpl.h" #include "../3rdparty/plugins/inputmethods/pickboard/pickboardimpl.h" #endif #endif /* XPM */ static const char * tri_xpm[]={ "9 9 2 1", "a c #000000", ". c None", ".........", ".........", diff --git a/core/launcher/irserver.cpp b/core/launcher/irserver.cpp index 63f8d05..a0e9c16 100644 --- a/core/launcher/irserver.cpp +++ b/core/launcher/irserver.cpp @@ -3,49 +3,48 @@ ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "irserver.h" #include <qtopia/qlibrary.h> #include <qtopia/qpeapplication.h> -#include <qtranslator.h> #include "obexinterface.h" #include <qdir.h> IrServer::IrServer( QObject *parent, const char *name ) : QObject( parent, name ), obexIface(0) { lib = 0; obexIface = 0; QString path = QPEApplication::qpeDir() + "/plugins/obex/"; #ifdef Q_OS_MACX QDir dir( path, "lib*.dylib" ); #else QDir dir( path, "lib*.so" ); #endif /* Q_OS_MACX */ QStringList list = dir.entryList(); QStringList::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) { QLibrary *trylib = new QLibrary( path + *it ); //qDebug("trying lib %s", (path + (*it)).latin1() ); if ( trylib->queryInterface( IID_ObexInterface, (QUnknownInterface**)&obexIface ) == QS_OK ) { lib = trylib; //qDebug("found obex lib" ); diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 984a57d..54efb0b 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -4,67 +4,65 @@ ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include <qtopia/global.h> #ifdef Q_WS_QWS #include <qtopia/qcopenvelope_qws.h> #endif #include <qtopia/resource.h> #include <qtopia/applnk.h> #include <qtopia/config.h> -#include <qtopia/global.h> #include <qtopia/qpeapplication.h> #include <qtopia/mimetype.h> #include <qtopia/private/categories.h> //#include <qtopia/custom.h> #include <qdir.h> #ifdef Q_WS_QWS #include <qwindowsystem_qws.h> #endif #include <qtimer.h> #include <qcombobox.h> #include <qvbox.h> #include <qlayout.h> #include <qstyle.h> #include <qpushbutton.h> #include <qtabbar.h> #include <qwidgetstack.h> -#include <qlayout.h> #include <qregexp.h> #include <qmessagebox.h> #include <qframe.h> #include <qpainter.h> #include <qlabel.h> #include <qtextstream.h> #include <qpopupmenu.h> #include "startmenu.h" #include "taskbar.h" #include "serverinterface.h" #include "launcherview.h" #include "launcher.h" #include "server.h" #define QTOPIA_INTERNAL_FSLP #include <qtopia/lnkproperties.h> #include <stdlib.h> #include <assert.h> #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <unistd.h> #include <stdio.h> diff --git a/core/launcher/launcherglobal.cpp b/core/launcher/launcherglobal.cpp index 84caa93..9abcae9 100644 --- a/core/launcher/launcherglobal.cpp +++ b/core/launcher/launcherglobal.cpp @@ -1,33 +1,29 @@ /* * GPLv2 only * * TT 2002-2002,2003 */ -#include <qstring.h> -#include <qcstring.h> -#include <qwidget.h> -#include <qguardedptr.h> #include <qfile.h> #include <qtextstream.h> #include <qtopia/mimetype.h> #include "launcherglobal.h" bool Opie::Global::isAppLnkFileName( const QString& file ) { if ( file.right(1) == "/" ) return FALSE; return file.find(MimeType::appsFolderName()+"/")==0; } QString Opie::Global::tempDir() { return QString::fromLatin1("/tmp/"); } Global::Command* Opie::Global::builtinCommands() { return builtin; } QGuardedPtr<QWidget>* Opie::Global::builtinRunning() { return running; diff --git a/core/launcher/launchertab.cpp b/core/launcher/launchertab.cpp index 10cfd5f..710f259 100644 --- a/core/launcher/launchertab.cpp +++ b/core/launcher/launchertab.cpp @@ -1,48 +1,45 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "launchertab.h" #include <qapplication.h> -#include <qstyle.h> -#include <qpainter.h> -#include <qbitmap.h> LauncherTabBar::LauncherTabBar( QWidget *parent, const char *name ) : QTabBar( parent, name ) { setFocusPolicy( NoFocus ); connect( this, SIGNAL( selected(int) ), this, SLOT( layoutTabs() ) ); } LauncherTabBar::~LauncherTabBar() { } void LauncherTabBar::insertTab( LauncherTab *t, int index ) { if ( index < 0 ) items.append( t ); else items.insert( (uint)index, t ); tabs.insert( t->type, t ); QTabBar::insertTab( t, index ); } void LauncherTabBar::removeTab( QTab *tab ) diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 62c678d..513b1bd 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp @@ -1,70 +1,56 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "launcherview.h" #include <qtopia/qpeapplication.h> -#include <qtopia/applnk.h> -#include <qtopia/qpedebug.h> #include <qtopia/private/categories.h> #include <qtopia/categoryselect.h> -#include <qtopia/menubutton.h> #include <qtopia/mimetype.h> #include <qtopia/resource.h> -#include <qtopia/qpetoolbar.h> //#include <qtopia/private/palmtoprecord.h> #include <qtimer.h> -#include <qtextstream.h> -#include <qdict.h> -#include <qfile.h> #include <qfileinfo.h> -#include <qhbox.h> #include <qiconview.h> -#include <qwidgetstack.h> -#include <qpainter.h> -#include <qregexp.h> -#include <qtoolbutton.h> -#include <qimage.h> -#include <qlabel.h> #include <qobjectlist.h> // These define how the busy icon is animated and highlighted #define BRIGHTEN_BUSY_ICON //#define ALPHA_FADE_BUSY_ICON //#define USE_ANIMATED_BUSY_ICON_OVERLAY #define BOUNCE_BUSY_ICON class BgPixmap { public: BgPixmap( const QPixmap &p ) : pm(p), ref(1) {} QPixmap pm; int ref; }; static QMap<QString,BgPixmap*> *bgCache = 0; static void cleanup_cache() { QMap<QString,BgPixmap*>::Iterator it = bgCache->begin(); diff --git a/core/launcher/main.cpp b/core/launcher/main.cpp index 9e53bb0..c136bd9 100644 --- a/core/launcher/main.cpp +++ b/core/launcher/main.cpp @@ -2,62 +2,57 @@ ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #ifndef QTOPIA_INTERNAL_FILEOPERATIONS #define QTOPIA_INTERNAL_FILEOPERATIONS #endif #include "server.h" #include "serverapp.h" -#include "taskbar.h" #include "stabmon.h" -#include "launcher.h" #include "firstuse.h" #include <opie2/oglobal.h> -#include <qtopia/qpeapplication.h> #include <qtopia/network.h> -#include <qtopia/config.h> //#include <qtopia/custom.h> -#include <qfile.h> #include <qdir.h> #ifdef QWS #include <qwindowsystem_qws.h> #include <qtopia/qcopenvelope_qws.h> #endif #include <qtopia/alarmserver.h> #include <stdlib.h> #include <stdio.h> #include <signal.h> #ifndef Q_OS_WIN32 #include <unistd.h> #else #include <process.h> #endif #include "calibrate.h" #ifdef QT_QWS_LOGIN #include "../login/qdmdialogimpl.h" #endif #ifdef Q_WS_QWS diff --git a/core/launcher/packageslave.cpp b/core/launcher/packageslave.cpp index bf34368..321b5dd 100644 --- a/core/launcher/packageslave.cpp +++ b/core/launcher/packageslave.cpp @@ -4,55 +4,53 @@ ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "packageslave.h" #include <qtopia/qprocess.h> #ifdef Q_WS_QWS #include <qtopia/qcopenvelope_qws.h> #endif -#include <qdatastream.h> #ifdef Q_WS_QWS #include <qcopchannel_qws.h> #endif #include <qtextstream.h> -#include <qdir.h> #include <stdlib.h> #include <sys/stat.h> // mkdir() #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <unistd.h> #include <sys/vfs.h> #include <mntent.h> #elif defined(Q_OS_WIN32) #include <windows.h> #include <winbase.h> #elif defined(Q_OS_MACX) #include <unistd.h> #endif PackageHandler::PackageHandler( QObject *parent, char* name ) : QObject( parent, name ), packageChannel( 0 ), currentProcess( 0 ), mNoSpaceLeft( FALSE ) { // setup qcop channel #ifndef QT_NO_COP packageChannel = new QCopChannel( "QPE/Package", this ); connect( packageChannel, SIGNAL( received(const QCString &, const QByteArray &) ), this, SLOT( qcopMessage( const QCString &, const QByteArray &) ) ); diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp index 9bca360..24f471d 100644 --- a/core/launcher/qcopbridge.cpp +++ b/core/launcher/qcopbridge.cpp @@ -8,58 +8,50 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "qcopbridge.h" #include "transferserver.h" #include <opie2/oglobal.h> #ifdef Q_WS_QWS #include <qtopia/qcopenvelope_qws.h> #endif #include <qtopia/qpeapplication.h> #include <qtopia/version.h> -#include <qtopia/config.h> -#include <qdir.h> -#include <qfile.h> #include <qtextstream.h> -#include <qdatastream.h> -#include <qcstring.h> -#include <qstringlist.h> -#include <qfileinfo.h> -#include <qregexp.h> #include <qtimer.h> #ifdef Q_WS_QWS #include <qcopchannel_qws.h> #endif #ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE #endif #ifndef Q_OS_WIN32 #include <pwd.h> #include <unistd.h> #include <sys/types.h> #endif #if defined(_OS_LINUX_) #include <shadow.h> #endif //#define INSECURE const int block_size = 51200; QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent, diff --git a/core/launcher/runningappbar.cpp b/core/launcher/runningappbar.cpp index 1fda5a4..11d10dc 100644 --- a/core/launcher/runningappbar.cpp +++ b/core/launcher/runningappbar.cpp @@ -1,59 +1,52 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** ***********************************************************************/ #define QTOPIA_INTERNAL_PRELOADACCESS -#include <qtopia/global.h> #include <stdlib.h> -#include <qtimer.h> -#include <qpopupmenu.h> #include <qpainter.h> -#include <qmessagebox.h> -#include <qtopia/qpeapplication.h> -#include <qtopia/applnk.h> #include <qtopia/qcopenvelope_qws.h> -#include <qtopia/mimetype.h> #include "runningappbar.h" #include "serverinterface.h" RunningAppBar::RunningAppBar(QWidget* parent) : QFrame(parent), selectedAppIndex(-1) { QCopChannel* channel = new QCopChannel( "QPE/System", this ); connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(received(const QCString&, const QByteArray&)) ); spacing = AppLnk::smallIconSize()+3; } RunningAppBar::~RunningAppBar() { } void RunningAppBar::received(const QCString& msg, const QByteArray& data) { // Since fast apps appear and disappear without disconnecting from their // channel we need to watch for the showing/hiding events and update according. QDataStream stream( data, IO_ReadOnly ); if ( msg == "fastAppShowing(QString)") { QString appName; diff --git a/core/launcher/screensaver.cpp b/core/launcher/screensaver.cpp index 1146dcd..e544c61 100644 --- a/core/launcher/screensaver.cpp +++ b/core/launcher/screensaver.cpp @@ -1,29 +1,28 @@ #include "screensaver.h" #include <qpe/config.h> -#include <qpe/power.h> #include <qpe/network.h> #include <opie2/odevice.h> using namespace Opie; OpieScreenSaver::OpieScreenSaver ( ) : QObject ( 0, "screensaver" ), QWSScreenSaver ( ) { m_disable_suspend = 100; m_enable_dim = false; m_enable_lightoff = false; m_enable_suspend = false; m_onlylcdoff = false; m_enable_dim_ac = false; m_enable_lightoff_ac = false; m_enable_suspend_ac = false; m_onlylcdoff_ac = false; m_use_light_sensor = false; diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp index 32fcdd0..068d716 100644 --- a/core/launcher/server.cpp +++ b/core/launcher/server.cpp @@ -1,56 +1,55 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "server.h" #include "serverapp.h" -#include "launcher.h" #include "startmenu.h" +#include "launcher.h" #include "transferserver.h" #include "qcopbridge.h" #include "irserver.h" #include "packageslave.h" #include "calibrate.h" #include "qrsync.h" #include "syncdialog.h" -#include "launcher.h" #include "shutdownimpl.h" #include "applauncher.h" #if 0 #include "suspendmonitor.h" #endif #include "documentlist.h" #include <qtopia/applnk.h> #include <qtopia/private/categories.h> #include <qtopia/mimetype.h> #include <qtopia/config.h> #include <qtopia/resource.h> #include <qtopia/version.h> #include <qtopia/storage.h> #include <qtopia/qcopenvelope_qws.h> #include <qwindowsystem_qws.h> #include <qgfx_qws.h> #include <qtopia/global.h> //#include <qtopia/custom.h> #include <opie2/odevicebutton.h> #include <opie2/odevice.h> diff --git a/core/launcher/shutdownimpl.cpp b/core/launcher/shutdownimpl.cpp index 899d9ac..f43a2a3 100644 --- a/core/launcher/shutdownimpl.cpp +++ b/core/launcher/shutdownimpl.cpp @@ -8,49 +8,48 @@ ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "shutdownimpl.h" #include <qpe/global.h> #include <qpe/qcopenvelope_qws.h> #include <qtimer.h> #include <qprogressbar.h> #include <qpushbutton.h> #include <qbuttongroup.h> #include <qlabel.h> #include <qlayout.h> -#include <qpalette.h> static void changeButtonColor ( QPushButton *btn, const QColor &col ) { QPalette pal = btn-> palette ( ); pal. setColor ( QPalette::Active, QColorGroup::Button, col ); pal. setColor ( QPalette::Disabled, QColorGroup::Button, col ); pal. setColor ( QPalette::Inactive, QColorGroup::Button, col ); btn-> setPalette ( pal ); } ShutdownImpl::ShutdownImpl( QWidget* parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl ) { setCaption ( tr( "Shutdown..." ) ); QVBoxLayout *vbox = new QVBoxLayout ( this ); vbox-> setSpacing ( 3 ); vbox-> setMargin ( 6 ); QButtonGroup *btngrp = new QButtonGroup ( this ); diff --git a/core/launcher/stabmon.cpp b/core/launcher/stabmon.cpp index 4e5f290..f2d694b 100644 --- a/core/launcher/stabmon.cpp +++ b/core/launcher/stabmon.cpp @@ -5,49 +5,48 @@ ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "stabmon.h" #ifdef QWS #include <qtopia/qcopenvelope_qws.h> #endif #include <qfile.h> -#include <qcstring.h> #include <sys/stat.h> #if defined(Q_OS_LINUX) || defined(_OS_LINUX_) #include <unistd.h> #endif #include <stdlib.h> SysFileMonitor::SysFileMonitor(QObject* parent) : QObject(parent) { startTimer(2000); } const char * stab0 = "/var/run/stab"; const char * stab1 = "/var/state/pcmcia/stab"; const char * stab2 = "/var/lib/pcmcia/stab"; void SysFileMonitor::timerEvent(QTimerEvent*) { struct stat s; static const char * tab [] = { stab0, stab1, diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index c199063..f3a7651 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp @@ -8,56 +8,52 @@ ** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
// TODO. During startup
// Launcher::typeAdded
// is called for each new tab and calls then each time the refresh of startmenu
// suboptimal
#define INCLUDE_MENUITEM_DEF
#include "startmenu.h"
#include <qtopia/qpeapplication.h>
#include <qtopia/config.h>
-#include <qtopia/applnk.h>
-#include <qtopia/global.h>
#include <qtopia/resource.h>
#include <qtopia/mimetype.h>
#include <qtopia/qlibrary.h>
-#include <qdict.h>
-#include <qdir.h>
//#include <qpainter.h>
//#include <stdlib.h>
#define APPLNK_ID_OFFSET 250
#define NO_ID -1
void StartPopupMenu::keyPressEvent( QKeyEvent *e )
{
if ( e->key() == Key_F33 || e->key() == Key_Space ) {
// "OK" button, little hacky
QKeyEvent ke(QEvent::KeyPress, Key_Enter, 13, 0);
QPopupMenu::keyPressEvent( &ke );
} else {
QPopupMenu::keyPressEvent( e );
}
}
//---------------------------------------------------------------------------
StartMenu::StartMenu(QWidget *parent) : QLabel( parent )
{
diff --git a/core/launcher/syncdialog.cpp b/core/launcher/syncdialog.cpp index 6f6c781..4a2b8ff 100644 --- a/core/launcher/syncdialog.cpp +++ b/core/launcher/syncdialog.cpp @@ -1,49 +1,48 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "syncdialog.h" #include <qtopia/resource.h> -#include <qimage.h> #include <qpainter.h> #include <qapplication.h> #include <qpushbutton.h> #include <qfile.h> SyncDialog::SyncDialog( QWidget *parent, const QString &w ) : QDialog( parent, "SyncDialog", FALSE, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop ), what(w), nextPt(0), rev(FALSE), hideDot(TRUE) { QFont f( font() ); f.setPointSize( 16 ); setFont(f); loadPath(); QSize ds = qApp->desktop()->size(); setGeometry( 0, 0, ds.width(), ds.height() ); img = Resource::loadImage( "SyncScreen" ); if ( img.width() > ds.width() || img.height() > ds.height() ) { path = scalePath( path, ds.width(), img.width(), ds.height(), img.height() ); img = img.smoothScale( ds.width(), ds.height() ); } dot = Resource::loadImage( "syncdot" ); diff --git a/core/launcher/systray.cpp b/core/launcher/systray.cpp index 691f6b8..6cc1446 100644 --- a/core/launcher/systray.cpp +++ b/core/launcher/systray.cpp @@ -3,50 +3,48 @@ ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include <qtopia/qpeapplication.h> #include <qtopia/qlibrary.h> #include <qtopia/config.h> #include <qlayout.h> #include <qdir.h> -#include <qmessagebox.h> -#include <qtranslator.h> #include "systray.h" #include <stdlib.h> /* ### Single build floppies ### */ #if 0 #ifdef QT_NO_COMPONENTS #include "../plugins/applets/clockapplet/clockappletimpl.h" #endif #endif SysTray::SysTray( QWidget *parent ) : QFrame( parent ), layout(0) { //setFrameStyle( QFrame::Panel | QFrame::Sunken ); loadApplets(); } SysTray::~SysTray() { clearApplets(); } static int compareAppletPositions(const void *a, const void *b) diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index 8367a62..b998e95 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp @@ -1,84 +1,74 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ //#define _XOPEN_SOURCE #include <opie2/oglobal.h> -#include <qtopia/qpeapplication.h> #ifndef Q_OS_WIN32 #include <pwd.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #ifndef Q_OS_MACX #include <shadow.h> #include <crypt.h> #endif /* Q_OS_MACX */ #else #include <stdlib.h> #include <time.h> #endif #if defined(_OS_LINUX_) #include <shadow.h> #endif -#include <qdir.h> -#include <qfile.h> #include <qtextstream.h> -#include <qdatastream.h> #include <qmessagebox.h> -#include <qstringlist.h> -#include <qfileinfo.h> -#include <qregexp.h> //#include <qtopia/qcopchannel_qws.h> #include <qtopia/process.h> -#include <qtopia/global.h> -#include <qtopia/config.h> #include <qtopia/private/contact.h> -#include <qtopia/quuid.h> #include <qtopia/version.h> #ifdef Q_WS_QWS #include <qtopia/qcopenvelope_qws.h> #endif #include "transferserver.h" #include <qtopia/qprocess.h> const int block_size = 51200; TransferServer::TransferServer( Q_UINT16 port, QObject *parent, const char* name) : QServerSocket( port, 1, parent, name ) { connections.setAutoDelete( TRUE ); if ( !ok() ) qWarning( "Failed to bind to port %d", port ); } void TransferServer::authorizeConnections() { QListIterator<ServerPI> it(connections); while ( it.current() ) { diff --git a/core/launcher/wait.cpp b/core/launcher/wait.cpp index 34ffd1a..4148e57 100644 --- a/core/launcher/wait.cpp +++ b/core/launcher/wait.cpp @@ -1,54 +1,50 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "wait.h" -#include <qtopia/resource.h> #include <qtopia/config.h> #include <opie2/owait.h> -#include <qwidget.h> -#include <qpixmap.h> -#include <qpainter.h> Wait *lastWaitObject = NULL; Wait::Wait( QWidget *parent ) : QWidget( parent ), pm( Resource::loadPixmap( "wait" ) ), waiting( FALSE ) { setFixedSize( pm.size() ); lastWaitObject = this; m_centralWait = new OWait( 0l ); m_centralWait->hide(); hide(); } Wait *Wait::getWaitObject() { return lastWaitObject; } void Wait::setWaiting( bool w ) { |