void SingleWindow::onkaduKeyPressed(QKeyEvent *e) { /* unfortunatelly does not work correctly */ if (HotKey::shortCut(m_configuration, e, "ShortCuts", "FocusOnRosterTab")) { ChatWidget *chatWidget = static_cast<ChatWidget *>(m_tabs->currentWidget()); if (chatWidget) chatWidget->edit()->setFocus(); } }
void TabsManager::onTabChange(int index) { if (index < 0) return; ChatWidget *chatWidget = static_cast<ChatWidget *>(TabDialog->widget(index)); Title->setActiveChatWidget(chatWidget); const Chat &chat = chatWidget->chat(); if (chat.unreadMessagesCount() > 0) emit chatWidgetActivated(chatWidget); //TabDialog->setWindowTitle(chatWidget->title()->title()); //TabDialog->setWindowIcon(chatWidget->title()->icon()); chatWidget->edit()->setFocus(); }