Add menu action to toggle toolbar visibility.

Closes #31
This commit is contained in:
Florian Geyer 2012-06-25 00:21:22 +02:00
parent dad4376030
commit 900beae046
2 changed files with 9 additions and 1 deletions

View File

@ -33,7 +33,9 @@ MainWindow::MainWindow()
m_ui->setupUi(this);
setWindowIcon(dataPath()->applicationIcon());
m_ui->toolBar->toggleViewAction()->setText(tr("Show toolbar"));
QAction* toggleViewAction = m_ui->toolBar->toggleViewAction();
toggleViewAction->setText(tr("Show toolbar"));
m_ui->menuView->addAction(toggleViewAction);
setShortcut(m_ui->actionDatabaseOpen, QKeySequence::Open, Qt::CTRL + Qt::Key_O);
setShortcut(m_ui->actionDatabaseSave, QKeySequence::Save, Qt::CTRL + Qt::Key_S);

View File

@ -121,9 +121,15 @@
</property>
<addaction name="actionSettings"/>
</widget>
<widget class="QMenu" name="menuView">
<property name="title">
<string>View</string>
</property>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEntries"/>
<addaction name="menuGroups"/>
<addaction name="menuView"/>
<addaction name="menuExtras"/>
<addaction name="menuHelp"/>
</widget>