Thread: [Compbench-devel] CompBenchmarks++/Qt-4 compbenchmarks-ui-qt4.pro, 1.7, 1.8 main.cpp, 1.9, 1.10 mai
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-09-11 20:18:56
|
Update of /cvsroot/compbench/CompBenchmarks++/Qt-4 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21797 Modified Files: compbenchmarks-ui-qt4.pro main.cpp main.h Log Message: CBM::UIMsg handling revisited. Index: main.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main.cpp 29 Aug 2007 20:34:06 -0000 1.9 --- main.cpp 11 Sep 2007 20:18:53 -0000 1.10 *************** *** 8,11 **** --- 8,12 ---- #include <QFileDialog> + #include <QIcon> using namespace CQT; *************** *** 118,123 **** --- 119,139 ---- : QApplication(argc, argv) { + QSplitter *sp = new QSplitter(Qt::Vertical); + + QIcon I1(":/icons/success.png"); + pixmapOK=I1.pixmap(12); + + QIcon I2(":/icons/error.png"); + pixmapKO=I2.pixmap(12); + + QIcon I3(":/icons/arrow-right.png"); + pixmapRunning=I3.pixmap(12); + + mainW=new QWidget; + lay = new QHBoxLayout; + mainTab = new QTabWidget; + console=new StatusConsole; planCompilerSelected=0; App=this; *************** *** 139,142 **** --- 155,164 ---- mainTab->setTabToolTip(2, tr("Define and order contexts for benchmarks")); + sp->addWidget(mainTab); + sp->addWidget(console); + lay->addWidget(sp); + + mainW->setLayout(lay); + connect(this, SIGNAL(sigPackageInstallation(CBM::Package*)), this, SLOT(doPackageInstallation(CBM::Package*)), *************** *** 210,213 **** --- 232,251 ---- } + QPixmap *Application::pixmapObject(LedColor _color) + { + switch(_color) { + case Running: + return(&pixmapRunning); + break; + case OK: + return(&pixmapOK); + break; + case KO: + return(&pixmapKO); + break; + } + return(0); + } + void Application::doPackagesRefresh(void) { *************** *** 344,355 **** void Application::doCompilerAutodetect(void) { ! StatusWidget *W; ! CompilerAutodetectThread *T; ! ! W=new StatusWidget(0); ! W->show(); ! T=new CompilerAutodetectThread(W); ! T->start(); } --- 382,394 ---- void Application::doCompilerAutodetect(void) { ! /* StatusWidget *W; ! CompilerAutodetectThread *T; ! ! W=new StatusWidget(0); ! W->show(); ! T=new CompilerAutodetectThread(W); ! T->start(); ! */ } *************** *** 488,492 **** */ ! app->mainTab->show(); result=app->exec(); --- 527,531 ---- */ ! app->mainW->show(); result=app->exec(); Index: compbenchmarks-ui-qt4.pro =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/compbenchmarks-ui-qt4.pro,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** compbenchmarks-ui-qt4.pro 29 Aug 2007 20:34:06 -0000 1.7 --- compbenchmarks-ui-qt4.pro 11 Sep 2007 20:18:53 -0000 1.8 *************** *** 25,29 **** plan_sources = Plan/PlanAvailableOption Plan/PlanAvailableCompiler Plan/PlanAvailable Plan/PlanAvailableBenchmark Plan/PlanDefineToolBox Plan/PlanDefineBatch Plan/PlanDefine Plan/PlanManager ! all_sources = $$base_sources $$option_sources $$package_sources $$compiler_sources $$plan_sources Status/Status-UI Status/Status main defineReplace(headers) { --- 25,29 ---- plan_sources = Plan/PlanAvailableOption Plan/PlanAvailableCompiler Plan/PlanAvailable Plan/PlanAvailableBenchmark Plan/PlanDefineToolBox Plan/PlanDefineBatch Plan/PlanDefine Plan/PlanManager ! all_sources = $$base_sources $$option_sources $$package_sources $$compiler_sources $$plan_sources Status/Status Status/Status-Console main defineReplace(headers) { Index: main.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/main.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main.h 22 May 2007 17:26:06 -0000 1.7 --- main.h 11 Sep 2007 20:18:53 -0000 1.8 *************** *** 7,19 **** #include <QProgressBar> #include <QThread> #include <Package/PackageManager.h> #include <Compiler/CompilerManager.h> #include <Plan/PlanManager.h> ! #include <Plan/Plan-Batch.h> namespace CQT { class PackageInstallThread : public QThread, public PackageHolder --- 7,25 ---- #include <QProgressBar> #include <QThread> + #include <QPixmap> #include <Package/PackageManager.h> #include <Compiler/CompilerManager.h> #include <Plan/PlanManager.h> ! #include <Status/Status-Console.h> #include <Plan/Plan-Batch.h> namespace CQT { + typedef enum { Running, + Fatal, + OK, + KO } LedColor; + class PackageInstallThread : public QThread, public PackageHolder *************** *** 58,63 **** CBM::Compiler *planCompilerSelected; - public: QTabWidget *mainTab; protected: --- 64,78 ---- CBM::Compiler *planCompilerSelected; QTabWidget *mainTab; + StatusConsole *console; + QHBoxLayout *lay; + + QPixmap pixmapOK; + QPixmap pixmapKO; + QPixmap pixmapRunning; + + + public: + QWidget *mainW; protected: *************** *** 126,129 **** --- 141,146 ---- Application(int &argc, char **argv); + QPixmap *pixmapObject(LedColor _color); + virtual void packageInstallation(CBM::Package *_package); virtual void packageUninstallation(CBM::Package *_package); |