Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 1 | /*************************************************************************** |
Edric Milaret | 5f316da | 2015-09-28 11:57:42 -0400 | [diff] [blame] | 2 | * Copyright (C) 2015 by Savoir-faire Linux * |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 3 | * 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 Milaret | 5f316da | 2015-09-28 11:57:42 -0400 | [diff] [blame] | 19 | #pragma once |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 20 | |
Edric Milaret | 2cf3429 | 2015-06-22 16:27:03 -0400 | [diff] [blame] | 21 | #include "globalsystemtray.h" |
| 22 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 23 | #include <QMainWindow> |
| 24 | #include <QMouseEvent> |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 25 | |
| 26 | #include "navstack.h" |
| 27 | |
Edric Milaret | ed0b280 | 2015-10-01 15:10:02 -0400 | [diff] [blame] | 28 | static constexpr char IDM_ABOUTBOX = 0x0010; |
| 29 | |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 30 | namespace Ui { |
| 31 | class MainWindow; |
| 32 | } |
| 33 | |
| 34 | class MainWindow : public QMainWindow |
| 35 | { |
| 36 | Q_OBJECT |
| 37 | |
| 38 | public: |
| 39 | explicit MainWindow(QWidget *parent = 0); |
| 40 | ~MainWindow(); |
Edric Milaret | 2cf3429 | 2015-06-22 16:27:03 -0400 | [diff] [blame] | 41 | void createThumbBar(); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 42 | |
Edric Milaret | ed0b280 | 2015-10-01 15:10:02 -0400 | [diff] [blame] | 43 | protected: |
| 44 | bool nativeEvent(const QByteArray &eventType, void *message, long *result); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 45 | private slots: |
| 46 | void trayActivated(QSystemTrayIcon::ActivationReason reason); |
Edric Milaret | 3a23e49 | 2015-04-29 14:23:48 -0400 | [diff] [blame] | 47 | void onIncomingCall(Call *call); |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 48 | |
| 49 | private: |
| 50 | Ui::MainWindow *ui; |
| 51 | NavStack* navStack_; |
Edric Milaret | 627500d | 2015-03-27 16:41:40 -0400 | [diff] [blame] | 52 | }; |
| 53 | |