author | harlekin <harlekin> | 2002-09-09 18:28:50 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-09-09 18:28:50 (UTC) |
commit | 8ef3adf9504f27df8bf0e057221704b1ee077dc8 (patch) (unidiff) | |
tree | 98987fc4789abb6d26293eca56e80ca938320640 | |
parent | c9442bf567252553da8ce216de1e64cbf70db3bd (diff) | |
download | opie-8ef3adf9504f27df8bf0e057221704b1ee077dc8.zip opie-8ef3adf9504f27df8bf0e057221704b1ee077dc8.tar.gz opie-8ef3adf9504f27df8bf0e057221704b1ee077dc8.tar.bz2 |
next time i will also compile it for ipaq too before commiting so i also see compile problems in ipaq ifdefs .-)
-rw-r--r-- | core/launcher/taskbar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 9f397eb..988d072 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp | |||
@@ -125,97 +125,97 @@ public: | |||
125 | void paintEvent( QPaintEvent * ) | 125 | void paintEvent( QPaintEvent * ) |
126 | { | 126 | { |
127 | int y = (height()-sizeHint().height())/2; | 127 | int y = (height()-sizeHint().height())/2; |
128 | QPainter p(this); | 128 | QPainter p(this); |
129 | if ( nl ) | 129 | if ( nl ) |
130 | p.drawPixmap(1,y,nl_pm); | 130 | p.drawPixmap(1,y,nl_pm); |
131 | if ( cl ) | 131 | if ( cl ) |
132 | p.drawPixmap(1,y+nl_pm.height()+1,cl_pm); | 132 | p.drawPixmap(1,y+nl_pm.height()+1,cl_pm); |
133 | } | 133 | } |
134 | private: | 134 | private: |
135 | QPixmap nl_pm, cl_pm; | 135 | QPixmap nl_pm, cl_pm; |
136 | bool nl, cl; | 136 | bool nl, cl; |
137 | }; | 137 | }; |
138 | 138 | ||
139 | TaskBar::~TaskBar() | 139 | TaskBar::~TaskBar() |
140 | { | 140 | { |
141 | } | 141 | } |
142 | 142 | ||
143 | 143 | ||
144 | TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) | 144 | TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) |
145 | { | 145 | { |
146 | Global::setBuiltinCommands(builtins); | 146 | Global::setBuiltinCommands(builtins); |
147 | 147 | ||
148 | sm = new StartMenu( this ); | 148 | sm = new StartMenu( this ); |
149 | 149 | ||
150 | inputMethods = new InputMethods( this ); | 150 | inputMethods = new InputMethods( this ); |
151 | connect( inputMethods, SIGNAL(inputToggled(bool)), | 151 | connect( inputMethods, SIGNAL(inputToggled(bool)), |
152 | this, SLOT(calcMaxWindowRect()) ); | 152 | this, SLOT(calcMaxWindowRect()) ); |
153 | //new QuickLauncher( this ); | 153 | //new QuickLauncher( this ); |
154 | 154 | ||
155 | stack = new QWidgetStack( this ); | 155 | stack = new QWidgetStack( this ); |
156 | stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); | 156 | stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); |
157 | label = new QLabel(stack); | 157 | label = new QLabel(stack); |
158 | 158 | ||
159 | //mru = new MRUList( stack ); | 159 | //mru = new MRUList( stack ); |
160 | //stack->raiseWidget( mru ); | 160 | //stack->raiseWidget( mru ); |
161 | 161 | ||
162 | runningAppBar = new RunningAppBar(stack); | 162 | runningAppBar = new RunningAppBar(stack); |
163 | stack->raiseWidget(runningAppBar); | 163 | stack->raiseWidget(runningAppBar); |
164 | 164 | ||
165 | waitIcon = new Wait( this ); | 165 | waitIcon = new Wait( this ); |
166 | (void) new AppIcons( this ); | 166 | (void) new AppIcons( this ); |
167 | 167 | ||
168 | sysTray = new SysTray( this ); | 168 | sysTray = new SysTray( this ); |
169 | 169 | ||
170 | // ## make customizable in some way? | 170 | // ## make customizable in some way? |
171 | #ifdef QT_QWS_CUSTOM | 171 | #ifdef QT_QWS_CUSTOM |
172 | lockState = new LockKeyState( this ); | 172 | lockState = new LockKeyState( this ); |
173 | y#else | 173 | #else |
174 | lockState = 0; | 174 | lockState = 0; |
175 | #endif | 175 | #endif |
176 | 176 | ||
177 | #if defined(Q_WS_QWS) | 177 | #if defined(Q_WS_QWS) |
178 | #if !defined(QT_NO_COP) | 178 | #if !defined(QT_NO_COP) |
179 | QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); | 179 | QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); |
180 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 180 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
181 | this, SLOT(receive(const QCString&, const QByteArray&)) ); | 181 | this, SLOT(receive(const QCString&, const QByteArray&)) ); |
182 | #endif | 182 | #endif |
183 | #endif | 183 | #endif |
184 | waitTimer = new QTimer( this ); | 184 | waitTimer = new QTimer( this ); |
185 | connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); | 185 | connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); |
186 | clearer = new QTimer( this ); | 186 | clearer = new QTimer( this ); |
187 | QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); | 187 | QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); |
188 | QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show())); | 188 | QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show())); |
189 | } | 189 | } |
190 | 190 | ||
191 | void TaskBar::setStatusMessage( const QString &text ) | 191 | void TaskBar::setStatusMessage( const QString &text ) |
192 | { | 192 | { |
193 | label->setText( text ); | 193 | label->setText( text ); |
194 | stack->raiseWidget( label ); | 194 | stack->raiseWidget( label ); |
195 | if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) | 195 | if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) |
196 | sysTray->hide(); | 196 | sysTray->hide(); |
197 | clearer->start( 3000 ); | 197 | clearer->start( 3000 ); |
198 | } | 198 | } |
199 | 199 | ||
200 | void TaskBar::clearStatusBar() | 200 | void TaskBar::clearStatusBar() |
201 | { | 201 | { |
202 | label->clear(); | 202 | label->clear(); |
203 | stack->raiseWidget(runningAppBar); | 203 | stack->raiseWidget(runningAppBar); |
204 | // stack->raiseWidget( mru ); | 204 | // stack->raiseWidget( mru ); |
205 | } | 205 | } |
206 | 206 | ||
207 | void TaskBar::startWait() | 207 | void TaskBar::startWait() |
208 | { | 208 | { |
209 | waitIcon->setWaiting( true ); | 209 | waitIcon->setWaiting( true ); |
210 | // a catchall stop after 10 seconds... | 210 | // a catchall stop after 10 seconds... |
211 | waitTimer->start( 10 * 1000, true ); | 211 | waitTimer->start( 10 * 1000, true ); |
212 | } | 212 | } |
213 | 213 | ||
214 | void TaskBar::stopWait(const QString& app) | 214 | void TaskBar::stopWait(const QString& app) |
215 | { | 215 | { |
216 | waitTimer->stop(); | 216 | waitTimer->stop(); |
217 | //mru->addTask(sm->execToLink(app)); | 217 | //mru->addTask(sm->execToLink(app)); |
218 | waitIcon->setWaiting( false ); | 218 | waitIcon->setWaiting( false ); |
219 | } | 219 | } |
220 | 220 | ||
221 | void TaskBar::stopWait() | 221 | void TaskBar::stopWait() |