summaryrefslogtreecommitdiff
path: root/library/lnkproperties.cpp
Unidiff
Diffstat (limited to 'library/lnkproperties.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/lnkproperties.cpp31
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
@@ -26,6 +26,7 @@
26#include "lnkpropertiesbase_p.h" 26#include "lnkpropertiesbase_p.h"
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>
31#include <qpe/categorywidget.h> 32#include <qpe/categorywidget.h>
@@ -50,6 +51,7 @@
50#include <qsize.h> 51#include <qsize.h>
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>
55 57
@@ -85,7 +87,9 @@ LnkProperties::LnkProperties( AppLnk* l, QWidget* parent )
85 87
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
91 d->categoryEdit->kludge(); 95 d->categoryEdit->kludge();
@@ -110,6 +114,13 @@ LnkProperties::LnkProperties( AppLnk* l, QWidget* parent )
110 114
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");
115 cfg.setGroup("Preload"); 126 cfg.setGroup("Preload");
@@ -275,12 +286,28 @@ void LnkProperties::done(int ok)
275 changed = TRUE; 286 changed = TRUE;
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();
280 } else if ( changed ) { 307 } else if ( changed ) {
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");
286 cfg.setGroup("Preload"); 313 cfg.setGroup("Preload");