mirror-chatterino2/widgets/notebook.h

56 lines
919 B
C
Raw Normal View History

2016-12-29 17:31:07 +01:00
#ifndef NOTEBOOK_H
#define NOTEBOOK_H
2017-01-18 21:30:23 +01:00
#include "widgets/notebookbutton.h"
#include "widgets/notebookpage.h"
#include "widgets/notebooktab.h"
2016-12-29 17:31:07 +01:00
2017-01-18 04:52:47 +01:00
#include <QList>
#include <QWidget>
2017-01-18 21:30:23 +01:00
namespace chatterino {
namespace widgets {
2016-12-29 17:31:07 +01:00
class Notebook : public QWidget
{
2017-01-11 18:52:09 +01:00
Q_OBJECT
2016-12-29 17:31:07 +01:00
public:
Notebook(QWidget *parent);
2017-01-11 18:52:09 +01:00
NotebookPage *addPage();
2016-12-30 12:20:26 +01:00
enum HighlightType { none, highlighted, newMessage };
2017-01-11 18:52:09 +01:00
void select(NotebookPage *page);
NotebookPage *
2017-01-18 04:33:30 +01:00
getSelectedPage()
{
2017-01-18 04:33:30 +01:00
return selectedPage;
}
2016-12-30 18:00:25 +01:00
void performLayout();
2016-12-30 12:20:26 +01:00
protected:
void resizeEvent(QResizeEvent *);
2016-12-29 17:31:07 +01:00
2017-01-01 18:43:52 +01:00
void settingsButtonMouseReleased(QMouseEvent *event);
public slots:
void settingsButtonClicked();
2016-12-29 17:31:07 +01:00
private:
2017-01-18 04:33:30 +01:00
QList<NotebookPage *> pages;
2016-12-30 12:20:26 +01:00
2017-01-18 04:33:30 +01:00
NotebookButton addButton;
NotebookButton settingsButton;
NotebookButton userButton;
2016-12-30 12:20:26 +01:00
2017-01-18 04:33:30 +01:00
NotebookPage *selectedPage = nullptr;
2016-12-29 17:31:07 +01:00
};
2017-01-18 21:30:23 +01:00
}
}
2016-12-29 17:31:07 +01:00
2017-01-11 18:52:09 +01:00
#endif // NOTEBOOK_H