--- a/filemanager/src/fmfiledialog/src/fmfiledialog.cpp Fri May 14 15:42:43 2010 +0300
+++ b/filemanager/src/fmfiledialog/src/fmfiledialog.cpp Thu May 27 12:45:43 2010 +0300
@@ -152,3 +152,55 @@
d_ptr->setRetAction( action );
d_ptr->eventLoop().exit();
}
+
+
+HbAction *FmFileDialog::primaryAction() const
+{
+ QList<QAction *> actionList = QGraphicsWidget::actions();
+ if (actionList.size() > 0) {
+ return (HbAction *)(actionList.at(0));
+ } else {
+ return 0;
+ }
+
+}
+
+void FmFileDialog::setPrimaryAction( HbAction *action )
+{
+ QList<QAction *> actionList = QGraphicsWidget::actions();
+ if (actionList.size() == 0) {
+ QGraphicsWidget::addAction(action);
+ } else if (actionList.size() == 1) {
+ actionList.clear();
+ QGraphicsWidget::addAction(action);
+ } else if (actionList.size() == 2) {
+ actionList.removeAt(0);
+ actionList.insert(0, action);
+ }
+}
+
+HbAction *FmFileDialog::secondaryAction() const
+{
+ QList<QAction *> actionList = QGraphicsWidget::actions();
+ if (actionList.size() > 1) {
+ return (HbAction *)(actionList.at(1));
+ } else {
+ return 0;
+ }
+}
+
+void FmFileDialog::setSecondaryAction( HbAction *action )
+{
+ QList<QAction *> actionList = QGraphicsWidget::actions();
+ if (actionList.size() == 0) {
+ QGraphicsWidget::addAction(new HbAction(hbTrId("Ok")));
+ QGraphicsWidget::addAction(action);
+ } else if (actionList.size() == 1) {
+ QGraphicsWidget::addAction(action);
+ } else if (actionList.size() == 2) {
+ actionList.removeAt(1);
+ actionList.insert(1, action);
+ }
+
+}
+