62a07b88b52c8f0dda14d89e73d6e7859b051e4c
[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 <QDeclarativeView>
15 #include <QDeclarativeComponent>
16 #include "qmldialer.h"
17 #include "callitem.h"
18
19 class QMLMainWindowPrivate;
20
21 class QMLMainWindow : public QDeclarativeView 
22 {
23     Q_OBJECT;
24
25 public:
26     static   QMLMainWindow* instance();
27     static   QMLMainWindow* instanceP(QWidget* 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(QWidget *parent = 0);
45     QMLMainWindowPrivate *d;
46     QDeclarativeView 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:                  */