Skip to content

Commit

Permalink
Tool bar widget: moved it to its own plugin (#2413).
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Nov 2, 2020
1 parent b656bce commit 3f06d1d
Show file tree
Hide file tree
Showing 15 changed files with 641 additions and 355 deletions.
Expand Up @@ -25,6 +25,7 @@ along with this program. If not, see <https://gnu.org/licenses>.
#include "coreguiutils.h"
#include "progressbarwidget.h"
#include "toolbarwidget.h"
#include "toolbarwidgetlineeditwidgetaction.h"
#include "webbrowserwindowwidget.h"
#include "webbrowserwindowwindow.h"

Expand Down Expand Up @@ -89,9 +90,9 @@ WebBrowserWindowWindow::WebBrowserWindowWindow(QWidget *pParent) :

mUrlValueAction = topToolBarWidget->addLineEditWidgetAction();

connect(mUrlValueAction, &ToolBarWidget::ToolBarLineEditWidgetAction::created,
connect(mUrlValueAction, &ToolBarWidget::ToolBarWidgetLineEditWidgetAction::created,
this, &WebBrowserWindowWindow::urlValueCreated);
connect(mUrlValueAction, &ToolBarWidget::ToolBarLineEditWidgetAction::returnPressed,
connect(mUrlValueAction, &ToolBarWidget::ToolBarWidgetLineEditWidgetAction::returnPressed,
this, &WebBrowserWindowWindow::urlValueReturnPressed);

topToolBarWidget->addAction(mGui->actionReload);
Expand Down
Expand Up @@ -45,7 +45,7 @@ namespace OpenCOR {
//==============================================================================

namespace ToolBarWidget {
class ToolBarLineEditWidgetAction;
class ToolBarWidgetLineEditWidgetAction;
} // namespace ToolBarWidget

//==============================================================================
Expand Down Expand Up @@ -78,7 +78,7 @@ class WebBrowserWindowWindow : public Core::WindowWidget

QMenu *mContextMenu;

ToolBarWidget::ToolBarLineEditWidgetAction *mUrlValueAction;
ToolBarWidget::ToolBarWidgetLineEditWidgetAction *mUrlValueAction;
QString mUrlValue;

void loadUrl(const QString &pUrl);
Expand Down
8 changes: 5 additions & 3 deletions src/plugins/organisation/PMRWindow/src/pmrwindowwindow.cpp
Expand Up @@ -31,6 +31,8 @@ along with this program. If not, see <https://gnu.org/licenses>.
#include "pmrwindowwindow.h"
#include "preferencesinterface.h"
#include "toolbarwidget.h"
#include "toolbarwidgetlabelwidgetaction.h"
#include "toolbarwidgetlineeditwidgetaction.h"

//==============================================================================

Expand Down Expand Up @@ -71,14 +73,14 @@ PmrWindowWindow::PmrWindowWindow(QWidget *pParent) :

mFilterLabelAction = toolBarWidget->addLabelWidgetAction();

connect(mFilterLabelAction, &ToolBarWidget::ToolBarLabelWidgetAction::created,
connect(mFilterLabelAction, &ToolBarWidget::ToolBarWidgetLabelWidgetAction::created,
this, &PmrWindowWindow::filterLabelCreated);

mFilterValueAction = toolBarWidget->addLineEditWidgetAction();

connect(mFilterValueAction, &ToolBarWidget::ToolBarLineEditWidgetAction::created,
connect(mFilterValueAction, &ToolBarWidget::ToolBarWidgetLineEditWidgetAction::created,
this, &PmrWindowWindow::filterValueCreated);
connect(mFilterValueAction, &ToolBarWidget::ToolBarLineEditWidgetAction::textChanged,
connect(mFilterValueAction, &ToolBarWidget::ToolBarWidgetLineEditWidgetAction::textChanged,
this, &PmrWindowWindow::filterValueTextChanged);

toolBarWidget->addAction(mGui->actionReload);
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/organisation/PMRWindow/src/pmrwindowwindow.h
Expand Up @@ -54,8 +54,8 @@ namespace PMRSupport {
//==============================================================================

namespace ToolBarWidget {
class ToolBarLabelWidgetAction;
class ToolBarLineEditWidgetAction;
class ToolBarWidgetLabelWidgetAction;
class ToolBarWidgetLineEditWidgetAction;
} // namespace ToolBarWidget

//==============================================================================
Expand Down Expand Up @@ -86,8 +86,8 @@ class PmrWindowWindow : public Core::OrganisationWidget
private:
Ui::PmrWindowWindow *mGui;

ToolBarWidget::ToolBarLabelWidgetAction *mFilterLabelAction;
ToolBarWidget::ToolBarLineEditWidgetAction *mFilterValueAction;
ToolBarWidget::ToolBarWidgetLabelWidgetAction *mFilterLabelAction;
ToolBarWidget::ToolBarWidgetLineEditWidgetAction *mFilterValueAction;
QString mFilterValue;

QLabel *mPmrInstanceLabel;
Expand Down
Expand Up @@ -32,6 +32,7 @@ along with this program. If not, see <https://gnu.org/licenses>.
#include "pmrworkspaceswindowsynchronizedialog.h"
#include "splitterwidget.h"
#include "toolbarwidget.h"
#include "toolbarwidgetlabelwidgetaction.h"
#include "webviewerwidget.h"

//==============================================================================
Expand Down Expand Up @@ -283,7 +284,7 @@ PmrWorkspacesWindowSynchronizeDialog::PmrWorkspacesWindowSynchronizeDialog(PMRSu

mWebViewerLabelAction = webViewerToolBarWidget->addLabelWidgetAction();

connect(mWebViewerLabelAction, &ToolBarWidget::ToolBarLabelWidgetAction::created,
connect(mWebViewerLabelAction, &ToolBarWidget::ToolBarWidgetLabelWidgetAction::created,
this, &PmrWorkspacesWindowSynchronizeDialog::webViewerLabelCreated);

webViewerToolBarWidget->addSpacerWidgetAction(QSizePolicy::Expanding, QSizePolicy::Expanding);
Expand Down
Expand Up @@ -61,7 +61,7 @@ namespace PMRSupport {
//==============================================================================

namespace ToolBarWidget {
class ToolBarLabelWidgetAction;
class ToolBarWidgetLabelWidgetAction;
} // namespace ToolBarWidget

//==============================================================================
Expand Down Expand Up @@ -156,7 +156,7 @@ class PmrWorkspacesWindowSynchronizeDialog : public Core::Dialog

WebViewerWidget::WebViewerWidget *mWebViewer;
QAction *mWebViewerCellmlTextFormatAction;
ToolBarWidget::ToolBarLabelWidgetAction *mWebViewerLabelAction;
ToolBarWidget::ToolBarWidgetLabelWidgetAction *mWebViewerLabelAction;

QCheckBox *mSelectAllChangesCheckBox;

Expand Down
3 changes: 3 additions & 0 deletions src/plugins/widget/ToolBarWidget/CMakeLists.txt
Expand Up @@ -7,7 +7,10 @@ add_plugin(ToolBarWidget
../../plugininfo.cpp

src/toolbarwidget.cpp
src/toolbarwidgetlabelwidgetaction.cpp
src/toolbarwidgetlineeditwidgetaction.cpp
src/toolbarwidgetplugin.cpp
src/toolbarwidgetwheelwidgetaction.cpp
PLUGINS
Core
Qwt
Expand Down

0 comments on commit 3f06d1d

Please sign in to comment.