File: CollapsibleSection.hxx

package info (click to toggle)
gr-framework 0.73.22%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,476 kB
  • sloc: ansic: 87,950; cpp: 58,388; objc: 3,057; javascript: 2,647; python: 1,000; yacc: 855; pascal: 554; sh: 281; fortran: 228; makefile: 174
file content (22 lines) | stat: -rw-r--r-- 607 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <QGridLayout>
#include <QParallelAnimationGroup>
#include <QScrollArea>
#include <QToolButton>
#include <QWidget>

class CollapsibleSection : public QWidget
{
  Q_OBJECT
private:
  QGridLayout main_layout;
  QToolButton toggle_button;
  QFrame header_line;
  QParallelAnimationGroup toggle_animation;
  QScrollArea content_area;
  int animation_duration{100};

public:
  explicit CollapsibleSection(const QString &title = "", const int animation_duration = 100, QWidget *parent = nullptr);
  ~CollapsibleSection() override;
  void setContentLayout(QLayout &content_layout, bool clicked = false);
};