KActionCollection now can take QAction*.
svn path=/trunk/playground/utils/dolphin/; revision=611064
void DolphinMainWindow::setupDockWidgets()
{
QDockWidget *shortcutsDock = new QDockWidget(i18n("Shortcuts"));
void DolphinMainWindow::setupDockWidgets()
{
QDockWidget *shortcutsDock = new QDockWidget(i18n("Shortcuts"));
shortcutsDock->setObjectName("shortcutsDock");
shortcutsDock->setObjectName("shortcutsDock");
- shortcutsDock->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
shortcutsDock->setWidget(new BookmarksSidebarPage(this));
shortcutsDock->setWidget(new BookmarksSidebarPage(this));
+
+ shortcutsDock->toggleViewAction()->setObjectName("show_shortcuts_pane");
+ shortcutsDock->toggleViewAction()->setText(i18n("Show Shortcuts Panel"));
+ actionCollection()->insert(shortcutsDock->toggleViewAction());
+
addDockWidget(Qt::LeftDockWidgetArea, shortcutsDock);
QDockWidget *infoDock = new QDockWidget(i18n("Information"));
addDockWidget(Qt::LeftDockWidgetArea, shortcutsDock);
QDockWidget *infoDock = new QDockWidget(i18n("Information"));
infoDock->setObjectName("infoDock");
infoDock->setObjectName("infoDock");
- infoDock->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable);
infoDock->setWidget(new InfoSidebarPage(this));
infoDock->setWidget(new InfoSidebarPage(this));
+
+ infoDock->toggleViewAction()->setObjectName("show_info_pane");
+ infoDock->toggleViewAction()->setText(i18n("Show Information Panel"));
+ actionCollection()->insert(infoDock->toggleViewAction());
+
addDockWidget(Qt::RightDockWidgetArea, infoDock);
}
addDockWidget(Qt::RightDockWidgetArea, infoDock);
}
<Action name="editable_location" />
<Action name="edit_location" />
</Menu>
<Action name="editable_location" />
<Action name="edit_location" />
</Menu>
+ <Action name="show_shortcuts_pane" />
+ <Action name="show_info_pane" />
+ <Separator/>
<Action name="view_properties" />
</Menu>
<Menu name="tools">
<Action name="view_properties" />
</Menu>
<Menu name="tools">