-rw-r--r-- | library/lnkproperties.cpp | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/library/lnkproperties.cpp b/library/lnkproperties.cpp index 983c677..0b30a9a 100644 --- a/library/lnkproperties.cpp +++ b/library/lnkproperties.cpp | |||
@@ -27,4 +27,5 @@ | |||
27 | #include "ir.h" | 27 | #include "ir.h" |
28 | 28 | ||
29 | #include <qpe/qpeapplication.h> | ||
29 | #include <qpe/applnk.h> | 30 | #include <qpe/applnk.h> |
30 | #include <qpe/global.h> | 31 | #include <qpe/global.h> |
@@ -51,4 +52,5 @@ | |||
51 | #include <qcombobox.h> | 52 | #include <qcombobox.h> |
52 | #include <qregexp.h> | 53 | #include <qregexp.h> |
54 | #include <qbuttongroup.h> | ||
53 | 55 | ||
54 | #include <stdlib.h> | 56 | #include <stdlib.h> |
@@ -86,5 +88,7 @@ LnkProperties::LnkProperties( AppLnk* l, QWidget* parent ) | |||
86 | d->docname->setReadOnly( FALSE ); | 88 | d->docname->setReadOnly( FALSE ); |
87 | d->preload->hide(); | 89 | d->preload->hide(); |
88 | d->spacer->hide(); | 90 | d->rotate->hide(); |
91 | d->rotateButtons->hide(); | ||
92 | d->labelspacer->hide(); | ||
89 | 93 | ||
90 | // ### THIS MUST GO, FIX WIERD BUG in QLAYOUT | 94 | // ### THIS MUST GO, FIX WIERD BUG in QLAYOUT |
@@ -111,4 +115,11 @@ LnkProperties::LnkProperties( AppLnk* l, QWidget* parent ) | |||
111 | if ( l->property("CanFastload") == "0" ) | 115 | if ( l->property("CanFastload") == "0" ) |
112 | d->preload->hide(); | 116 | d->preload->hide(); |
117 | if ( !l->property("Rotation"). isEmpty ()) { | ||
118 | d->rotate->setChecked ( true ); | ||
119 | d->rotateButtons->setButton(((QPEApplication::defaultRotation()+l->rotation().toInt())%360)/90); | ||
120 | } | ||
121 | else { | ||
122 | d->rotateButtons->setEnabled(false); | ||
123 | } | ||
113 | 124 | ||
114 | Config cfg("Launcher"); | 125 | Config cfg("Launcher"); |
@@ -276,4 +287,20 @@ void LnkProperties::done(int ok) | |||
276 | } | 287 | } |
277 | } | 288 | } |
289 | if ( !d->rotate->isHidden()) { | ||
290 | QString newrot; | ||
291 | |||
292 | if (d->rotate->isChecked()) { | ||
293 | int rot=0; | ||
294 | for(; rot<4; rot++) { | ||
295 | if (d->rotateButtons->find(rot)->isOn()) | ||
296 | break; | ||
297 | } | ||
298 | newrot = QString::number((QPEApplication::defaultRotation()+rot*90)%360); | ||
299 | } | ||
300 | if (newrot !=lnk->rotation()) { | ||
301 | lnk->setRotation(newrot); | ||
302 | changed = TRUE; | ||
303 | } | ||
304 | } | ||
278 | if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) { | 305 | if ( d->preload->isHidden() && d->locationCombo->currentItem() != currentLocation ) { |
279 | moveLnk(); | 306 | moveLnk(); |
@@ -281,5 +308,5 @@ void LnkProperties::done(int ok) | |||
281 | lnk->writeLink(); | 308 | lnk->writeLink(); |
282 | } | 309 | } |
283 | 310 | ||
284 | if ( !d->preload->isHidden() ) { | 311 | if ( !d->preload->isHidden() ) { |
285 | Config cfg("Launcher"); | 312 | Config cfg("Launcher"); |