CTK 0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkExpandableWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Library: CTK
4
5 Copyright (c) Kitware Inc.
6
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0.txt
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19=========================================================================*/
20
21#ifndef __ctkExpandableWidget_h
22#define __ctkExpandableWidget_h
23
24// Qt includes
25#include <QFrame>
26class QResizeEvent;
27
28// CTK includes
29#include "ctkWidgetsExport.h"
30class ctkExpandableWidgetPrivate;
31
39class CTK_WIDGETS_EXPORT ctkExpandableWidget: public QFrame
40{
41 Q_OBJECT
50 Q_PROPERTY(Qt::Orientations orientations READ orientations WRITE setOrientations)
51
52
59 Q_PROPERTY(bool sizeGripInside READ isSizeGripInside WRITE setSizeGripInside)
60
61
68 Q_PROPERTY(QSize sizeGripMargins READ sizeGripMargins WRITE setSizeGripMargins)
69
70public:
71 typedef QFrame Superclass;
72
73 ctkExpandableWidget(QWidget *parent=0);
75
76 void setOrientations(Qt::Orientations orientations);
77 Qt::Orientations orientations()const;
78
80 bool isSizeGripInside()const;
81
82 void setSizeGripMargins(QSize margins);
83 QSize sizeGripMargins()const;
84
85 virtual QSize minimumSizeHint()const;
86 virtual QSize sizeHint()const;
87
88public Q_SLOTS:
92
93protected:
94 QScopedPointer<ctkExpandableWidgetPrivate> d_ptr;
95
96 virtual void resizeEvent(QResizeEvent* event);
97 virtual bool event(QEvent* event);
98
99private:
100 Q_DECLARE_PRIVATE(ctkExpandableWidget);
101 Q_DISABLE_COPY(ctkExpandableWidget);
102};
103
104#endif // __ctkExpandableWidget_h
Widget that can be resized by the user using a corner size grip. ctkExpandableWidget is a container w...
QSize sizeGripMargins() const
void setSizeGripMargins(QSize margins)
QScopedPointer< ctkExpandableWidgetPrivate > d_ptr
Qt::Orientations orientations() const
virtual QSize sizeHint() const
void setSizeGripInside(bool)
virtual bool event(QEvent *event)
ctkExpandableWidget(QWidget *parent=0)
void setOrientations(Qt::Orientations orientations)
virtual ~ctkExpandableWidget()
bool isSizeGripInside() const
virtual void resizeEvent(QResizeEvent *event)
virtual QSize minimumSizeHint() const