mirror-chatterino2/widgets/settingsdialogtab.h
2017-04-12 17:46:44 +02:00

44 lines
830 B
C++

#ifndef SETTINGSNOTEBOOKTAB_H
#define SETTINGSNOTEBOOKTAB_H
#include <QPaintEvent>
#include <QWidget>
namespace chatterino {
namespace widgets {
class SettingsDialog;
class SettingsDialogTab : public QWidget
{
Q_OBJECT
Q_PROPERTY(bool getSelected READ getSelected WRITE setSelected NOTIFY selectedChanged)
public:
SettingsDialogTab(SettingsDialog *_dialog, QString _label, QString imageRes);
void setSelected(bool selected);
bool getSelected() const;
QWidget *getWidget();
void setWidget(QWidget *widget);
signals:
void selectedChanged(bool);
private:
void paintEvent(QPaintEvent *);
void mouseReleaseEvent(QMouseEvent *event);
QWidget *_widget;
QString _label;
QImage _image;
SettingsDialog *_dialog;
bool _selected;
};
}
}
#endif // SETTINGSNOTEBOOKTAB_H