DockAreaTitleBar_p.h
Go to the documentation of this file.
1 #ifndef DockAreaTitleBar_pH
2 #define DockAreaTitleBar_pH
3 /*******************************************************************************
4 ** Qt Advanced Docking System
5 ** Copyright (C) 2017 Uwe Kindler
6 **
7 ** This library is free software; you can redistribute it and/or
8 ** modify it under the terms of the GNU Lesser General Public
9 ** License as published by the Free Software Foundation; either
10 ** version 2.1 of the License, or (at your option) any later version.
11 **
12 ** This library is distributed in the hope that it will be useful,
13 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 ** Lesser General Public License for more details.
16 **
17 ** You should have received a copy of the GNU Lesser General Public
18 ** License along with this library; If not, see <http://www.gnu.org/licenses/>.
19 ******************************************************************************/
20 
21 
22 //============================================================================
27 //============================================================================
28 
29 
30 //============================================================================
31 // INCLUDES
32 //============================================================================
33 #include <QFrame>
34 #include <QToolButton>
35 
36 #include "ads_globals.h"
37 
38 namespace ads
39 {
40 using tTitleBarButton = QToolButton;
41 
49 {
50  Q_OBJECT
51 
52 private:
53  bool Visible = true;
54  bool HideWhenDisabled = false;
55 
56 public:
58  CTitleBarButton(bool visible = true, QWidget* parent = nullptr);
59 
63  virtual void setVisible(bool visible) override;
64 
65 protected:
69  bool event(QEvent *ev) override;
70 };
71 
72 
81 class CSpacerWidget : public QWidget
82 {
83  Q_OBJECT
84 public:
85  using Super = QWidget;
86  CSpacerWidget(QWidget* Parent = 0);
87  virtual QSize sizeHint() const override {return QSize(0, 0);}
88  virtual QSize minimumSizeHint() const override {return QSize(0, 0);}
89 };
90 
91 }
92  // namespace ads
93 //-----------------------------------------------------------------------------
94 #endif // DockAreaTitleBar_pH
ads_globals.h
Declaration of.
ads::CTitleBarButton
Definition: DockAreaTitleBar_p.h:48
ads::CSpacerWidget::minimumSizeHint
virtual QSize minimumSizeHint() const override
Definition: DockAreaTitleBar_p.h:88
ads::CSpacerWidget
Definition: DockAreaTitleBar_p.h:81
ads::CSpacerWidget::CSpacerWidget
CSpacerWidget(QWidget *Parent=0)
Definition: DockAreaTitleBar.cpp:643
ads::CTitleBarButton::Visible
bool Visible
Definition: DockAreaTitleBar_p.h:53
ads::CTitleBarButton::event
bool event(QEvent *ev) override
Definition: DockAreaTitleBar.cpp:630
ads::tTitleBarButton
QToolButton tTitleBarButton
Definition: DockAreaTitleBar_p.h:40
ads
Definition: ads_globals.h:69
ads::CTitleBarButton::setVisible
virtual void setVisible(bool visible) override
Definition: DockAreaTitleBar.cpp:615
ads::CTitleBarButton::HideWhenDisabled
bool HideWhenDisabled
Definition: DockAreaTitleBar_p.h:54
ads::CSpacerWidget::sizeHint
virtual QSize sizeHint() const override
Definition: DockAreaTitleBar_p.h:87
ads::CSpacerWidget::Super
QWidget Super
Definition: DockAreaTitleBar_p.h:85
ads::CTitleBarButton::CTitleBarButton
CTitleBarButton(bool visible=true, QWidget *parent=nullptr)
Definition: DockAreaTitleBar.cpp:606
ads::CTitleBarButton::Super
tTitleBarButton Super
Definition: DockAreaTitleBar_p.h:57


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:22