ui: added shortcut and menu item for "To overview" and updated documentation
This commit is contained in:
@@ -24,7 +24,7 @@ QtSearchBar::QtSearchBar()
|
||||
|
||||
m_homeButton = new QPushButton(this);
|
||||
m_homeButton->setObjectName("home_button");
|
||||
m_homeButton->setToolTip("show overview");
|
||||
m_homeButton->setToolTip("to overview");
|
||||
m_homeButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||
layout->addWidget(m_homeButton);
|
||||
connect(m_homeButton, SIGNAL(clicked()), this, SLOT(homeButtonClicked()));
|
||||
@@ -112,7 +112,5 @@ void QtSearchBar::refreshStyle()
|
||||
|
||||
void QtSearchBar::homeButtonClicked()
|
||||
{
|
||||
SearchMatch match = SearchMatch::createCommand(SearchMatch::COMMAND_ALL);
|
||||
MessageSearch msg(std::vector<SearchMatch>(1, match));
|
||||
msg.dispatch();
|
||||
MessageSearch(std::vector<SearchMatch>(1, SearchMatch::createCommand(SearchMatch::COMMAND_ALL))).dispatch();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "utility/messaging/type/MessageRefresh.h"
|
||||
#include "utility/messaging/type/MessageResetZoom.h"
|
||||
#include "utility/messaging/type/MessageSaveProject.h"
|
||||
#include "utility/messaging/type/MessageSearch.h"
|
||||
#include "utility/messaging/type/MessageSwitchColorScheme.h"
|
||||
#include "utility/messaging/type/MessageUndo.h"
|
||||
#include "utility/messaging/type/MessageWindowFocus.h"
|
||||
@@ -400,6 +401,11 @@ void QtMainWindow::find()
|
||||
MessageFind().dispatch();
|
||||
}
|
||||
|
||||
void QtMainWindow::overview()
|
||||
{
|
||||
MessageSearch(std::vector<SearchMatch>(1, SearchMatch::createCommand(SearchMatch::COMMAND_ALL))).dispatch();
|
||||
}
|
||||
|
||||
void QtMainWindow::closeWindow()
|
||||
{
|
||||
QApplication* app = dynamic_cast<QApplication*>(QCoreApplication::instance());
|
||||
@@ -604,6 +610,10 @@ void QtMainWindow::setupEditMenu()
|
||||
}
|
||||
|
||||
menu->addAction(tr("&Find"), this, SLOT(find()), QKeySequence::Find);
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
menu->addAction(tr("&To overview"), this, SLOT(overview()), QKeySequence::MoveToStartOfDocument);
|
||||
}
|
||||
|
||||
void QtMainWindow::setupViewMenu()
|
||||
|
||||
@@ -118,6 +118,8 @@ public slots:
|
||||
void openRecentProject();
|
||||
|
||||
void find();
|
||||
void overview();
|
||||
|
||||
void closeWindow();
|
||||
void refresh();
|
||||
void forceRefresh();
|
||||
|
||||
Reference in New Issue
Block a user