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
+13 -2
View File
@@ -1,9 +1,20 @@
#include "QWidget"
#include "QPainter"
#include "notebookpage.h"
#include "notebooktab.h"
NotebookPage::NotebookPage(QWidget *parent, NotebookTab *tab)
: QWidget(parent)
NotebookPage::NotebookPage(NotebookTab *tab)
{
this->tab = tab;
tab->page = this;
}
void NotebookPage::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.setPen(QColor(255, 0, 0));
painter.drawRect(0, 0, width() - 1, height() - 1);
painter.drawText(8, 8, QString::number(tab->x()));
}