diff --git a/bin/app/data/gui/search_view/search_view.css b/bin/app/data/gui/search_view/search_view.css index f1188517..38084eae 100644 --- a/bin/app/data/gui/search_view/search_view.css +++ b/bin/app/data/gui/search_view/search_view.css @@ -24,6 +24,7 @@ QLineEdit#search_box { background-color: transparent; border: none; color: ; + margin-left: 5px; selection-background-color: ; } diff --git a/src/lib_gui/qt/element/QtSearchBar.cpp b/src/lib_gui/qt/element/QtSearchBar.cpp index eb72fe93..a2fef5e0 100644 --- a/src/lib_gui/qt/element/QtSearchBar.cpp +++ b/src/lib_gui/qt/element/QtSearchBar.cpp @@ -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(1, match)); - msg.dispatch(); + MessageSearch(std::vector(1, SearchMatch::createCommand(SearchMatch::COMMAND_ALL))).dispatch(); } diff --git a/src/lib_gui/qt/window/QtMainWindow.cpp b/src/lib_gui/qt/window/QtMainWindow.cpp index b30a215f..419a7004 100644 --- a/src/lib_gui/qt/window/QtMainWindow.cpp +++ b/src/lib_gui/qt/window/QtMainWindow.cpp @@ -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(1, SearchMatch::createCommand(SearchMatch::COMMAND_ALL))).dispatch(); +} + void QtMainWindow::closeWindow() { QApplication* app = dynamic_cast(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() diff --git a/src/lib_gui/qt/window/QtMainWindow.h b/src/lib_gui/qt/window/QtMainWindow.h index d77a4dc0..a0690232 100644 --- a/src/lib_gui/qt/window/QtMainWindow.h +++ b/src/lib_gui/qt/window/QtMainWindow.h @@ -118,6 +118,8 @@ public slots: void openRecentProject(); void find(); + void overview(); + void closeWindow(); void refresh(); void forceRefresh(); diff --git a/web/documentation/img/overview_button.png b/web/documentation/img/overview_button.png new file mode 100644 index 00000000..2679c51c Binary files /dev/null and b/web/documentation/img/overview_button.png differ diff --git a/web/documentation/img/search_view.png b/web/documentation/img/search_view.png index 883a08db..da4bbde3 100644 Binary files a/web/documentation/img/search_view.png and b/web/documentation/img/search_view.png differ diff --git a/web/documentation/index.html b/web/documentation/index.html index 003a2578..be8d19e8 100644 --- a/web/documentation/index.html +++ b/web/documentation/index.html @@ -213,7 +213,7 @@

Search Field

The search field 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 back & forward as well as refreshing.

-
+
@@ -788,6 +788,13 @@
  • 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.
  • +
  • + To overview +
      +
    • Shortcut: To overview
    • +
    • This option will display the overview of the project.
    • +
    +
  • View

    @@ -953,6 +960,12 @@ Cmd + F Ctrl + F + + To overview + Ctrl + HOME + Cmd + HOME + Ctrl + HOME + Larger Font Ctrl + + @@ -1110,7 +1123,7 @@

    Search View

    The Search View contains the search field and some other related user interface elements.

    -
    +
    @@ -1142,6 +1155,18 @@
  • Press the right auto refresh button to toggle automatic refreshing.
  • +

    Overview button

    +

    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 To overview.

    +
    +
    + +
    +
    + Interactions: +
      +
    • Press the overview button to show the project overview.
    • +
    +

    Search bar

    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 Autocompletion Popup will show you search results matching to your entered string.