DictTypeSelectDialog ported to qml. Remove empty qml files.
[mdictionary] / src / mdictionary / gui / WelcomeScreenWidget.cpp
index f2ec62c..47a2ac3 100644 (file)
@@ -37,27 +37,30 @@ WelcomeScreenWidget::WelcomeScreenWidget(QWidget *parent) :
     mainLayout = new QVBoxLayout(this);
     setLayout(mainLayout);
 
-    qmlView = new QDeclarativeView;
+    #ifndef Q_WS_MAEMO_5
+    qmlView = new QDeclarativeView(this);
     qmlView->setSource(QUrl::fromLocalFile("/usr/share/mdictionary/qml/WelcomeScreenWidget.qml"));
 
     mainLayout->addWidget(qmlView, 0, Qt::AlignCenter);
 
-    //stary kod:
-    //imageLabel = new QLabel(this);
-    //mainLabel = new QLabel(infoNote, this);
+    #endif
+    #ifdef Q_WS_MAEMO_5
 
-    //mainLayout->addStretch(0);
-    //mainLayout->addWidget(imageLabel, 0, Qt::AlignCenter);
-    //mainLayout->addWidget(mainLabel, 0, Qt::AlignCenter);
-    //mainLayout->addStretch(0);
+    imageLabel = new QLabel(this);
+    mainLabel = new QLabel(infoNote, this);
 
-    //QImage img(":/icons/logo/mdictionary.png");
-    //imageLabel->setPixmap(QPixmap::fromImage(img));
-    //imageLabel->resize(imageLabel->pixmap()->size());
+    mainLayout->addStretch(0);
+    mainLayout->addWidget(imageLabel, 0, Qt::AlignCenter);
+    mainLayout->addWidget(mainLabel, 0, Qt::AlignCenter);
+    mainLayout->addStretch(0);
 
+    QImage img(":/icons/logo/mdictionary.png");
+    imageLabel->setPixmap(QPixmap::fromImage(img));
+    imageLabel->resize(imageLabel->pixmap()->size());
 
-    //mainLabel->setWordWrap(true);
-    //koniec kodu
+
+    mainLabel->setWordWrap(true);
+    #endif
 
     #ifdef Q_WS_MAEMO_5
         //mainLayout->addSpacing(20);