SVN: PLDLiveInstaller/trunk: PLDLiveInstaller.cpp PLDLiveInstaller.h

shadzik shadzik at pld-linux.org
Sat Dec 11 00:37:07 CET 2010


Author: shadzik
Date: Sat Dec 11 00:37:06 2010
New Revision: 11980

Modified:
   PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
   PLDLiveInstaller/trunk/PLDLiveInstaller.h
Log:
- advanced partitioning tool button disabled by default
- enabled when advanced mode is selected


Modified: PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
==============================================================================
--- PLDLiveInstaller/trunk/PLDLiveInstaller.cpp	(original)
+++ PLDLiveInstaller/trunk/PLDLiveInstaller.cpp	Sat Dec 11 00:37:06 2010
@@ -260,6 +260,14 @@
   KDialog::delayedDestruct();
 }
 
+void PLDLiveInstaller::enablePMbutton(bool state)
+{
+  if(state)
+    startPartitionManager->setEnabled(true);
+  else
+    startPartitionManager->setDisabled(true);
+}
+
 QWidget * PLDLiveInstaller::selectDiskWidget()
 {   
     KTitleWidget *titleWidget = new KTitleWidget(this);
@@ -281,10 +289,11 @@
     refresh->setFixedHeight(33);
     connect(refresh, SIGNAL(clicked()), diskListWidget, SLOT(refresh()));
     
-    KPushButton *startPartitionManager= new KPushButton(KIcon("partitionmanager"), i18n("Advanced partitioning tool"), buttonBox);
+    startPartitionManager = new KPushButton(KIcon("partitionmanager"), i18n("Advanced partitioning tool"), buttonBox);
     startPartitionManager->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed);
     startPartitionManager->setToolTip("Start Partition Manager");
     startPartitionManager->setIconSize(QSize(22,22));
+    startPartitionManager->setDisabled(true);
     connect(startPartitionManager, SIGNAL(clicked()), this, SLOT(startPM()));
     
     defimage = new QLabel;
@@ -321,6 +330,7 @@
     notEntireDisk = new QRadioButton;
     notEntireDisk->setText("Specify partitions manually (advanced)");
     notEntireDisk->setChecked(false);
+    connect(notEntireDisk, SIGNAL(toggled(bool)), this, SLOT(enablePMbutton(bool)));
     
     QVBoxLayout *radioButtons = new QVBoxLayout;
     radioButtons->setSpacing(10);

Modified: PLDLiveInstaller/trunk/PLDLiveInstaller.h
==============================================================================
--- PLDLiveInstaller/trunk/PLDLiveInstaller.h	(original)
+++ PLDLiveInstaller/trunk/PLDLiveInstaller.h	Sat Dec 11 00:37:06 2010
@@ -43,6 +43,7 @@
     QWidget * failedWidget();
     QProgressBar *pbar, *pwStrengthMeter;
     QPushButton *install;
+    KPushButton *startPartitionManager;
     QLineEdit *username, *password, *password2, *hostname, *usercredentials;
     DiskListWidget *diskListWidget;
     QListWidgetItem * selectedDisk;
@@ -90,6 +91,7 @@
     void checkPwStrength();
     void checkPwMatch();
     void startPM();
+    void enablePMbutton(bool state);
 };
 
 #endif // PLDLiveInstaller_H


More information about the pld-cvs-commit mailing list