summaryrefslogtreecommitdiff
path: root/library/qpeapplication.h
authorsimon <simon>2003-03-26 10:02:13 (UTC)
committer simon <simon>2003-03-26 10:02:13 (UTC)
commitff08ba81efbc0e2dcb3907f576ff4f078f2b7438 (patch) (unidiff)
tree645738d443f9eb5220b1ca1d2e922572aeec8e17 /library/qpeapplication.h
parentb7a2238dad7f8f44c3354168d8e2685705616c78 (diff)
downloadopie-ff08ba81efbc0e2dcb3907f576ff4f078f2b7438.zip
opie-ff08ba81efbc0e2dcb3907f576ff4f078f2b7438.tar.gz
opie-ff08ba81efbc0e2dcb3907f576ff4f078f2b7438.tar.bz2
- Kommando zurueck :)
Diffstat (limited to 'library/qpeapplication.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 82954d0..4c37ea6 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -120,78 +120,73 @@ protected:
120 bool eventFilter( QObject *, QEvent * ); 120 bool eventFilter( QObject *, QEvent * );
121 void timerEvent( QTimerEvent * ); 121 void timerEvent( QTimerEvent * );
122 bool raiseAppropriateWindow(); 122 bool raiseAppropriateWindow();
123 virtual void tryQuit(); 123 virtual void tryQuit();
124 124
125 virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!) 125 virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!)
126 126
127private: 127private:
128 void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); 128 void mapToDefaultAction( QWSKeyEvent *ke, int defKey );
129 129
130#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 130#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
131 QCopChannel *sysChannel; 131 QCopChannel *sysChannel;
132 QCopChannel *pidChannel; 132 QCopChannel *pidChannel;
133#endif 133#endif
134 QPEApplicationData *d; 134 QPEApplicationData *d;
135 135
136 bool reserved_sh; 136 bool reserved_sh;
137 137
138 138
139 139
140}; 140};
141 141
142inline void QPEApplication::showDialog( QDialog* d, bool nomax ) 142inline void QPEApplication::showDialog( QDialog* d, bool nomax )
143{ 143{
144 QSize sh = d->sizeHint(); 144 QSize sh = d->sizeHint();
145 int w = QMAX(sh.width(),d->width()); 145 int w = QMAX(sh.width(),d->width());
146 int h = QMAX(sh.height(),d->height()); 146 int h = QMAX(sh.height(),d->height());
147 if ( !nomax 147 if ( !nomax
148 && ( w > qApp->desktop()->width()*3/4 148 && ( w > qApp->desktop()->width()*3/4
149 || h > qApp->desktop()->height()*3/4 ) ) 149 || h > qApp->desktop()->height()*3/4 ) )
150 { 150 {
151 d->showMaximized(); 151 d->showMaximized();
152 } else { 152 } else {
153 d->resize(w,h); 153 d->resize(w,h);
154 d->show(); 154 d->show();
155 } 155 }
156} 156}
157 157
158inline int QPEApplication::execDialog( QDialog* d, bool nomax ) 158inline int QPEApplication::execDialog( QDialog* d, bool nomax )
159{ 159{
160 showDialog(d,nomax); 160 showDialog(d,nomax);
161 return d->exec(); 161 return d->exec();
162} 162}
163 163
164enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ 164enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */
165 165
166inline void QPEApplication::setCurrentRotation( int r ) 166inline void QPEApplication::setCurrentRotation( int r )
167{ 167{
168 if ( qApp->type() != GuiServer ) {
169 QCopEnvelope e( "QPE/System", "setCurrentRotation(int)" );
170 e << r;
171 return;
172 }
173 Transformation e; 168 Transformation e;
174 169
175 switch (r) { 170 switch (r) {
176 case 0: 171 case 0:
177 e = Rot0; 172 e = Rot0;
178 break; 173 break;
179 case 90: 174 case 90:
180 e = Rot90; 175 e = Rot90;
181 break; 176 break;
182 case 180: 177 case 180:
183 e = Rot180; 178 e = Rot180;
184 break; 179 break;
185 case 270: 180 case 270:
186 e = Rot270; 181 e = Rot270;
187 break; 182 break;
188 default: 183 default:
189 return; 184 return;
190 } 185 }
191 186
192 qDebug("calling qApp->desktop()->qwsDisplay()->setTransformation( %d )\n", e); 187 qDebug("calling qApp->desktop()->qwsDisplay()->setTransformation( %d )\n", e);
193 qApp->desktop()->qwsDisplay()->setTransformation( e ); 188 qApp->desktop()->qwsDisplay()->setTransformation( e );
194} 189}
195 190
196 191
197#endif 192#endif