ctkCollapsibleGroupBox.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. All rights reserved.
  5. Distributed under a BSD License. See LICENSE.txt file.
  6. This software is distributed "AS IS" WITHOUT ANY WARRANTY; without even
  7. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the above copyright notice for more information.
  9. =========================================================================*/
  10. #ifndef __ctkCollapsibleGroupBox_h
  11. #define __ctkCollapsibleGroupBox_h
  12. // Qt includes
  13. #include <QGroupBox>
  14. // CTK includes
  15. #include "CTKWidgetsExport.h"
  16. class CTK_WIDGETS_EXPORT ctkCollapsibleGroupBox : public QGroupBox
  17. {
  18. Q_OBJECT
  19. public:
  20. explicit ctkCollapsibleGroupBox(QWidget* parent = 0);
  21. virtual ~ctkCollapsibleGroupBox();
  22. virtual int heightForWidth(int w) const;
  23. virtual QSize minimumSizeHint()const;
  24. virtual QSize sizeHint()const;
  25. protected slots:
  26. virtual void expand(bool expand);
  27. protected:
  28. virtual void childEvent(QChildEvent*);
  29. #if QT_VERSION < 0x040600
  30. virtual void paintEvent(QPaintEvent*);
  31. virtual void mousePressEvent(QMouseEvent*);
  32. virtual void mouseReleaseEvent(QMouseEvent*);
  33. #endif
  34. virtual void resizeEvent(QResizeEvent*);
  35. QSize OldSize;
  36. int MaxHeight;
  37. };
  38. #endif