plot_docker_toolbar.h
Go to the documentation of this file.
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5  */
6 
7 #ifndef PLOT_DOCKER_TOOLBAR_H
8 #define PLOT_DOCKER_TOOLBAR_H
9 
10 #include "Qads/DockManager.h"
11 #include "Qads/DockWidget.h"
12 #include "Qads/DockAreaWidget.h"
13 #include "Qads/DockAreaTitleBar.h"
14 #include "Qads/DockAreaTabBar.h"
17 #include "ui_plot_docker_toolbar.h"
18 
19 class DockToolbar : public QWidget
20 {
21  Q_OBJECT
22 
23 public:
24  explicit DockToolbar(ads::CDockWidget* parent);
25  ~DockToolbar() override;
26 
27  QLabel* label()
28  {
29  return ui->label;
30  }
31  QPushButton* buttonFullscreen()
32  {
33  return ui->buttonFullscreen;
34  }
35  QPushButton* buttonClose()
36  {
37  return ui->buttonClose;
38  }
39  QPushButton* buttonSplitHorizontal()
40  {
41  return ui->buttonSplitHorizontal;
42  }
43  QPushButton* buttonSplitVertical()
44  {
45  return ui->buttonSplitVertical;
46  }
47 
48  void toggleFullscreen();
49 
50  bool isFullscreen() const
51  {
52  return _fullscreen_mode;
53  }
54 
55  bool eventFilter(QObject* object, QEvent* event) override;
56 
57 public slots:
58 
59  void on_stylesheetChanged(QString theme);
60 
61 private:
62  void dragEnterEvent(QDragEnterEvent* event) override;
63  void dragLeaveEvent(QDragLeaveEvent* event) override;
64  void dropEvent(QDropEvent* event) override;
65  void mousePressEvent(QMouseEvent* ev) override;
66  void mouseReleaseEvent(QMouseEvent* ev) override;
67  void mouseMoveEvent(QMouseEvent* ev) override;
68  void enterEvent(QEvent*) override;
69  void leaveEvent(QEvent*) override;
70 
72  Ui::DraggableToolbar* ui;
74 
75  QIcon _expand_icon;
77  QString _dragging_curve;
78 
79 signals:
80  void backgroundColorRequest(QString name);
81  void titleChanged(QString title);
82 private slots:
84 };
85 
86 #endif // PLOT_DOCKER_TOOLBAR_H
DockToolbar::buttonFullscreen
QPushButton * buttonFullscreen()
Definition: plot_docker_toolbar.h:31
DockToolbar::on_buttonBackground_clicked
void on_buttonBackground_clicked()
Definition: plot_docker_toolbar.cpp:198
DockToolbar::titleChanged
void titleChanged(QString title)
DockToolbar::leaveEvent
void leaveEvent(QEvent *) override
Definition: plot_docker_toolbar.cpp:189
DockToolbar::DockToolbar
DockToolbar(ads::CDockWidget *parent)
Definition: plot_docker_toolbar.cpp:10
DockToolbar::eventFilter
bool eventFilter(QObject *object, QEvent *event) override
Definition: plot_docker_toolbar.cpp:93
FloatingDockContainer.h
Declaration of CFloatingDockContainer class.
DockToolbar::enterEvent
void enterEvent(QEvent *) override
Definition: plot_docker_toolbar.cpp:82
DockToolbar::_dragging_curve
QString _dragging_curve
Definition: plot_docker_toolbar.h:77
DockWidget.h
Declaration of CDockWidget class.
DockAreaTabBar.h
Declaration of CDockAreaTabBar class.
DockToolbar::_fullscreen_mode
bool _fullscreen_mode
Definition: plot_docker_toolbar.h:73
DockToolbar::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *event) override
Definition: plot_docker_toolbar.cpp:125
DockToolbar::~DockToolbar
~DockToolbar() override
Definition: plot_docker_toolbar.cpp:35
DockToolbar::_parent
ads::CDockWidget * _parent
Definition: plot_docker_toolbar.h:71
DockToolbar::buttonClose
QPushButton * buttonClose()
Definition: plot_docker_toolbar.h:35
DockToolbar::backgroundColorRequest
void backgroundColorRequest(QString name)
DockToolbar::_collapse_icon
QIcon _collapse_icon
Definition: plot_docker_toolbar.h:76
DockToolbar::mousePressEvent
void mousePressEvent(QMouseEvent *ev) override
Definition: plot_docker_toolbar.cpp:60
DockToolbar::buttonSplitHorizontal
QPushButton * buttonSplitHorizontal()
Definition: plot_docker_toolbar.h:39
DockComponentsFactory.h
Declaration of DockComponentsFactory.
DockAreaTitleBar.h
Declaration of CDockAreaTitleBar class.
DockToolbar::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *ev) override
Definition: plot_docker_toolbar.cpp:70
ads::CDockWidget
Definition: DockWidget.h:54
DockToolbar::ui
Ui::DraggableToolbar * ui
Definition: plot_docker_toolbar.h:72
DockAreaWidget.h
Declaration of CDockAreaWidget class.
DockToolbar::dragLeaveEvent
void dragLeaveEvent(QDragLeaveEvent *event) override
Definition: plot_docker_toolbar.cpp:169
DockToolbar::buttonSplitVertical
QPushButton * buttonSplitVertical()
Definition: plot_docker_toolbar.h:43
DockToolbar::dropEvent
void dropEvent(QDropEvent *event) override
Definition: plot_docker_toolbar.cpp:177
DockManager.h
Declaration of CDockManager class.
DockToolbar::toggleFullscreen
void toggleFullscreen()
Definition: plot_docker_toolbar.cpp:46
DockToolbar::_expand_icon
QIcon _expand_icon
Definition: plot_docker_toolbar.h:75
DockToolbar::mouseReleaseEvent
void mouseReleaseEvent(QMouseEvent *ev) override
Definition: plot_docker_toolbar.cpp:65
DockToolbar
Definition: plot_docker_toolbar.h:19
DockToolbar::isFullscreen
bool isFullscreen() const
Definition: plot_docker_toolbar.h:50
DockToolbar::on_stylesheetChanged
void on_stylesheetChanged(QString theme)
Definition: plot_docker_toolbar.cpp:114
DockToolbar::label
QLabel * label()
Definition: plot_docker_toolbar.h:27


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:45