equal
deleted
inserted
replaced
27 #include <QPushButton> |
27 #include <QPushButton> |
28 #include <hbapplication.h> |
28 #include <hbapplication.h> |
29 #include "hbsplashgenerator_p.h" |
29 #include "hbsplashgenerator_p.h" |
30 #include "hbsplashdefs_p.h" |
30 #include "hbsplashdefs_p.h" |
31 #include "hbsplashindicompositor_p.h" |
31 #include "hbsplashindicompositor_p.h" |
|
32 #include "hbwidgetenabler_p.h" |
32 |
33 |
33 #if defined(Q_OS_SYMBIAN) |
34 #if defined(Q_OS_SYMBIAN) |
34 #include "hbsplashgen_server_symbian_p.h" |
35 #include "hbsplashgen_server_symbian_p.h" |
35 #include <e32std.h> |
36 #include <e32std.h> |
36 #include <eikenv.h> |
37 #include <eikenv.h> |
81 #else |
82 #else |
82 qDebug("[hbsplashgenerator] initializing ui"); |
83 qDebug("[hbsplashgenerator] initializing ui"); |
83 QMainWindow mw; |
84 QMainWindow mw; |
84 QPushButton *btnRegen = new QPushButton("Regenerate"); |
85 QPushButton *btnRegen = new QPushButton("Regenerate"); |
85 gen.connect(btnRegen, SIGNAL(clicked()), SLOT(uncachedRegenerate())); |
86 gen.connect(btnRegen, SIGNAL(clicked()), SLOT(uncachedRegenerate())); |
|
87 btnRegen->setEnabled(false); // will be enabled only when the generator is really ready |
|
88 WidgetEnabler widgetEnabler(btnRegen); |
|
89 QObject::connect(&gen, SIGNAL(outputDirContentsUpdated(QString, QStringList)), |
|
90 &widgetEnabler, SLOT(enable()), Qt::QueuedConnection); |
86 mw.setCentralWidget(btnRegen); |
91 mw.setCentralWidget(btnRegen); |
87 mw.show(); |
92 mw.show(); |
88 #endif |
93 #endif |
89 |
94 |
90 // The server must be initialized before calling HbSplashGenerator::start(). |
95 // The server must be initialized before calling HbSplashGenerator::start(). |