equal
deleted
inserted
replaced
311 break; |
311 break; |
312 } |
312 } |
313 } |
313 } |
314 } |
314 } |
315 |
315 |
316 void GlxViewManager::enterMarkingMode(qint32 viewId) |
316 void GlxViewManager::enterMarkingMode( qint32 viewId, qint32 commandId ) |
317 { |
317 { |
318 GlxView *view = findView ( viewId ); |
318 GlxView *view = findView ( viewId ); |
319 qDebug("GlxViewManager::enterMarkingMode view ID %d", viewId); |
319 qDebug("GlxViewManager::enterMarkingMode view ID %d", viewId); |
320 |
320 |
321 if ( mMarkingToolBar == NULL) { |
321 if ( !mMarkingToolBar ) { |
322 createMarkingModeToolBar(); //Marking mode tool bar is different from normal mode tool bar |
322 createMarkingModeToolBar(); //Marking mode tool bar is different from normal mode tool bar |
323 } |
323 } |
|
324 |
|
325 setMarkingToolBarAction( commandId ); |
324 |
326 |
325 if ( view ) { |
327 if ( view ) { |
326 view->enableMarking(); |
328 view->enableMarking(); |
327 view->takeToolBar(); |
329 view->takeToolBar(); |
328 view->addToolBar(mMarkingToolBar); |
330 view->addToolBar(mMarkingToolBar); |
334 } |
336 } |
335 } |
337 } |
336 qDebug("GlxViewManager::enterMarkingMode view ID %d exit", viewId); |
338 qDebug("GlxViewManager::enterMarkingMode view ID %d exit", viewId); |
337 } |
339 } |
338 |
340 |
339 void GlxViewManager::exitMarkingMode(qint32 viewId) |
341 void GlxViewManager::exitMarkingMode( qint32 viewId ) |
340 { |
342 { |
341 GlxView *view = findView ( viewId ); |
343 GlxView *view = findView ( viewId ); |
342 qDebug("GlxViewManager::exitMarkingMode view ID %d", viewId); |
344 qDebug("GlxViewManager::exitMarkingMode view ID %d", viewId); |
343 if ( view ) { |
345 if ( view ) { |
344 view->disableMarking(); |
346 view->disableMarking(); |
595 mMarkingToolBar->setVisible(true); |
597 mMarkingToolBar->setVisible(true); |
596 mMarkingToolBar->clearActions(); |
598 mMarkingToolBar->clearActions(); |
597 createMarkingModeActions(); |
599 createMarkingModeActions(); |
598 } |
600 } |
599 |
601 |
|
602 void GlxViewManager::setMarkingToolBarAction( qint32 commandId ) |
|
603 { |
|
604 switch( commandId ) { |
|
605 case EGlxCmdAddToAlbum : |
|
606 mMarkingActionList.at( 0 )->setText( GLX_BUTTON_ADD ); |
|
607 break; |
|
608 |
|
609 case EGlxCmdDelete : |
|
610 mMarkingActionList.at( 0 )->setText( GLX_BUTTON_DELETE ); |
|
611 break; |
|
612 |
|
613 case EGlxCmdRemoveFrom : |
|
614 mMarkingActionList.at( 0 )->setText( GLX_BUTTON_REMOVE ); |
|
615 break; |
|
616 |
|
617 case EGlxCmdSend : |
|
618 mMarkingActionList.at( 0 )->setText( GLX_BUTTON_SHARE ); |
|
619 break; |
|
620 |
|
621 default : |
|
622 mMarkingActionList.at( 0 )->setText( GLX_BUTTON_OK ); |
|
623 break; |
|
624 } |
|
625 } |
|
626 |
600 void GlxViewManager::addConnection() |
627 void GlxViewManager::addConnection() |
601 { |
628 { |
602 if ( mMenuManager ) |
629 if ( mMenuManager ) |
603 connect(mMenuManager, SIGNAL( commandTriggered(qint32 ) ), this, SLOT( handleMenuAction(qint32 ) )); |
630 connect(mMenuManager, SIGNAL( commandTriggered(qint32 ) ), this, SLOT( handleMenuAction(qint32 ) )); |
604 if ( mBackAction ) |
631 if ( mBackAction ) |