Author: shadzik
Date: Sat Dec 11 00:00:45 2010
New Revision: 11979

Modified:
   PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
   PLDLiveInstaller/trunk/PLDLiveInstaller.h
Log:
- add automatic partitioning (not yet implemented, but the UI is ready)
- idea by vipens cipens^W


Modified: PLDLiveInstaller/trunk/PLDLiveInstaller.cpp
==============================================================================
--- PLDLiveInstaller/trunk/PLDLiveInstaller.cpp (original)
+++ PLDLiveInstaller/trunk/PLDLiveInstaller.cpp Sat Dec 11 00:00:45 2010
@@ -46,6 +46,7 @@
     showButton(KDialog::Help, false);
     showButton(KDialog::Cancel, false);
     showButton(KDialog::User1, false);
+    showButtonSeparator(true);
    
     // Start
     startPage = addPage(startWidget(), i18n(""));
@@ -280,7 +281,7 @@
     refresh->setFixedHeight(33);
     connect(refresh, SIGNAL(clicked()), diskListWidget, SLOT(refresh()));
     
-    KPushButton *startPartitionManager= new 
KPushButton(KIcon("partitionmanager"), i18n("Start Partition Manager"), 
buttonBox);
+    KPushButton *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));
@@ -313,10 +314,25 @@
     ));
     text->setFixedHeight(40);
     
+    entireDisk = new QRadioButton;
+    entireDisk->setText("Erase and use entire disk");
+    entireDisk->setChecked(true);
+    
+    notEntireDisk = new QRadioButton;
+    notEntireDisk->setText("Specify partitions manually (advanced)");
+    notEntireDisk->setChecked(false);
+    
+    QVBoxLayout *radioButtons = new QVBoxLayout;
+    radioButtons->setSpacing(10);
+    radioButtons->addWidget(entireDisk);
+    radioButtons->addWidget(notEntireDisk);
+    
     QVBoxLayout *disksLayout = new QVBoxLayout;
     disksLayout->addWidget(text);
     disksLayout->addWidget(diskListWidget);
     disksLayout->addWidget(buttonBox);
+    disksLayout->addSpacing(10);
+    disksLayout->addLayout(radioButtons);
     disksLayout->setSpacing(0);
     
     QHBoxLayout *midLayout = new QHBoxLayout;
@@ -1821,6 +1837,11 @@
        //partitionDialog->button(KDialog::Apply)->click();
       
       if (currentPage() == selectDiskPage) {
+       if(entireDisk->isChecked())
+         setAppropriate(selectPartitionsPage, false);
+       else
+       {
+         setAppropriate(selectPartitionsPage, true);
        qDebug() << "Selected disk:" << selectedDisk->toolTip();
        if(availablePartitions.count()>0)
          availablePartitions.clear();
@@ -1861,6 +1882,7 @@
         "You've selected disk: <b>" + dev + "</b><br />"
         "Now select where you want to install the system and swap</p></html>");
        }
+       }
       }
        
       if (currentPage() == createUserPage)

Modified: PLDLiveInstaller/trunk/PLDLiveInstaller.h
==============================================================================
--- PLDLiveInstaller/trunk/PLDLiveInstaller.h   (original)
+++ PLDLiveInstaller/trunk/PLDLiveInstaller.h   Sat Dec 11 00:00:45 2010
@@ -51,7 +51,7 @@
     QLabel *devSizeInfo, *devSizeInfoIcon, *samePartTwice, *samePartTwiceIcon;
     QStringList availablePartitions, fsTypes, formatOpts;
     KComboBox * rootPart,* swapPart, * fs;
-    QRadioButton *autoLogin, *noAutoLogin;
+    QRadioButton *autoLogin, *noAutoLogin, *entireDisk, *notEntireDisk;
     int rootPartPos, swapPartPos, pbarVal;
     bool selHDDisRem, isPartBigEnough, installBootLoader, pwMatch, userSet, 
doFormat;
     QLabel *defimage, *image, *image2, *partImage, *partImage2, *partDescr;
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to