DockAreaTitleBar.h
Go to the documentation of this file.
1 #ifndef DockAreaTitleBarH
2 #define DockAreaTitleBarH
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 
35 #include "ads_globals.h"
36 
37 QT_FORWARD_DECLARE_CLASS(QAbstractButton)
38 
39 namespace ads
40 {
41 class CDockAreaTabBar;
42 class CDockAreaWidget;
43 struct DockAreaTitleBarPrivate;
44 
50 class ADS_EXPORT CDockAreaTitleBar : public QFrame
51 {
52  Q_OBJECT
53 private:
55  friend struct DockAreaTitleBarPrivate;
56 
57 private slots:
58  void onTabsMenuAboutToShow();
59  void onCloseButtonClicked();
60  void onUndockButtonClicked();
61  void onTabsMenuActionTriggered(QAction* Action);
62  void onCurrentTabChanged(int Index);
63 
64 public:
68  virtual void mousePressEvent(QMouseEvent* ev) override;
69 
73  virtual void mouseReleaseEvent(QMouseEvent* ev) override;
74 
79  virtual void mouseMoveEvent(QMouseEvent* ev) override;
80 
84  virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
85 
89  virtual void contextMenuEvent(QContextMenuEvent *event) override;
90 
91 public slots:
96  void markTabsMenuOutdated();
97 
98 
99 public:
100  using Super = QFrame;
101 
106 
110  virtual ~CDockAreaTitleBar();
111 
115  CDockAreaTabBar* tabBar() const;
116 
120  QAbstractButton* button(TitleBarButton which) const;
121 
125  void updateDockWidgetActionsButtons();
126 
131  virtual void setVisible(bool Visible) override;
132 
138  void insertWidget(int index, QWidget *widget);
139 
149  int indexOf(QWidget *widget) const;
150 
151 signals:
156  void tabBarClicked(int index);
157 }; // class name
158 
159 }
160  // namespace ads
161 //-----------------------------------------------------------------------------
162 #endif // DockAreaTitleBarH
ads_globals.h
Declaration of.
ads::CDockAreaTitleBar::Super
QFrame Super
Definition: DockAreaTitleBar.h:100
ads::CDockAreaTitleBar
Definition: DockAreaTitleBar.h:50
ads::DockAreaTitleBarPrivate
Definition: DockAreaTitleBar.cpp:63
ads::CDockAreaWidget
Definition: DockAreaWidget.h:55
ads::CDockAreaTitleBar::d
DockAreaTitleBarPrivate * d
private data (pimpl)
Definition: DockAreaTitleBar.h:54
ads
Definition: ads_globals.h:69
ads::CDockAreaTabBar
Definition: DockAreaTabBar.h:53
ads::TitleBarButton
TitleBarButton
Definition: ads_globals.h:89
ADS_EXPORT
#define ADS_EXPORT
Definition: ads_globals.h:50


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