66 // mFindWidget->activeSearchPanel(); |
68 // mFindWidget->activeSearchPanel(); |
67 } |
69 } |
68 |
70 |
69 void FmFindView::initMenu() |
71 void FmFindView::initMenu() |
70 { |
72 { |
71 HbMenu *subMenu = new HbMenu( "Sort" ); |
73 HbAction *findAction = new HbAction( this ); |
|
74 findAction->setObjectName( "findAction" ); |
|
75 findAction->setText( hbTrId( "Find" ) ); |
|
76 menu()->addAction( findAction ); |
|
77 |
|
78 HbMenu *subMenu = new HbMenu( hbTrId( "Sort" ) ); |
72 |
79 |
73 HbAction *sortNameAction = new HbAction( subMenu ); |
80 HbAction *sortNameAction = new HbAction( subMenu ); |
74 sortNameAction->setObjectName( "sortNameAction" ); |
81 sortNameAction->setObjectName( "sortNameAction" ); |
75 sortNameAction->setText( tr( "Sort by name" ) ); |
82 sortNameAction->setText( hbTrId( "Sort by name" ) ); |
76 subMenu->addAction( sortNameAction ); |
83 subMenu->addAction( sortNameAction ); |
77 |
84 |
78 HbAction *sortTimeAction = new HbAction( subMenu ); |
85 HbAction *sortTimeAction = new HbAction( subMenu ); |
79 sortTimeAction->setObjectName( "sortTimeAction" ); |
86 sortTimeAction->setObjectName( "sortTimeAction" ); |
80 sortTimeAction->setText( tr( "Sort by time" ) ); |
87 sortTimeAction->setText( hbTrId( "Sort by time" ) ); |
81 subMenu->addAction( sortTimeAction ); |
88 subMenu->addAction( sortTimeAction ); |
82 |
89 |
83 HbAction *sortSizeAction = new HbAction( subMenu ); |
90 HbAction *sortSizeAction = new HbAction( subMenu ); |
84 sortSizeAction->setObjectName( "sortSizeAction" ); |
91 sortSizeAction->setObjectName( "sortSizeAction" ); |
85 sortSizeAction->setText( tr( "Sort by size" ) ); |
92 sortSizeAction->setText( hbTrId( "Sort by size" ) ); |
86 subMenu->addAction( sortSizeAction ); |
93 subMenu->addAction( sortSizeAction ); |
87 |
94 |
88 HbAction *sortTypeAction = new HbAction( subMenu ); |
95 HbAction *sortTypeAction = new HbAction( subMenu ); |
89 sortTypeAction->setObjectName( "sortTypeAction" ); |
96 sortTypeAction->setObjectName( "sortTypeAction" ); |
90 sortTypeAction->setText( tr( "Sort by type" ) ); |
97 sortTypeAction->setText( hbTrId( "Sort by type" ) ); |
91 subMenu->addAction( sortTypeAction ); |
98 subMenu->addAction( sortTypeAction ); |
92 |
99 |
93 menu()->addMenu( subMenu ); |
100 menu()->addMenu( subMenu ); |
94 |
101 |
|
102 connect( findAction, SIGNAL( triggered() ), |
|
103 this, SLOT( on_findAction_triggered() ) ); |
95 connect( sortNameAction, SIGNAL( triggered() ), |
104 connect( sortNameAction, SIGNAL( triggered() ), |
96 this, SLOT( on_sortNameAction_triggered() ) ); |
105 this, SLOT( on_sortNameAction_triggered() ) ); |
97 connect( sortTimeAction, SIGNAL( triggered() ), |
106 connect( sortTimeAction, SIGNAL( triggered() ), |
98 this, SLOT( on_sortTimeAction_triggered() ) ); |
107 this, SLOT( on_sortTimeAction_triggered() ) ); |
99 connect( sortSizeAction, SIGNAL( triggered() ), |
108 connect( sortSizeAction, SIGNAL( triggered() ), |
100 this, SLOT( on_sortSizeAction_triggered() ) ); |
109 this, SLOT( on_sortSizeAction_triggered() ) ); |
101 connect( sortTypeAction, SIGNAL( triggered() ), |
110 connect( sortTypeAction, SIGNAL( triggered() ), |
102 this, SLOT( on_sortTypeAction_triggered() ) ); |
111 this, SLOT( on_sortTypeAction_triggered() ) ); |
|
112 |
|
113 mMenu = takeMenu(); |
103 } |
114 } |
104 |
115 |
105 void FmFindView::initMainWidget() |
116 void FmFindView::initMainWidget() |
106 { |
117 { |
107 mFindWidget = new FmFindWidget( this ); |
118 mFindWidget = new FmFindWidget( this ); |
108 connect( mFindWidget, SIGNAL(finished()), this, SLOT(findFinished()) ); |
119 connect( mFindWidget, SIGNAL(finished()), this, SLOT(findFinished()) ); |
109 setWidget( mFindWidget ); |
120 setWidget( mFindWidget ); |
110 |
121 |
111 if( !mWaitNote ){ |
122 if( !mWaitNote ){ |
112 mWaitNote = new HbProgressNote( HbProgressNote::WaitNote ); |
123 mWaitNote = new HbProgressDialog( HbProgressDialog::WaitDialog ); |
113 mWaitNote->setText( tr( "Finding..." ) ); |
124 mWaitNote->setText( hbTrId( "Finding..." ) ); |
114 } |
125 } |
115 connect( mWaitNote, SIGNAL(cancelled()), this, SLOT(stopFind()) ); |
126 connect( mWaitNote, SIGNAL(cancelled()), this, SLOT(stopFind()) ); |
116 connect( mFindWidget, SIGNAL(activated( const QString&)), this, SLOT( activated(const QString&)) ); |
127 connect( mFindWidget, SIGNAL(activated( const QString&)), this, SLOT( activated(const QString&)) ); |
117 connect( mFindWidget, SIGNAL( startSearch( const QString&, const QString& ) ), |
128 connect( mFindWidget, SIGNAL( startSearch( const QString&, const QString& ) ), |
118 this, SLOT( startSearch( const QString&, const QString& ) ) ); |
129 this, SLOT( startSearch( const QString&, const QString& ) ) ); |
|
130 connect( mFindWidget, SIGNAL( setEmptyMenu( bool ) ), |
|
131 this, SLOT( on_findWidget_setEmptyMenu( bool ) ) ); |
119 } |
132 } |
120 |
133 |
121 void FmFindView::initToolBar() |
134 void FmFindView::initToolBar() |
122 { |
135 { |
123 } |
136 } |