blob: e6397e107f1428f494595707d4cba2716ef20a55 [file] [log] [blame]
Edric Milaret627500d2015-03-27 16:41:40 -04001/***************************************************************************
Edric Milaret5f316da2015-09-28 11:57:42 -04002 * Copyright (C) 2015 by Savoir-faire Linux *
Edric Milaret627500d2015-03-27 16:41:40 -04003 * Author: Edric Ladent Milaret <edric.ladent-milaret@savoirfairelinux.com>*
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 3 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17 **************************************************************************/
18
Edric Milaret5f316da2015-09-28 11:57:42 -040019#pragma once
Edric Milaret627500d2015-03-27 16:41:40 -040020
Edric Milaret2cf34292015-06-22 16:27:03 -040021#include "globalsystemtray.h"
22
Edric Milaret627500d2015-03-27 16:41:40 -040023#include <QMainWindow>
24#include <QMouseEvent>
Edric Milaret627500d2015-03-27 16:41:40 -040025
26#include "navstack.h"
27
Edric Milareted0b2802015-10-01 15:10:02 -040028static constexpr char IDM_ABOUTBOX = 0x0010;
29
Edric Milaret627500d2015-03-27 16:41:40 -040030namespace Ui {
31class MainWindow;
32}
33
34class MainWindow : public QMainWindow
35{
36 Q_OBJECT
37
38public:
39 explicit MainWindow(QWidget *parent = 0);
40 ~MainWindow();
Edric Milaret2cf34292015-06-22 16:27:03 -040041 void createThumbBar();
Edric Milaret627500d2015-03-27 16:41:40 -040042
Edric Milareted0b2802015-10-01 15:10:02 -040043protected:
44 bool nativeEvent(const QByteArray &eventType, void *message, long *result);
Edric Milaret627500d2015-03-27 16:41:40 -040045private slots:
46 void trayActivated(QSystemTrayIcon::ActivationReason reason);
Edric Milaret3a23e492015-04-29 14:23:48 -040047 void onIncomingCall(Call *call);
Edric Milaret627500d2015-03-27 16:41:40 -040048
49private:
50 Ui::MainWindow *ui;
51 NavStack* navStack_;
Edric Milaret627500d2015-03-27 16:41:40 -040052};
53