summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-09-09 18:28:50 (UTC)
committer harlekin <harlekin>2002-09-09 18:28:50 (UTC)
commit8ef3adf9504f27df8bf0e057221704b1ee077dc8 (patch) (unidiff)
tree98987fc4789abb6d26293eca56e80ca938320640
parentc9442bf567252553da8ce216de1e64cbf70db3bd (diff)
downloadopie-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 .-)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/taskbar.cpp2
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
@@ -109,129 +109,129 @@ public:
109 { 109 {
110 nl_pm = Resource::loadPixmap("numlock"); 110 nl_pm = Resource::loadPixmap("numlock");
111 cl_pm = Resource::loadPixmap("capslock"); 111 cl_pm = Resource::loadPixmap("capslock");
112 } 112 }
113 QSize sizeHint() const 113 QSize sizeHint() const
114 { 114 {
115 return QSize(nl_pm.width()+2,nl_pm.width()+nl_pm.height()+1); 115 return QSize(nl_pm.width()+2,nl_pm.width()+nl_pm.height()+1);
116 } 116 }
117 void toggleNumLockState() 117 void toggleNumLockState()
118 { 118 {
119 nl = !nl; repaint(); 119 nl = !nl; repaint();
120 } 120 }
121 void toggleCapsLockState() 121 void toggleCapsLockState()
122 { 122 {
123 cl = !cl; repaint(); 123 cl = !cl; repaint();
124 } 124 }
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 }
134private: 134private:
135 QPixmap nl_pm, cl_pm; 135 QPixmap nl_pm, cl_pm;
136 bool nl, cl; 136 bool nl, cl;
137}; 137};
138 138
139TaskBar::~TaskBar() 139TaskBar::~TaskBar()
140{ 140{
141} 141}
142 142
143 143
144TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOnTop | WGroupLeader) 144TaskBar::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 );
173y#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
191void TaskBar::setStatusMessage( const QString &text ) 191void 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
200void TaskBar::clearStatusBar() 200void 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
207void TaskBar::startWait() 207void 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
214void TaskBar::stopWait(const QString& app) 214void 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
221void TaskBar::stopWait() 221void TaskBar::stopWait()
222{ 222{
223 waitTimer->stop(); 223 waitTimer->stop();
224 224
225 waitIcon->setWaiting( false ); 225 waitIcon->setWaiting( false );
226} 226}
227 227
228void TaskBar::resizeEvent( QResizeEvent *e ) 228void TaskBar::resizeEvent( QResizeEvent *e )
229{ 229{
230 QHBox::resizeEvent( e ); 230 QHBox::resizeEvent( e );
231 calcMaxWindowRect(); 231 calcMaxWindowRect();
232} 232}
233 233
234void TaskBar::styleChange( QStyle &s ) 234void TaskBar::styleChange( QStyle &s )
235{ 235{
236 QHBox::styleChange( s ); 236 QHBox::styleChange( s );
237 calcMaxWindowRect(); 237 calcMaxWindowRect();