49 void FmBackupView::initMenu() |
48 void FmBackupView::initMenu() |
50 { |
49 { |
51 HbAction *action = 0; |
50 HbAction *action = 0; |
52 |
51 |
53 #ifdef FM_CHANGE_ORIENT_ENABLE |
52 #ifdef FM_CHANGE_ORIENT_ENABLE |
54 action = new HbAction( this ); |
53 action = new HbAction( this ); |
55 action->setObjectName( "rotateAction" ); |
54 action->setObjectName( "rotateAction" ); |
56 action->setText( hbTrId( "Change orientation" ) ); |
55 action->setText( hbTrId( "Change orientation" ) ); |
57 menu()->addAction( action ); |
56 menu()->addAction( action ); |
|
57 connect( action, SIGNAL(triggered()), this, SLOT( on_rotateAction_triggered() ), Qt::QueuedConnection ); |
58 #endif |
58 #endif |
59 |
59 |
60 action = new HbAction( this ); |
60 action = new HbAction( this ); |
61 action->setObjectName( "backupAction" ); |
61 action->setObjectName( "backupAction" ); |
62 action->setText( hbTrId( "Start backup" ) ); |
62 action->setText( hbTrId( "Start backup" ) ); |
63 menu()->addAction( action ); |
63 menu()->addAction( action ); |
|
64 connect( action, SIGNAL(triggered()), this, SLOT( on_backupAction_triggered() ), Qt::QueuedConnection ); |
64 |
65 |
65 action = new HbAction( this ); |
66 action = new HbAction( this ); |
66 action->setObjectName( "deleteBackupAction" ); |
67 action->setObjectName( "deleteBackupAction" ); |
67 action->setText( hbTrId( "Delete backup" ) ); |
68 action->setText( hbTrId( "Delete backup" ) ); |
68 menu()->addAction( action ); |
69 menu()->addAction( action ); |
69 |
70 connect( action, SIGNAL(triggered()), this, SLOT( on_deleteBackupAction_triggered() ), Qt::QueuedConnection ); |
70 } |
71 } |
71 |
72 |
72 void FmBackupView::initMainWidget() |
73 void FmBackupView::initMainWidget() |
73 { |
74 { |
74 mMainWidget = new FmBackupWidget( this ); |
75 mMainWidget = new FmBackupWidget( this ); |
75 setWidget( mMainWidget ); |
76 setWidget( mMainWidget ); |
76 |
77 |
77 } |
78 } |
78 |
79 |
79 void FmBackupView::initToolBar() |
80 void FmBackupView::initToolBar() |
80 { |
81 { |
81 mToolBarAction = new HbAction( this ); |
82 mToolBarAction = new HbAction( this ); |
82 mToolBarAction->setObjectName( "leftAction" ); |
83 mToolBarAction->setObjectName( "leftAction" ); |
83 mToolBarAction->setText( hbTrId("Start backup") ); |
84 mToolBarAction->setText( hbTrId("Start backup") ); |
84 toolBar()->addAction( mToolBarAction ); |
85 toolBar()->addAction( mToolBarAction ); |
|
86 connect( mToolBarAction, SIGNAL(triggered()), this, SLOT( on_leftAction_triggered() ), Qt::QueuedConnection ); |
85 |
87 |
86 toolBar()->setOrientation( Qt::Horizontal ); |
88 toolBar()->setOrientation( Qt::Horizontal ); |
87 } |
89 } |
88 |
90 |
89 void FmBackupView::on_leftAction_triggered() |
91 void FmBackupView::on_leftAction_triggered() |
90 { |
92 { |
91 int ret = mOperationService->asyncBackup(); |
93 int ret = mOperationService->asyncBackup(); |
92 FmLogger::log( "FmBackupView_asyncBackup: ret= " + QString::number(ret) ); |
94 FM_LOG( "FmBackupView_asyncBackup: ret= " + QString::number(ret) ); |
93 switch( ret ) |
95 switch( ret ) |
94 { |
96 { |
95 case FmErrNone: |
97 case FmErrNone: |
96 break; |
98 break; |
97 case FmErrWrongParam: |
99 case FmErrWrongParam: |