Added the ability to edit the PID number using the number pad.
[profile/ivi/hfdialer.git] / src / dialerapplication.h
1 /*
2  * hfdialer - Hands Free Voice Call Manager
3  * Copyright (c) 2012, Intel Corporation.
4  *
5  * This program is licensed under the terms and conditions of the
6  * Apache License, version 2.0.  The full text of the Apache License is at
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  */
10
11 #ifndef DIALERAPPLICATION_h
12 #define DIALERAPPLICATION_h
13
14 #include "managerproxy.h"
15 #include <QSortFilterProxyModel>
16 #include <QApplication>
17
18 class DialerApplication: public QApplication
19 {
20     Q_OBJECT
21
22     Q_PROPERTY(bool isConnected READ isConnected)
23     Q_PROPERTY(bool hasError READ hasError)
24     Q_PROPERTY(QString lastError READ lastError)
25
26 public:
27     DialerApplication(int &argc, char **argv);
28
29     static DialerApplication* instance();
30
31     virtual void releasePrestart();
32     virtual void restorePrestart();
33
34     bool hasError() const;
35     QString lastError() const;
36     void setError(const QString msg);
37
38     bool isConnected();
39
40 //    SeasideSyncModel      *seasideModel();
41 //    SeasideProxyModel     *seasideProxy();
42  //   HistoryTableModel     *historyModel();
43  //   QSortFilterProxyModel *historyProxy();
44     
45 Q_SIGNALS:
46     void showUi();
47     void hideUi();
48
49 private Q_SLOTS:
50     void connectAll();
51     void messagesWaitingChanged();
52
53     void modemChanged();
54     void modemConnected();
55     void modemDisconnected();
56     void modemInterfacesChanged(QStringList interfaces);
57     void modemPowered(bool isPowered);
58     void networkConnected();
59     void networkDisconnected();
60     void callManagerConnected();
61     void callManagerDisconnected();
62
63     void onCallsChanged();
64
65 private:
66     void init();
67
68     ManagerProxy *m_manager;
69     ModemProxy   *m_modem;
70     NetworkProxy *m_network;
71     CallManager  *m_callManager;
72
73     bool          m_connected;
74     QString       m_lastError;
75
76     //SeasideSyncModel      *m_seasideModel;
77     //SeasideProxyModel     *m_seasideProxy;
78
79     //HistoryTableModel     *m_historyModel;
80    // QSortFilterProxyModel *m_historyProxy;
81
82     Q_DISABLE_COPY(DialerApplication);
83 };
84
85 #endif // DIALERAPPLICATION_H