59d383c161
- Remove some underscore-prefixes
- Start using this-> more
- Remove a few of the singletons (We pass references to managers to
things that need it now. Might not be much better, but for now
it works. It also shows what places might be slightly wrong
designed)
49 lines
947 B
C++
49 lines
947 B
C++
#pragma once
|
|
|
|
#include "widgets/notebook.hpp"
|
|
#include "widgets/titlebar.hpp"
|
|
|
|
#ifdef USEWINSDK
|
|
#include <platform/borderless/qwinwidget.h>
|
|
#endif
|
|
|
|
#include <QMainWindow>
|
|
#include <boost/property_tree/ptree.hpp>
|
|
|
|
namespace chatterino {
|
|
|
|
class ChannelManager;
|
|
|
|
namespace widgets {
|
|
|
|
class MainWindow : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainWindow(ChannelManager &_channelManager, QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
|
|
void layoutVisibleChatWidgets(Channel *channel = nullptr);
|
|
void repaintVisibleChatWidgets(Channel *channel = nullptr);
|
|
void repaintGifEmotes();
|
|
|
|
void load(const boost::property_tree::ptree &tree);
|
|
boost::property_tree::ptree save();
|
|
void loadDefaults();
|
|
|
|
bool isLoaded() const;
|
|
|
|
Notebook &getNotebook();
|
|
|
|
private:
|
|
ChannelManager &channelManager;
|
|
|
|
Notebook notebook;
|
|
bool _loaded;
|
|
TitleBar _titleBar;
|
|
};
|
|
|
|
} // namespace widgets
|
|
} // namespace chatterino
|