diff --git a/mainwindow.cpp b/mainwindow.cpp index 21582d38a0a2b2ebff1a9a67eefee68d6300ee80..2120e9798082c357dfb4699ebef6ab68ddb3c990 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -40,6 +40,9 @@ MainWindow::MainWindow(QWidget *parent) : connect(&sysIcon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayActivated(QSystemTrayIcon::ActivationReason))); + connect(CallModel::instance(), SIGNAL(incomingCall(Call*)), + this, SLOT(onIncomingCall(Call*))); + navStack_ = new NavStack(ui->bar, ui->stackedWidgetView, this); ui->verticalLayout_2->addWidget( new QSizeGrip(this), 0, Qt::AlignBottom | Qt::AlignRight); @@ -71,3 +74,8 @@ MainWindow::trayActivated(QSystemTrayIcon::ActivationReason reason) { if (reason != QSystemTrayIcon::ActivationReason::Context) this->show(); } + +void MainWindow::onIncomingCall(Call *call) { + Q_UNUSED(call); + QWidget::showNormal(); +} diff --git a/mainwindow.h b/mainwindow.h index b1f0d55f1c3cdee564cec1e9b7f1123bef5f1c65..b1c71742058d6a0a83318c0052dfc9806631458c 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -40,6 +40,7 @@ public: private slots: void trayActivated(QSystemTrayIcon::ActivationReason reason); + void onIncomingCall(Call *call); private: Ui::MainWindow *ui;