2017-06-07 10:09:24 +02:00
|
|
|
#pragma once
|
2016-12-29 17:31:07 +01:00
|
|
|
|
2017-06-11 09:31:45 +02:00
|
|
|
#include "widgets/notebook.hpp"
|
|
|
|
#include "widgets/titlebar.hpp"
|
2016-12-29 17:31:07 +01:00
|
|
|
|
2017-04-18 02:07:14 +02:00
|
|
|
#ifdef USEWINSDK
|
2017-04-12 17:46:44 +02:00
|
|
|
#include <platform/borderless/qwinwidget.h>
|
2017-04-18 02:07:14 +02:00
|
|
|
#endif
|
|
|
|
|
2017-01-18 04:52:47 +01:00
|
|
|
#include <QMainWindow>
|
2017-01-28 22:35:23 +01:00
|
|
|
#include <boost/property_tree/ptree.hpp>
|
2017-01-18 04:52:47 +01:00
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace chatterino {
|
2017-06-13 21:13:58 +02:00
|
|
|
|
|
|
|
class ChannelManager;
|
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace widgets {
|
2017-01-18 21:30:23 +01:00
|
|
|
|
2017-04-12 17:46:44 +02:00
|
|
|
class MainWindow : public QWidget
|
2016-12-29 17:31:07 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-06-13 21:13:58 +02:00
|
|
|
explicit MainWindow(ChannelManager &_channelManager, QWidget *parent = nullptr);
|
2016-12-29 17:31:07 +01:00
|
|
|
~MainWindow();
|
2017-01-16 03:15:07 +01:00
|
|
|
|
2017-04-12 17:46:44 +02:00
|
|
|
void layoutVisibleChatWidgets(Channel *channel = nullptr);
|
|
|
|
void repaintVisibleChatWidgets(Channel *channel = nullptr);
|
2017-02-07 00:03:15 +01:00
|
|
|
void repaintGifEmotes();
|
2017-01-28 22:35:23 +01:00
|
|
|
|
|
|
|
void load(const boost::property_tree::ptree &tree);
|
|
|
|
boost::property_tree::ptree save();
|
|
|
|
void loadDefaults();
|
|
|
|
|
2017-04-12 17:46:44 +02:00
|
|
|
bool isLoaded() const;
|
|
|
|
|
|
|
|
Notebook &getNotebook();
|
2017-01-28 22:35:23 +01:00
|
|
|
|
|
|
|
private:
|
2017-06-13 21:13:58 +02:00
|
|
|
ChannelManager &channelManager;
|
|
|
|
|
|
|
|
Notebook notebook;
|
2017-04-12 17:46:44 +02:00
|
|
|
bool _loaded;
|
|
|
|
TitleBar _titleBar;
|
2016-12-29 17:31:07 +01:00
|
|
|
};
|
2017-01-28 22:35:23 +01:00
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
} // namespace widgets
|
|
|
|
} // namespace chatterino
|