mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
3bf111a091
There are missing parts to the "account-based" emotes that needs to be completed before emote completion can be considered done. For now, when I've been testing, I've been manually injecting the oauthClient and oauthToken to the settings file with the `user_subscriptions` scope
76 lines
1.5 KiB
C++
76 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include "widgets/basewidget.hpp"
|
|
#include "widgets/notebookbutton.hpp"
|
|
#include "widgets/notebookpage.hpp"
|
|
#include "widgets/notebooktab.hpp"
|
|
|
|
#include <QList>
|
|
#include <QWidget>
|
|
#include <boost/property_tree/ptree.hpp>
|
|
|
|
namespace chatterino {
|
|
|
|
class ChannelManager;
|
|
class CompletionManager;
|
|
|
|
namespace widgets {
|
|
|
|
class MainWindow;
|
|
|
|
class Notebook : public BaseWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
enum HighlightType { none, highlighted, newMessage };
|
|
|
|
explicit Notebook(ChannelManager &_channelManager, MainWindow *parent);
|
|
|
|
NotebookPage *addPage(bool select = false);
|
|
|
|
void removePage(NotebookPage *page);
|
|
void select(NotebookPage *page);
|
|
|
|
NotebookPage *getSelectedPage()
|
|
{
|
|
return selectedPage;
|
|
}
|
|
|
|
void performLayout(bool animate = true);
|
|
|
|
NotebookPage *tabAt(QPoint point, int &index);
|
|
void rearrangePage(NotebookPage *page, int index);
|
|
|
|
protected:
|
|
void resizeEvent(QResizeEvent *);
|
|
|
|
void settingsButtonMouseReleased(QMouseEvent *event);
|
|
|
|
public slots:
|
|
void settingsButtonClicked();
|
|
void usersButtonClicked();
|
|
void addPageButtonClicked();
|
|
|
|
public:
|
|
ChannelManager &channelManager;
|
|
CompletionManager &completionManager;
|
|
|
|
private:
|
|
QList<NotebookPage *> pages;
|
|
|
|
NotebookButton addButton;
|
|
NotebookButton settingsButton;
|
|
NotebookButton userButton;
|
|
|
|
NotebookPage *selectedPage;
|
|
|
|
public:
|
|
void load(const boost::property_tree::ptree &tree);
|
|
void save(boost::property_tree::ptree &tree);
|
|
void loadDefaults();
|
|
};
|
|
|
|
} // namespace widgets
|
|
} // namespace chatterino
|