-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 @@ -45,8 +45,23 @@ 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; |