mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
28 lines
586 B
C++
28 lines
586 B
C++
#ifndef SPOILER_H
|
|
#define SPOILER_H
|
|
|
|
#include <QFrame>
|
|
#include <QGridLayout>
|
|
#include <QParallelAnimationGroup>
|
|
#include <QScrollArea>
|
|
#include <QToolButton>
|
|
#include <QWidget>
|
|
|
|
class Spoiler : public QWidget {
|
|
Q_OBJECT
|
|
|
|
private:
|
|
QGridLayout mainLayout;
|
|
QToolButton toggleButton;
|
|
QFrame headerLine;
|
|
QParallelAnimationGroup toggleAnimation;
|
|
QScrollArea contentArea;
|
|
int animationDuration{300};
|
|
|
|
public:
|
|
explicit Spoiler(const QString & title = "", const int animationDuration = 300, QWidget *parent = 0);
|
|
void setContentLayout(QLayout & contentLayout);
|
|
};
|
|
|
|
#endif // SPOILER_H
|