2016-12-29 17:31:07 +01:00
|
|
|
#ifndef NOTEBOOKTAB_H
|
|
|
|
#define NOTEBOOKTAB_H
|
|
|
|
|
|
|
|
#include "QObject"
|
|
|
|
#include "notebookpage.h"
|
|
|
|
|
2016-12-29 18:02:13 +01:00
|
|
|
class Notebook;
|
|
|
|
|
2016-12-29 17:31:07 +01:00
|
|
|
class NotebookTab : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2016-12-30 12:20:26 +01:00
|
|
|
NotebookTab(Notebook *notebook);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
|
|
|
|
|
|
|
void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
|
|
|
|
void mouseReleaseEvent(QMouseEvent *) Q_DECL_OVERRIDE;
|
|
|
|
void enterEvent(QEvent *) Q_DECL_OVERRIDE;
|
|
|
|
void leaveEvent(QEvent *) Q_DECL_OVERRIDE;
|
|
|
|
|
|
|
|
bool IsSelected();
|
2016-12-29 17:31:07 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
Notebook *notebook;
|
2016-12-30 12:20:26 +01:00
|
|
|
|
|
|
|
bool isSelected;
|
|
|
|
bool mouseOver = false;
|
|
|
|
bool mouseDown = false;
|
2016-12-29 17:31:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // NOTEBOOKTAB_H
|