2018-01-19 14:48:17 +01:00
|
|
|
#include "streamview.hpp"
|
|
|
|
|
|
|
|
#include "channel.hpp"
|
|
|
|
#include "util/helpers.hpp"
|
|
|
|
#include "util/layoutcreator.hpp"
|
|
|
|
#include "widgets/split.hpp"
|
|
|
|
|
|
|
|
#ifdef USEWEBENGINE
|
|
|
|
#include <QtWebEngineWidgets>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
namespace widgets {
|
2018-01-24 13:15:41 +01:00
|
|
|
StreamView::StreamView(ChannelPtr channel, QUrl url)
|
2018-01-19 14:48:17 +01:00
|
|
|
{
|
|
|
|
util::LayoutCreator<StreamView> layoutCreator(this);
|
|
|
|
|
|
|
|
#ifdef USEWEBENGINE
|
|
|
|
auto web = layoutCreator.emplace<QWebEngineView>(this).assign(&this->stream);
|
|
|
|
web->setUrl(url);
|
|
|
|
web->settings()->setAttribute(QWebEngineSettings::FullScreenSupportEnabled, true);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// QString uuid = CreateUUID();
|
|
|
|
|
|
|
|
auto chat = layoutCreator.emplace<ChannelView>();
|
|
|
|
chat->setFixedWidth(300);
|
|
|
|
chat->setChannel(channel);
|
|
|
|
|
|
|
|
this->layout()->setSpacing(0);
|
|
|
|
this->layout()->setMargin(0);
|
|
|
|
}
|
|
|
|
} // namespace widgets
|
|
|
|
} // namespace chatterino
|