mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
44 lines
877 B
C++
44 lines
877 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 mousePressEvent(QMouseEvent *event);
|
|
|
|
QWidget *_widget;
|
|
QString _label;
|
|
QImage _image;
|
|
|
|
SettingsDialog *_dialog;
|
|
|
|
bool _selected;
|
|
};
|
|
} // namespace widgets
|
|
} // namespace chatterino
|
|
|
|
#endif // SETTINGSNOTEBOOKTAB_H
|