mirror-chatterino2/notebook.h

50 lines
843 B
C
Raw Normal View History

2016-12-29 17:31:07 +01:00
#ifndef NOTEBOOK_H
#define NOTEBOOK_H
#include <QList>
2017-01-11 18:52:09 +01:00
#include <QWidget>
#include "notebookbutton.h"
2016-12-29 17:31:07 +01:00
#include "notebookpage.h"
#include "notebooktab.h"
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 *
selected()
{
return m_selected;
}
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:
QList<NotebookPage *> m_pages;
2016-12-30 12:20:26 +01:00
NotebookButton m_addButton;
NotebookButton m_settingsButton;
NotebookButton m_userButton;
2016-12-30 12:20:26 +01:00
NotebookPage *m_selected = nullptr;
2016-12-29 17:31:07 +01:00
};
2017-01-11 18:52:09 +01:00
#endif // NOTEBOOK_H