ui: added shortcut and menu item for "To overview" and updated documentation

This commit is contained in:
Eberhard Graether
2016-04-13 13:45:39 +02:00
parent ad8abd9182
commit 8d2709a2ad
7 changed files with 42 additions and 6 deletions
@@ -24,6 +24,7 @@ QLineEdit#search_box {
background-color: transparent;
border: none;
color: <color:search/field/text>;
margin-left: 5px;
selection-background-color: <color:search/field/highlight>;
}
+2 -4
View File
@@ -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();
}
+10
View File
@@ -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()
+2
View File
@@ -118,6 +118,8 @@ public slots:
void openRecentProject();
void find();
void overview();
void closeWindow();
void refresh();
void forceRefresh();
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

+27 -2
View File
@@ -213,7 +213,7 @@
<h3>Search Field</h3>
<p>The <a href="#Searchbar">search field</a> allows for easy access to all analyzed symbols. Use it to find all the classes and functions you wish to investigate. Apart from that is also holds the UI buttons for navigating <a href="#Back&Forward">back & forward</a> as well as <a href="#Refresh">refreshing</a>.</p>
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<div class="col-sm-10 col-sm-offset-1">
<img src="img/search_view.png" style="width:100%;">
</div>
</div>
@@ -788,6 +788,13 @@
<li>This option will put the focus into the search field, so you can start typing your search query. Alternatively you can click the search field.</li>
</ul>
</li>
<li>
<strong>To overview</strong>
<ul>
<li>Shortcut: <a href="#Shortcuts">To overview</a></li>
<li>This option will display the overview of the project.</li>
</ul>
</li>
</ul>
<h4>View</h4>
@@ -953,6 +960,12 @@
<td><kbd><kbd>Cmd</kbd> + <kbd>F</kbd></kbd></td>
<td><kbd><kbd>Ctrl</kbd> + <kbd>F</kbd></kbd></td>
</tr>
<tr>
<th scope="row">To overview</th>
<td><kbd><kbd>Ctrl</kbd> + <kbd>HOME</kbd></kbd></td>
<td><kbd><kbd>Cmd</kbd> + <kbd>HOME</kbd></kbd></td>
<td><kbd><kbd>Ctrl</kbd> + <kbd>HOME</kbd></kbd></td>
</tr>
<tr>
<th scope="row">Larger Font</th>
<td><kbd><kbd>Ctrl</kbd> + <kbd>+</kbd></kbd></td>
@@ -1110,7 +1123,7 @@
<h2>Search View</h2>
<p>The Search View contains the search field and some other related user interface elements.</p>
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<div class="col-sm-10 col-sm-offset-1">
<img src="img/search_view.png" style="width:100%;">
</div>
</div>
@@ -1142,6 +1155,18 @@
<li>Press the right auto refresh button to toggle automatic refreshing.</li>
</ul>
<h3>Overview button</h3>
<p>Show the overview screen, which gives a summary of the loaded project. The overview screen is shown after the project was loaded. Alternatively use the shortcut <a href="#Shortcuts">To overview</a>.</p>
<div class="row">
<div class="col-sm-2 col-sm-offset-5">
<img src="img/overview_button.png" style="width:100%;">
</div>
</div>
<strong>Interactions:</strong>
<ul>
<li>Press the overview button to show the project overview.</li>
</ul>
<h3>Search bar</h3>
<p>The search bar allows you to enter search requests to find one of Coati's analyzed symbols. It doesn't allow for full text searching across all files so far. The search field allows for most text editing interactions common to text fields. When typing your request the <a href="#AutocompletionPopup">Autocompletion Popup</a> will show you search results matching to your entered string.</p>
<div class="row">