clean up chat widget structure. how and where hotkeys are handled

This commit is contained in:
Rasmus Karlsson
2017-06-10 23:53:39 +02:00
parent 1472471ddb
commit 85356cdd6b
5 changed files with 67 additions and 34 deletions
-14
View File
@@ -42,20 +42,6 @@ Notebook::Notebook(QWidget *parent)
[this](const bool &) { performLayout(); });
SettingsManager::getInstance().hideUserButton.valueChanged.connect(
[this](const bool &) { performLayout(); });
// Initialize notebook hotkeys
{
// CTRL+T: Create new split (Add page)
auto shortcut = new QShortcut(QKeySequence("CTRL+T"), this);
connect(shortcut, &QShortcut::activated, [this]() {
printf("ctrL+t pressed\n"); //
if (this->_selectedPage == nullptr) {
return;
}
this->_selectedPage->addChat();
});
}
}
NotebookPage *Notebook::addPage(bool select)