last change before margr with master qml
authorjakub <jakub.jaszczynski@comarch.com>
Mon, 28 Feb 2011 14:13:39 +0000 (15:13 +0100)
committerjakub <jakub.jaszczynski@comarch.com>
Mon, 28 Feb 2011 14:13:39 +0000 (15:13 +0100)
src/mdictionary/qml/ComboBox.qml
src/plugins/xdxf/XdxfDictDownloadProgressDialog.cpp
src/plugins/xdxf/XdxfDictDownloader.cpp

index b20aa0f..5ceb5b5 100644 (file)
@@ -27,6 +27,19 @@ Rectangle {
 
     signal valueSelected(string selected);
 
+   /* Keys.onPressed: {
+        console.log("tu ----");
+        if (event.key == Qt.Key_Escape)
+            rectangle1.expanded=false;
+        else if (event.key == Qt.Key_Space)
+            rectangle1.expanded=true;
+        else if (event.key == Qt.Key_Return){
+            rectangle1.expanded=false;
+            console.log("tu enter "+list1.content);
+        }
+    }
+    */
+
     Text {
         id: text1
         width: rectangle1.width-15
@@ -35,6 +48,7 @@ Rectangle {
         anchors.centerIn: parent
         font.pixelSize: rectangle1.height * .5;
         onTextChanged: { rectangle1.valueSelected(text) }
+        z: expanded?0:1;
     }
 
     Rectangle {
index 3c43c93..69a47f0 100644 (file)
@@ -51,7 +51,7 @@ XdxfDictDownloadProgressDialog::XdxfDictDownloadProgressDialog(QWidget*parent):
            rootObject, SLOT(setMaximumValue(QVariant)));
 
     connect(rootObject, SIGNAL(cancelDownloading()),
-           this, SIGNAL(cancelDownloading()));
+           this, SLOT(reject()));
 
 #else
     verticalLayout = new QVBoxLayout(this);
@@ -120,8 +120,10 @@ void XdxfDictDownloadProgressDialog::updateProgress(float progress) {
 
 
 void XdxfDictDownloadProgressDialog::reject() {
+    qDebug("tu");
     #ifndef Q_WS_MAEMO_5
-        Q_EMIT cancelDownloading();
+        emit cancelDownloading();
+        emit setValue(-1);
     #else
         return;
     #endif
index 96415d9..2b41d0b 100644 (file)
@@ -71,8 +71,6 @@ void XdxfDictDownloader::download(QWidget *parent) {
             this, SLOT(breakDownloading()));
     connect(this, SIGNAL(downloadProgress(float)),
             progressDialog, SLOT(updateProgress(float)));
-
-    qDebug()<<"etam 3.1";
     progressDialog->setText(tr("Downloading dictionaries list"));
     progressDialog->show();
 }
@@ -99,7 +97,6 @@ void XdxfDictDownloader::breakDownloading() {
     //if user cancel downloading we kill all running processes, hide progress dialog and set flag that user cancel downloading.
     aborted = true;
     http.kill();
-    qDebug()<<"end download";
     if(progressDialog && progressDialog->isVisible()) {
         progressDialog->accept();
     }