2014-05-18 11:52:39 -04:00
|
|
|
#ifndef INCLUDE_ROLLUPWIDGET_H
|
|
|
|
#define INCLUDE_ROLLUPWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
2018-03-20 08:49:21 -04:00
|
|
|
#include "export.h"
|
2014-05-18 11:52:39 -04:00
|
|
|
|
2018-03-03 14:23:38 -05:00
|
|
|
class SDRGUI_API RollupWidget : public QWidget {
|
2014-05-18 11:52:39 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
RollupWidget(QWidget* parent = NULL);
|
|
|
|
void setTitleColor(const QColor& c);
|
2017-11-14 16:58:35 -05:00
|
|
|
void setHighlighted(bool highlighted);
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void widgetRolled(QWidget* widget, bool rollDown);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
enum {
|
|
|
|
VersionMarker = 0xff
|
|
|
|
};
|
|
|
|
|
|
|
|
QColor m_titleColor;
|
2017-10-05 16:11:17 -04:00
|
|
|
QColor m_titleTextColor;
|
2017-11-14 16:58:35 -05:00
|
|
|
bool m_highlighted;
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
int arrangeRollups();
|
|
|
|
|
2017-10-04 18:37:12 -04:00
|
|
|
QByteArray saveState(int version = 0) const;
|
|
|
|
bool restoreState(const QByteArray& state, int version = 0);
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
void paintEvent(QPaintEvent*);
|
|
|
|
int paintRollup(QWidget* rollup, int pos, QPainter* p, bool last, const QColor& frame);
|
|
|
|
|
|
|
|
void resizeEvent(QResizeEvent* size);
|
|
|
|
void mousePressEvent(QMouseEvent* event);
|
|
|
|
|
|
|
|
bool event(QEvent* event);
|
|
|
|
bool eventFilter(QObject* object, QEvent* event);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_ROLLUPWIDGET_H
|