* first commit from develop
[lichviet-widget] / main.cpp
1 #include <QtGui/QApplication>
2
3 #include "qmlapplicationviewer.h"
4 #include "qmaemo5homescreenadaptor.h"
5
6 #include "settingsdlg.h"
7
8 int main(int argc, char *argv[])
9 {
10     QApplication app(argc, argv);
11
12     QmlApplicationViewer viewer;
13
14     viewer.setStyleSheet("background:transparent");
15     viewer.setAttribute(Qt::WA_TranslucentBackground);
16
17     viewer.setMainQmlFile(QLatin1String("/opt/lichvietwidget/qml/lichvietwidget/main.qml"));
18
19     /*
20     viewer.setFixedWidth(390);
21     viewer.setFixedHeight(340);
22     */
23
24     QMaemo5HomescreenAdaptor *adaptor = new QMaemo5HomescreenAdaptor(&viewer);
25     adaptor->setSettingsAvailable(true);
26
27     SettingsDlg settingsdlg;
28
29     QObject::connect(adaptor, SIGNAL(settingsRequested()), &settingsdlg, SLOT(showSettingsDialog()));
30
31     viewer.show();
32
33     app.exec();
34 }