-rw-r--r-- | microkde/kapplication.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/microkde/kapplication.cpp b/microkde/kapplication.cpp index f05b91b..80a83e0 100644 --- a/microkde/kapplication.cpp +++ b/microkde/kapplication.cpp @@ -41,16 +41,31 @@ int KApplication::execDialog( QDialog* d ) ;//d->resize( 800, 600 ); return d->exec(); } void KApplication::showLicence() { KApplication::showFile( "KDE-Pim/Pi licence", "kdepim/licence.txt" ); } +void KApplication::testCoords( int* x, int* y, int* wid, int * hei ) +{ + int dWid = QApplication::desktop()->width() ; + int dHei = QApplication::desktop()->height(); + if ( *x + *wid > dWid ) { + *x = 0; + if ( *wid > dWid ) + *wid = dWid; + } + if ( *y + *hei > dHei ) { + *y = 0; + if ( *hei > dHei ) + *hei = dHei; + } +} void KApplication::showFile(QString caption, QString fn) { QString text; QString fileName; #ifndef DESKTOP_VERSION fileName = getenv("QPEDIR"); fileName += "/pics/" + fn ; #else |