Port to Qt5
[profile/ivi/hfdialer.git] / src / qmlmainwindow.h
1 /*
2  * dialer - Declarative Dialer UX Main Window.
3  * Copyright (c) 2011, Tom Swindell.
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 QMLMAINWINDOW_H
12 #define QMLMAINWINDOW_H
13
14 #include <QQuickView>
15 #include <QQmlComponent>
16 #include "qmldialer.h"
17 #include "callitem.h"
18
19 class QMLMainWindowPrivate;
20
21 class QMLMainWindow : public QQuickView 
22 {
23     Q_OBJECT;
24
25 public:
26     static   QMLMainWindow* instance();
27     static   QMLMainWindow* instanceP(QQuickView* parent);
28     ~QMLMainWindow();
29
30 Q_SIGNALS:
31     void closeWindow();
32
33 public Q_SLOTS:
34     void tryToShow();
35     void closeEvent(); 
36     void setAdapter(QMLDialer *adapter); //TODO: Refactor out
37
38 protected Q_SLOTS:
39     void setupUi();
40
41     void onGeometryChanged();
42
43 private:
44     explicit QMLMainWindow(QQuickView *parent = 0);
45     QMLMainWindowPrivate *d;
46     QQuickView qv;
47     Q_DISABLE_COPY(QMLMainWindow)
48 };
49
50 #endif // QMLMAINWINDOW_H
51
52 /* Local Variables:      */
53 /* mode:c++              */
54 /* c-basic-offset:4      */
55 /* indent-tabs-mode: nil */
56 /* End:                  */