added another level of unneeded abstraction
This commit is contained in:
@@ -2,7 +2,10 @@
|
||||
#define CHATWIDGET_H
|
||||
|
||||
#include "channel.h"
|
||||
#include "messages/limitedqueuesnapshot.h"
|
||||
#include "messages/messageref.h"
|
||||
#include "messages/word.h"
|
||||
#include "messages/wordpart.h"
|
||||
#include "widgets/chatwidgetheader.h"
|
||||
#include "widgets/chatwidgetinput.h"
|
||||
#include "widgets/chatwidgetview.h"
|
||||
@@ -11,6 +14,7 @@
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/signals2/connection.hpp>
|
||||
|
||||
namespace chatterino {
|
||||
namespace widgets {
|
||||
@@ -45,10 +49,18 @@ public:
|
||||
|
||||
void showChangeChannelPopup();
|
||||
|
||||
messages::LimitedQueueSnapshot<std::shared_ptr<messages::MessageRef>>
|
||||
getMessagesSnapshot()
|
||||
{
|
||||
return messages.getSnapshot();
|
||||
}
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
|
||||
|
||||
private:
|
||||
messages::LimitedQueue<std::shared_ptr<messages::MessageRef>> messages;
|
||||
|
||||
std::shared_ptr<Channel> channel;
|
||||
QString channelName;
|
||||
|
||||
@@ -58,6 +70,9 @@ private:
|
||||
ChatWidgetView view;
|
||||
ChatWidgetInput input;
|
||||
|
||||
boost::signals2::connection messageAppendedConnection;
|
||||
boost::signals2::connection messageRemovedConnection;
|
||||
|
||||
public:
|
||||
void load(const boost::property_tree::ptree &tree);
|
||||
boost::property_tree::ptree save();
|
||||
|
||||
Reference in New Issue
Block a user