src/hbservers/hbsplashgenerator/main.cpp
changeset 7 923ff622b8b9
parent 5 627c4a0fd0e7
child 21 4633027730f5
child 34 ed14f46c0e55
--- a/src/hbservers/hbsplashgenerator/main.cpp	Wed Jun 23 18:33:25 2010 +0300
+++ b/src/hbservers/hbsplashgenerator/main.cpp	Tue Jul 06 14:36:53 2010 +0300
@@ -29,6 +29,7 @@
 #include "hbsplashgenerator_p.h"
 #include "hbsplashdefs_p.h"
 #include "hbsplashindicompositor_p.h"
+#include "hbwidgetenabler_p.h"
 
 #if defined(Q_OS_SYMBIAN)
 #include "hbsplashgen_server_symbian_p.h"
@@ -83,6 +84,10 @@
     QMainWindow mw;
     QPushButton *btnRegen = new QPushButton("Regenerate");
     gen.connect(btnRegen, SIGNAL(clicked()), SLOT(uncachedRegenerate()));
+    btnRegen->setEnabled(false); // will be enabled only when the generator is really ready
+    WidgetEnabler widgetEnabler(btnRegen);
+    QObject::connect(&gen, SIGNAL(outputDirContentsUpdated(QString, QStringList)),
+                     &widgetEnabler, SLOT(enable()), Qt::QueuedConnection);
     mw.setCentralWidget(btnRegen);
     mw.show();
 #endif