added tab system

This commit is contained in:
fourtf
2016-12-30 18:00:25 +01:00
parent 42b5de161d
commit bb91ec2045
6 changed files with 128 additions and 28 deletions
+11 -5
View File
@@ -1,10 +1,10 @@
#ifndef NOTEBOOKTAB_H
#define NOTEBOOKTAB_H
#include "QObject"
#include "notebookpage.h"
#include "QWidget"
class Notebook;
class NotebookPage;
class NotebookTab : public QWidget
{
@@ -13,6 +13,14 @@ Q_OBJECT
public:
NotebookTab(Notebook *notebook);
void calcSize();
NotebookPage* page;
QString text;
bool getSelected();
void setSelected(bool value);
protected:
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
@@ -21,12 +29,10 @@ protected:
void enterEvent(QEvent *) Q_DECL_OVERRIDE;
void leaveEvent(QEvent *) Q_DECL_OVERRIDE;
bool IsSelected();
private:
Notebook *notebook;
bool selected = false;
bool isSelected;
bool mouseOver = false;
bool mouseDown = false;
};