| 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 TASKGROUP_P_H |
| 10 |
#define TASKGROUP_P_H |
| 11 |
|
| 12 |
#include "actionlabel.h" |
| 13 |
#include "actionpanelscheme.h" |
| 14 |
|
| 15 |
#include <QBoxLayout> |
| 16 |
#include <QFrame> |
| 17 |
|
| 18 |
|
| 19 |
namespace QSint |
| 20 |
{ |
| 21 |
|
| 22 |
|
| 23 |
class TaskGroup : public QFrame |
| 24 |
{ |
| 25 |
using BaseClass = QFrame; |
| 26 |
|
| 27 |
public: |
| 28 |
TaskGroup(QWidget *parent, bool hasHeader = false); |
| 29 |
void setScheme(ActionPanelScheme *scheme); |
| 30 |
|
| 31 |
inline QBoxLayout* groupLayout() |
| 32 |
{ |
| 33 |
return (QBoxLayout*)layout(); |
| 34 |
} |
| 35 |
|
| 36 |
bool addActionLabel(ActionLabel *label, bool addToLayout, bool addStretch); |
| 37 |
|
| 38 |
bool addWidget(QWidget *widget, bool addToLayout, bool addStretch); |
| 39 |
|
| 40 |
QPixmap transparentRender(); |
| 41 |
|
| 42 |
protected: |
| 43 |
void keyPressEvent ( QKeyEvent * event ) override; |
| 44 |
void keyReleaseEvent ( QKeyEvent * event ) override; |
| 45 |
|
| 46 |
ActionPanelScheme *myScheme; |
| 47 |
|
| 48 |
bool myHasHeader; |
| 49 |
}; |
| 50 |
|
| 51 |
|
| 52 |
} |
| 53 |
|
| 54 |
#endif // TASKGROUP_P_H |