25 |
25 |
26 //User Includes |
26 //User Includes |
27 #include "glxuistd.h" |
27 #include "glxuistd.h" |
28 #include "glxviewids.h" |
28 #include "glxviewids.h" |
29 #include "glxslideshowsettingsview.h" |
29 #include "glxslideshowsettingsview.h" |
30 #include "glxeffectengine.h" |
30 #include "glxsettinginterface.h" |
31 |
31 #include "glxlocalisationstrings.h" |
32 |
|
33 |
32 |
34 |
33 |
35 GlxSlideShowSettingsView::GlxSlideShowSettingsView(HbMainWindow *window) |
34 GlxSlideShowSettingsView::GlxSlideShowSettingsView(HbMainWindow *window) |
36 : GlxView ( GLX_SLIDESHOWSETTINGSVIEW_ID ), |
35 : GlxView ( GLX_SLIDESHOWSETTINGSVIEW_ID ), |
37 mEffect(NULL), |
36 mEffect(NULL), |
40 mContextlabel (NULL), |
39 mContextlabel (NULL), |
41 mEffectlabel (NULL), |
40 mEffectlabel (NULL), |
42 mDelaylabel (NULL), |
41 mDelaylabel (NULL), |
43 mSettings( NULL ) |
42 mSettings( NULL ) |
44 { |
43 { |
45 mSettings = new GlxSlideShowSetting(); |
44 mSettings = GlxSettingInterface::instance() ; |
46 setContentFullScreen( true ); |
45 setContentFullScreen( true ); |
47 } |
46 } |
48 |
47 |
49 GlxSlideShowSettingsView::~GlxSlideShowSettingsView() |
48 GlxSlideShowSettingsView::~GlxSlideShowSettingsView() |
50 { |
49 { |
51 delete mContextlabel; |
50 delete mContextlabel; |
52 delete mEffectlabel; |
51 delete mEffectlabel; |
53 delete mDelaylabel; |
52 delete mDelaylabel; |
54 delete mEffect; |
53 delete mEffect; |
55 delete mDelay; |
54 delete mDelay; |
56 delete mSettings; |
|
57 } |
55 } |
58 |
56 |
59 void GlxSlideShowSettingsView::setModel(QAbstractItemModel *model) |
57 void GlxSlideShowSettingsView::setModel(QAbstractItemModel *model) |
60 { |
58 { |
|
59 Q_UNUSED( model ) |
61 return; |
60 return; |
62 } |
61 } |
63 |
62 |
64 void GlxSlideShowSettingsView::orientationChanged(Qt::Orientation) |
63 void GlxSlideShowSettingsView::orientationChanged(Qt::Orientation) |
65 { |
64 { |
69 void GlxSlideShowSettingsView::activate() |
68 void GlxSlideShowSettingsView::activate() |
70 { |
69 { |
71 connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation))); |
70 connect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation))); |
72 |
71 |
73 if ( mContextlabel == NULL ) { |
72 if ( mContextlabel == NULL ) { |
74 mContextlabel = new HbLabel("Slideshow", this); |
73 mContextlabel = new HbLabel( GLX_MENU_SLIDESHOW, this ); |
75 } |
74 } |
76 |
75 |
77 if ( mEffectlabel == NULL ) { |
76 if ( mEffectlabel == NULL ) { |
78 mEffectlabel = new HbLabel("Transition effect:", this); |
77 mEffectlabel = new HbLabel( GLX_LABEL_TRANSITION_EFFECT, this ); |
79 } |
78 } |
80 |
79 |
81 if ( mEffect == NULL ) { |
80 if ( mEffect == NULL ) { |
82 mEffect = new HbComboBox(this); |
81 mEffect = new HbComboBox(this); |
83 QStringList effectList = mSettings->slideShowEffectList(); |
82 QStringList effectList = mSettings->slideShowEffectList(); |
84 mEffect->addItems( effectList ); |
83 mEffect->addItems( effectList ); |
85 |
|
86 } |
84 } |
87 |
85 |
88 if ( mDelaylabel == NULL ) { |
86 if ( mDelaylabel == NULL ) { |
89 mDelaylabel = new HbLabel("Transition delay:", this); |
87 mDelaylabel = new HbLabel( GLX_LABEL_TRANSITION_DELAY, this ); |
90 } |
88 } |
91 |
89 |
92 if ( mDelay == NULL ) { |
90 if ( mDelay == NULL ) { |
93 mDelay = new HbComboBox(this); |
91 mDelay = new HbComboBox(this); |
94 QStringList delayList; |
92 QStringList delayList; |
95 delayList<<"slow"<<"medium"<<"fast"; |
93 delayList << GLX_VAL_SLOW << GLX_VAL_MEDIUM << GLX_VAL_FAST ; |
96 mDelay->addItems( delayList ); |
94 mDelay->addItems( delayList ); |
97 } |
95 } |
98 |
96 |
99 // Read the values from the cenrep |
97 // Read the values from the cenrep |
100 |
98 mEffect->setCurrentIndex( mSettings->slideShowEffectIndex() ); |
101 mEffect->setCurrentIndex( mSettings->slideShowEffectIndex()); |
99 mDelay->setCurrentIndex( mSettings->slideShowDelayIndex() ); |
102 mDelay->setCurrentIndex( mSettings->slideShowDelayIndex()); |
|
103 setLayout(); |
100 setLayout(); |
104 } |
101 } |
105 |
102 |
106 void GlxSlideShowSettingsView::setLayout() |
103 void GlxSlideShowSettingsView::setLayout() |
107 { |
104 { |
115 } |
112 } |
116 |
113 |
117 void GlxSlideShowSettingsView::deActivate() |
114 void GlxSlideShowSettingsView::deActivate() |
118 { |
115 { |
119 //Store the current effect and delay before going back to the previous view |
116 //Store the current effect and delay before going back to the previous view |
120 mSettings->setslideShowEffectIndex(mEffect->currentIndex()); |
117 mSettings->setslideShowEffectIndex( mEffect->currentIndex() ); |
121 mSettings->setSlideShowDelayIndex(mDelay->currentIndex()); |
118 mSettings->setSlideShowDelayIndex( mDelay->currentIndex() ); |
122 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation))); |
119 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation))); |
123 } |
120 } |
124 |
121 |
125 |
|
126 |
|