Fraxinus  22.09
An IGT application
cxPopupToolbarWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef CXPOPUPTOOLBARWIDGET_H
12 #define CXPOPUPTOOLBARWIDGET_H
13 
14 #include <QFrame>
15 #include "cxResourceWidgetsExport.h"
16 
17 class QToolButton;
18 class QHBoxLayout;
19 
20 namespace cx
21 {
22 
23 class cxResourceWidgets_EXPORT PopupButton : public QFrame
24 {
25  Q_OBJECT
26 public:
27  PopupButton(QWidget *parent = NULL);
28  bool getShowPopup() const;
29  void setShowPopup(bool val);
30 
31 signals:
32  void popup(bool show);
33 private slots:
34  void onTriggered();
35 private:
36  QAction* mAction;
37  QToolButton* mShowHeaderButton;
38 };
39 
51 class cxResourceWidgets_EXPORT PopupToolbarWidget : public QWidget
52 {
53  Q_OBJECT
54 public:
55  PopupToolbarWidget(QWidget* parent);
62  bool popupIsVisible() const;
66  void setPopupVisible(bool val);
71  QWidget* getToolbar();
78  void refresh() { this->onPopup(); }
79 signals:
83  void popup(bool show);
84 private:
85  void onPopup();
86  QWidget* mButtonWidget;
87  QHBoxLayout* mControlLayout;
88  PopupButton* mShowControlsButton;
89 };
90 
91 } // namespace cx
92 
93 #endif // CXPOPUPTOOLBARWIDGET_H
Namespace for all CustusX production code.