[cmake-commits] clinton committed CMakeSetupDialog.cxx 1.14 1.15 CMakeSetupDialog.h 1.12 1.13 CMakeSetupDialog.ui 1.9 1.10

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Nov 7 11:31:58 EST 2007


Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv17358

Modified Files:
	CMakeSetupDialog.cxx CMakeSetupDialog.h CMakeSetupDialog.ui 
Log Message:

ENH: remove status bar and move interrupt/progress next to configure/generate.



Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- CMakeSetupDialog.cxx	7 Nov 2007 15:09:02 -0000	1.14
+++ CMakeSetupDialog.cxx	7 Nov 2007 16:31:55 -0000	1.15
@@ -80,14 +80,9 @@
   this->Splitter->setStretchFactor(0, 2);
   this->Splitter->setStretchFactor(1, 1);
   this->setCentralWidget(cont);
-  this->ProgressBar = new QProgressBar();
-  this->ProgressBar->setRange(0,100);
-  this->InterruptButton = new QToolButton();
-  this->InterruptButton->setEnabled(false);
+  this->ProgressBar->reset();
   this->InterruptButton->setIcon(
     this->style()->standardPixmap(QStyle::SP_DialogCancelButton));
-  this->statusBar()->addPermanentWidget(this->InterruptButton);
-  this->statusBar()->addPermanentWidget(this->ProgressBar);
 
   QMenu* FileMenu = this->menuBar()->addMenu(tr("&File"));
   this->ReloadCacheAction = FileMenu->addAction(tr("&Reload Cache"));
@@ -180,8 +175,6 @@
                    Qt::BlockingQueuedConnection);
 
   QObject::connect(this->InterruptButton, SIGNAL(clicked(bool)),
-                   this->CMakeThread->cmakeInstance(), SLOT(interrupt()));
-  QObject::connect(this->InterruptButton, SIGNAL(clicked(bool)),
                    this, SLOT(doInterrupt()));
   
   QObject::connect(this->CMakeThread->cmakeInstance(),
@@ -282,7 +275,6 @@
   this->InterruptButton->setEnabled(false);
   this->setEnabledState(true);
   this->ProgressBar->reset();
-  this->statusBar()->showMessage(tr("Configure Done"), 2000);
   if(err != 0)
     {
     QMessageBox::critical(this, tr("Error"), 
@@ -301,7 +293,6 @@
   this->setEnabledState(true);
   this->setGenerateEnabled(true);
   this->ProgressBar->reset();
-  this->statusBar()->showMessage(tr("Generate Done"));
   if(err != 0)
     {
     QMessageBox::critical(this, tr("Error"), 
@@ -387,7 +378,8 @@
 void CMakeSetupDialog::doInterrupt()
 {
   this->InterruptButton->setEnabled(false);
-  this->statusBar()->showMessage(tr("Interrupting..."));
+  QMetaObject::invokeMethod(this->CMakeThread->cmakeInstance(),
+    "interrupt", Qt::QueuedConnection);
 }
 
 void CMakeSetupDialog::doSourceBrowse()
@@ -442,9 +434,8 @@
   this->SourceDirectory->setText(dir);
 }
 
-void CMakeSetupDialog::showProgress(const QString& msg, float percent)
+void CMakeSetupDialog::showProgress(const QString& /*msg*/, float percent)
 {
-  this->statusBar()->showMessage(msg);
   this->ProgressBar->setValue(qRound(percent * 100));
 }
   

Index: CMakeSetupDialog.ui
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.ui,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- CMakeSetupDialog.ui	7 Nov 2007 15:09:02 -0000	1.9
+++ CMakeSetupDialog.ui	7 Nov 2007 16:31:55 -0000	1.10
@@ -183,6 +183,26 @@
        </property>
       </spacer>
      </item>
+     <item>
+      <widget class="QToolButton" name="InterruptButton" >
+       <property name="enabled" >
+        <bool>false</bool>
+       </property>
+       <property name="text" >
+        <string>...</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QProgressBar" name="ProgressBar" >
+       <property name="value" >
+        <number>0</number>
+       </property>
+       <property name="textVisible" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
     </layout>
    </item>
   </layout>

Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- CMakeSetupDialog.h	7 Nov 2007 15:09:02 -0000	1.12
+++ CMakeSetupDialog.h	7 Nov 2007 16:31:55 -0000	1.13
@@ -75,8 +75,6 @@
   void dropEvent(QDropEvent*);
 
   QCMakeThread* CMakeThread;
-  QProgressBar* ProgressBar;
-  QToolButton* InterruptButton;
   bool ExitAfterGenerate;
   QAction* ReloadCacheAction;
   QAction* DeleteCacheAction;



More information about the Cmake-commits mailing list