-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP left menu bar wit tools & short cuts.
- Loading branch information
Showing
22 changed files
with
325 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
left_toolbar_view.cpp MindForger thinking notebook | ||
Copyright (C) 2016-2023 Martin Dvorak <[email protected]> | ||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU General Public License | ||
as published by the Free Software Foundation; either version 2 | ||
of the License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include "left_toolbar_view.h" | ||
|
||
namespace m8r { | ||
|
||
LeftToolbarView::LeftToolbarView(MainWindowView* mainWindowView) | ||
: QToolBar{tr("Tool Bar"), mainWindowView}, | ||
mainWindow{mainWindowView} | ||
{ | ||
actionLeftToolbarArxiv = addAction( | ||
QIcon(":/icons/arxiv.png"), | ||
"Open arXiv and find papers related to the current context... (Alt-1)"); | ||
|
||
actionLeftToolbarWikipedia = addAction( | ||
QIcon(":/icons/wikipedia.png"), | ||
"Open Wikipedia and find entry related to the current context... (Alt-2)"); | ||
|
||
actionLeftToolbarStackOverflow = addAction( | ||
QIcon(":/icons/stackoverflow.png"), | ||
"Open StackOverflow and find entry related to the current context... (Alt-3)"); | ||
|
||
actionLeftToolbarH2oGpt= addAction( | ||
QIcon(":/icons/h2oai.png"), | ||
"Open h2oGPT and chat about entry related to the current context... (Alt-4)"); | ||
|
||
actionLeftToolbarDuckDuckGo = addAction( | ||
QIcon(":/icons/duckduckgo.png"), | ||
"Open DuckDuckGo and find entry related to the current context... (Alt-5)"); | ||
|
||
// TODO "Open DuckDuckGo and search web for the selected entity..." | ||
|
||
// TODO "Let chatGPT to explaine in simple terms..." | ||
// TODO "Use Gramarly to check to grammar..." | ||
// TODO "Use Pandoc to convert MindForger's Markdown documents..." | ||
// TODO "Build your web with MindForger's Markdown documents and Docusaurus..." | ||
|
||
} | ||
|
||
LeftToolbarView::~LeftToolbarView() | ||
{ | ||
} | ||
|
||
} // m8r namespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
left_toolbar_view.h MindForger thinking notebook | ||
Copyright (C) 2016-2023 Martin Dvorak <[email protected]> | ||
This program is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU General Public License | ||
as published by the Free Software Foundation; either version 2 | ||
of the License, or (at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#ifndef M8RUI_LEFT_TOOLBAR_VIEW_H | ||
#define M8RUI_LEFT_TOOLBAR_VIEW_H | ||
|
||
#include <QtWidgets> | ||
|
||
#include "main_window_view.h" | ||
|
||
namespace m8r { | ||
|
||
class MainWindowView; | ||
|
||
class LeftToolbarView : public QToolBar | ||
{ | ||
Q_OBJECT | ||
|
||
MainWindowView* mainWindow; | ||
|
||
public: | ||
QAction* actionLeftToolbarArxiv; | ||
QAction* actionLeftToolbarWikipedia; | ||
QAction* actionLeftToolbarStackOverflow; | ||
QAction* actionLeftToolbarH2oGpt; | ||
QAction* actionLeftToolbarDuckDuckGo; | ||
|
||
// IMPORTANT: hide event hidden as it was causing undesired configuration | ||
// changes and toolbar hiding on Qt's spontaneous hide/show events. Citation | ||
// from Qt doc: | ||
// | ||
// "Note: A widget receives spontaneous show and hide events when its mapping | ||
// status is changed by the window system, e.g. a spontaneous hide event when | ||
// the user minimizes the window, and a spontaneous show event when the window | ||
// is restored again. After receiving a spontaneous hide event, a widget is | ||
// still considered visible in the sense of isVisible()." | ||
// | ||
// Even use of this->isVisible() within the event didn't fixed the problem. | ||
// | ||
// @see https://github.com/dvorka/mindforger/issues/1437 | ||
// | ||
// void hideEvent(QHideEvent *) override; | ||
|
||
public: | ||
explicit LeftToolbarView(MainWindowView* mainWindowView); | ||
LeftToolbarView(const LeftToolbarView&) = delete; | ||
LeftToolbarView(const LeftToolbarView&&) = delete; | ||
LeftToolbarView &operator=(const LeftToolbarView&) = delete; | ||
LeftToolbarView &operator=(const LeftToolbarView&&) = delete; | ||
~LeftToolbarView(); | ||
|
||
signals: | ||
void signalLeftToolbarVisibilityChanged(bool visibility); | ||
}; | ||
|
||
} | ||
#endif // M8RUI_LEFT_TOOLBAR_VIEW_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.