equal
deleted
inserted
replaced
55 } |
55 } |
56 |
56 |
57 void GlxListView::deActivate() |
57 void GlxListView::deActivate() |
58 { |
58 { |
59 qDebug("GlxListView::deActivate()"); |
59 qDebug("GlxListView::deActivate()"); |
60 disconnect(mWindow, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChanged(Qt::Orientation))); |
|
61 } |
60 } |
62 |
61 |
63 void GlxListView::setModel(QAbstractItemModel *model) |
62 void GlxListView::setModel(QAbstractItemModel *model) |
64 { |
63 { |
65 qDebug("GlxListView::setModel()"); |
64 qDebug("GlxListView::setModel()"); |
74 void GlxListView::addToolBar( HbToolBar *toolBar ) |
73 void GlxListView::addToolBar( HbToolBar *toolBar ) |
75 { |
74 { |
76 setToolBar(toolBar) ; |
75 setToolBar(toolBar) ; |
77 } |
76 } |
78 |
77 |
79 void GlxListView::initializeView(QAbstractItemModel *model) |
78 void GlxListView::initializeView( QAbstractItemModel *model, GlxView *preView ) |
80 { |
79 { |
|
80 Q_UNUSED( preView ) |
81 qDebug("GlxListView::initializeView()"); |
81 qDebug("GlxListView::initializeView()"); |
82 if (mListView == NULL) { |
82 if ( mListView == NULL ) { |
83 createListView(); |
83 createListView(); |
84 } |
84 } |
85 setModel(model); |
85 setModel( model ); |
86 } |
86 } |
87 |
87 |
88 QGraphicsItem * GlxListView::getAnimationItem( GlxEffect transtionEffect ) |
88 QGraphicsItem * GlxListView::getAnimationItem( GlxEffect transtionEffect ) |
89 { |
89 { |
90 if ( transtionEffect == GRID_TO_ALBUMLIST || transtionEffect == ALBUMLIST_TO_GRID ) { |
90 if ( transtionEffect == GRID_TO_ALBUMLIST || transtionEffect == ALBUMLIST_TO_GRID ) { |
203 return ; |
203 return ; |
204 } |
204 } |
205 if ( mModel ) { |
205 if ( mModel ) { |
206 mModel->setData( index, index.row(), GlxFocusIndexRole ); |
206 mModel->setData( index, index.row(), GlxFocusIndexRole ); |
207 } |
207 } |
208 emit actionTriggered( EGlxCmdAlbumGridOpen ); |
208 |
|
209 int curstate = NO_LIST_S; |
|
210 qDebug() << "GlxListView::itemSelected READING STATE "; |
|
211 QVariant variant = mModel->data( mModel->index(0,0), GlxSubStateRole ); |
|
212 if ( variant.isValid() && variant.canConvert<int> () ) { |
|
213 curstate = variant.value<int>(); |
|
214 } |
|
215 qDebug() << "GlxMenuManager::viewSubState = " << curstate ; |
|
216 if(curstate == FETCHER_ALBUM_S ){ |
|
217 emit actionTriggered( EGlxCmdFetcherAlbumGridOpen ); |
|
218 }else { |
|
219 emit actionTriggered( EGlxCmdAlbumGridOpen ); |
|
220 } |
209 } |
221 } |
210 |
222 |
211 |
223 |
212 void GlxListView::indicateLongPress(HbAbstractViewItem *item, QPointF coords) |
224 void GlxListView::indicateLongPress(HbAbstractViewItem *item, QPointF coords) |
213 { |
225 { |