author | llornkcor <llornkcor> | 2002-05-22 13:00:46 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-05-22 13:00:46 (UTC) |
commit | 492c5c3c07a192b3a00e76f227e40d98459db1aa (patch) (side-by-side diff) | |
tree | 0c07a9c56b528d693ff14b4fc3e4cba4407a682b | |
parent | d3466b66bd9189219b6dff7fd248169b5725a1b8 (diff) | |
download | opie-492c5c3c07a192b3a00e76f227e40d98459db1aa.zip opie-492c5c3c07a192b3a00e76f227e40d98459db1aa.tar.gz opie-492c5c3c07a192b3a00e76f227e40d98459db1aa.tar.bz2 |
added #include custom-ipaq.h for ipaq builds for ipaq sounds
-rw-r--r-- | core/launcher/desktop.cpp | 3 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 92 |
2 files changed, 51 insertions, 44 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index 85ba160..649862b 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp @@ -43,2 +43,5 @@ #endif +#if defined(QT_QWS_IPAQ) +#include "qpe/custom-ipaq.h" +#endif diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 18d28cb..54777c6 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp @@ -37,2 +37,6 @@ #endif +#if defined(QT_QWS_IPAQ) +#include "qpe/custom-ipaq.h" +#endif + @@ -52,12 +56,12 @@ static QWidget *new##T( bool maximized ) { \ - QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ - if ( maximized ) { \ - if ( qApp->desktop()->width() <= 350 ) { \ - w->showMaximized(); \ - } else { \ - w->resize( QSize( 300, 300 ) ); \ - } \ - } \ - w->show(); \ - return w; \ + QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ + if ( maximized ) { \ + if ( qApp->desktop()->width() <= 350 ) { \ + w->showMaximized(); \ + } else { \ + w->resize( QSize( 300, 300 ) ); \ + } \ + } \ + w->show(); \ + return w; \ } @@ -80,10 +84,10 @@ static Global::Command builtins[] = { #if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_EBX) - { "calibrate", TaskBar::calibrate, 1, 0 }, + { "calibrate", TaskBar::calibrate, 1, 0 }, #endif #if !defined(QT_QWS_CASSIOPEIA) - { "shutdown", Global::shutdown, 1, 0 }, -// { "run", run, 1, 0 }, + { "shutdown", Global::shutdown, 1, 0 }, +// { "run", run, 1, 0 }, #endif - { 0, TaskBar::calibrate, 0, 0 }, + { 0, TaskBar::calibrate, 0, 0 }, }; @@ -102,7 +106,7 @@ public: LockKeyState( QWidget *parent ) : - QWidget(parent), - nl(initNumLock()), cl(FALSE) + QWidget(parent), + nl(initNumLock()), cl(FALSE) { - nl_pm = Resource::loadPixmap("numlock"); - cl_pm = Resource::loadPixmap("capslock"); + nl_pm = Resource::loadPixmap("numlock"); + cl_pm = Resource::loadPixmap("capslock"); } @@ -110,3 +114,3 @@ public: { - return QSize(nl_pm.width()+2,nl_pm.width()+nl_pm.height()+1); + return QSize(nl_pm.width()+2,nl_pm.width()+nl_pm.height()+1); } @@ -114,3 +118,3 @@ public: { - nl = !nl; repaint(); + nl = !nl; repaint(); } @@ -118,3 +122,3 @@ public: { - cl = !cl; repaint(); + cl = !cl; repaint(); } @@ -122,8 +126,8 @@ public: { - int y = (height()-sizeHint().height())/2; - QPainter p(this); - if ( nl ) - p.drawPixmap(1,y,nl_pm); - if ( cl ) - p.drawPixmap(1,y+nl_pm.height()+1,cl_pm); + int y = (height()-sizeHint().height())/2; + QPainter p(this); + if ( nl ) + p.drawPixmap(1,y,nl_pm); + if ( cl ) + p.drawPixmap(1,y+nl_pm.height()+1,cl_pm); } @@ -147,3 +151,3 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn connect( inputMethods, SIGNAL(inputToggled(bool)), - this, SLOT(calcMaxWindowRect()) ); + this, SLOT(calcMaxWindowRect()) ); //new QuickLauncher( this ); @@ -173,3 +177,3 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(receive(const QCString&, const QByteArray&)) ); + this, SLOT(receive(const QCString&, const QByteArray&)) ); #endif @@ -188,3 +192,3 @@ void TaskBar::setStatusMessage( const QString &text ) if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) - sysTray->hide(); + sysTray->hide(); clearer->start( 3000 ); @@ -237,5 +241,5 @@ void TaskBar::calcMaxWindowRect() if ( ir.isValid() ) { - wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 ); + wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 ); } else { - wr.setCoords( 0, 0, displayWidth-1, y()-1 ); + wr.setCoords( 0, 0, displayWidth-1, y()-1 ); } @@ -244,4 +248,4 @@ void TaskBar::calcMaxWindowRect() QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr, - QSize(qt_screen->width(),qt_screen->height())) - ); + QSize(qt_screen->width(),qt_screen->height())) + ); #else @@ -260,11 +264,11 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data ) } else if ( msg == "hideInputMethod()" ) { - inputMethods->hideInputMethod(); + inputMethods->hideInputMethod(); } else if ( msg == "showInputMethod()" ) { - inputMethods->showInputMethod(); + inputMethods->showInputMethod(); } else if ( msg == "reloadInputMethods()" ) { - inputMethods->loadInputMethods(); + inputMethods->loadInputMethods(); } else if ( msg == "reloadApplets()" ) { - sysTray->loadApplets(); + sysTray->loadApplets(); } else if ( msg == "soundAlarm()" ) { - Desktop::soundAlarm(); + Desktop::soundAlarm(); } @@ -272,5 +276,5 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data ) else if ( msg == "setLed(int,bool)" ) { - int led, status; - stream >> led >> status; - CUSTOM_LEDS( led, status ); + int led, status; + stream >> led >> status; + CUSTOM_LEDS( led, status ); } @@ -303,5 +307,5 @@ void TaskBar::toggleSymbolInput() if ( inputMethods->currentShown() == "Unicode" ) { - inputMethods->hideInputMethod(); + inputMethods->hideInputMethod(); } else { - inputMethods->showInputMethod("Unicode"); + inputMethods->showInputMethod("Unicode"); } |