"add split" button now does something (thanks hemirt)

This commit is contained in:
Rasmus Karlsson 2017-06-06 11:25:55 +02:00
parent 36e236e520
commit cb4d193b4a
2 changed files with 4 additions and 3 deletions

View file

@ -157,7 +157,8 @@ void ChatWidgetHeader::rightButtonClicked()
void ChatWidgetHeader::menuAddSplit()
{
printf("Add split for menu (NOT IMPLEMENTED KKarrot)\n");
auto page = static_cast<NotebookPage *>(_chatWidget->parentWidget());
page->addChat();
}
void ChatWidgetHeader::menuCloseSplit()
{

View file

@ -24,7 +24,7 @@ class ChatWidgetHeader : public QWidget
public:
explicit ChatWidgetHeader(ChatWidget *parent);
ChatWidget *getChatWidget()
ChatWidget *getChatWidget() const
{
return _chatWidget;
}
@ -39,7 +39,7 @@ protected:
void mouseDoubleClickEvent(QMouseEvent *event);
private:
ChatWidget *_chatWidget;
ChatWidget * const _chatWidget;
QPoint _dragStart;
bool _dragging;