Debian Codegraph @

src/Gui/QSint/actionpanel/taskheader_p.h

raw
1 // SPDX-License-Identifier: LGPL-3.0-only
2 /***************************************************************************
3 * *
4 * Copyright: https://code.google.com/p/qsint/ *
5 * License: LGPL *
6 * *
7 ***************************************************************************/
8
9 #ifndef TASKHEADER_P_H
10 #define TASKHEADER_P_H
11
12 #include "actionlabel.h"
13 #include "actionpanelscheme.h"
14
15 #include <QLabel>
16
17
18 namespace QSint
19 {
20
21
22 class TaskHeader : public QFrame
23 {
24 Q_OBJECT
25
26 using BaseClass = QFrame;
27
28 friend class ActionGroup;
29
30 public:
31 TaskHeader(const QIcon &icon, const QString &title, bool expandable, QWidget *parent = nullptr);
32
33 inline bool expandable() const { return myExpandable; }
34 void setExpandable(bool expandable);
35
36 void setScheme(ActionPanelScheme *scheme);
37
38 Q_SIGNALS:
39 void activated();
40
41 public:
42 void setFold(bool);
43
44 public Q_SLOTS:
45 void fold();
46
47 protected:
48 void mouseReleaseEvent ( QMouseEvent * event ) override;
49 void keyPressEvent ( QKeyEvent * event ) override;
50 void keyReleaseEvent ( QKeyEvent * event ) override;
51
52 bool eventFilter(QObject *obj, QEvent *event) override;
53
54 void changeIcons();
55
56 ActionPanelScheme *myScheme;
57
58 bool myExpandable;
59 bool m_over, m_buttonOver, m_fold;
60
61 ActionLabel *myTitle;
62 QLabel *myButton;
63 };
64
65
66 }
67
68 #endif // TASKHEADER_P_H