[PC-BSD Commits] r5110 - pcbsd/trunk/SysInstaller

svn at pcbsd.org svn at pcbsd.org
Fri Nov 20 09:20:02 PST 2009


Author: kris
Date: 2009-11-20 09:20:02 -0800 (Fri, 20 Nov 2009)
New Revision: 5110

Modified:
   pcbsd/trunk/SysInstaller/dialogFileSystem.cpp
   pcbsd/trunk/SysInstaller/dialogFileSystem.h
   pcbsd/trunk/SysInstaller/dialogFileSystem.ui
   pcbsd/trunk/SysInstaller/sys-diskwidget.cpp
   pcbsd/trunk/SysInstaller/sysinstaller.cpp
   pcbsd/trunk/SysInstaller/sysinstaller.h
Log:

Updated our dialogFileSystem, connect buttons to open it, do general framework before adding its guts



Modified: pcbsd/trunk/SysInstaller/dialogFileSystem.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/dialogFileSystem.cpp	2009-11-20 16:33:13 UTC (rev 5109)
+++ pcbsd/trunk/SysInstaller/dialogFileSystem.cpp	2009-11-20 17:20:02 UTC (rev 5110)
@@ -6,3 +6,38 @@
 {
     //delete ui;
 }
+
+
+// Init our dialog with our disk / layout from the parent
+void dialogFileSystem::dialogInit(QList<QStringList> disks, QList<QStringList> disklayout)
+{
+
+  connect(pushCancel, SIGNAL(clicked()), this, SLOT(slotPushCancel()));
+  connect(pushSave, SIGNAL(clicked()), this, SLOT(slotPushSave()));
+
+  sysDisks = disks;
+  sysFinalDiskLayout = disklayout;
+  comboDiskSelection->clear();
+
+  // Start adding / listing our disks / partitions available
+  for (int i=0; i < sysDisks.count(); ++i) {
+    // Make sure to only add the drives to the comboDiskList
+    if ( sysDisks.at(i).at(0) == "DRIVE" )
+      comboDiskSelection->addItem(sysDisks.at(i).at(1) + " - " + sysDisks.at(i).at(2) + "MB " + sysDisks.at(i).at(3));
+    else
+      comboDiskSelection->addItem("   " + sysDisks.at(i).at(2) + " - " + sysDisks.at(i).at(3) + "MB " + sysDisks.at(i).at(4));
+  }
+
+}
+
+// Slot for closing the dialog
+void dialogFileSystem::slotPushCancel()
+{
+  close();
+}
+
+// Slot for saving the dialog
+void dialogFileSystem::slotPushSave()
+{
+  close();
+}

Modified: pcbsd/trunk/SysInstaller/dialogFileSystem.h
===================================================================
--- pcbsd/trunk/SysInstaller/dialogFileSystem.h	2009-11-20 16:33:13 UTC (rev 5109)
+++ pcbsd/trunk/SysInstaller/dialogFileSystem.h	2009-11-20 17:20:02 UTC (rev 5110)
@@ -10,22 +10,6 @@
 
 #include "backend.h"
 
-class Label : public QLabel {
-public:
-    Label(const QString label, QWidget *parent) : QLabel(label, parent) {
-        setMargin(5);
-        setIndent(10);
-        setMinimumSize(120, 35);
-        setStyleSheet("color: rgb(255, 255, 255);");
-
-        //setAlignment(Qt::AlignRight);
-        QFont font;
-        font.setBold(true);
-        setFont(font);
-    }
-};
-
-
 class dialogFileSystem : public QDialog, private Ui::dialogFileSystem
 {
     Q_OBJECT
@@ -35,14 +19,16 @@
         {
           setupUi(this);
         }
-
     ~dialogFileSystem();
 
+    void dialogInit(QList<QStringList> disks, QList<QStringList> disklayout); 
+
 private slots:
+    void slotPushCancel();
+    void slotPushSave();
 
 private:
     QList<QStringList> sysDisks; // Our lists which contains disk info
-    QList<QStringList> sysPartitions; // Our lists which contains partition info
     QList<QStringList> sysFinalDiskLayout; // Our lists which contains the final disk layout
 };
 

Modified: pcbsd/trunk/SysInstaller/dialogFileSystem.ui
===================================================================
--- pcbsd/trunk/SysInstaller/dialogFileSystem.ui	2009-11-20 16:33:13 UTC (rev 5109)
+++ pcbsd/trunk/SysInstaller/dialogFileSystem.ui	2009-11-20 17:20:02 UTC (rev 5110)
@@ -25,7 +25,7 @@
     </widget>
    </item>
    <item row="1" column="0">
-    <widget class="QComboBox" name="comboBox"/>
+    <widget class="QComboBox" name="comboDiskSelection"/>
    </item>
    <item row="2" column="0">
     <widget class="QLabel" name="label_2">
@@ -35,7 +35,7 @@
     </widget>
    </item>
    <item row="3" column="0">
-    <widget class="QComboBox" name="comboBox_2"/>
+    <widget class="QComboBox" name="comboDiskType"/>
    </item>
    <item row="4" column="0">
     <widget class="QStackedWidget" name="stackedWidgetOptions">
@@ -185,7 +185,7 @@
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="pushButton_2">
+      <widget class="QPushButton" name="pushCancel">
        <property name="text">
         <string>&amp;Cancel</string>
        </property>
@@ -205,7 +205,7 @@
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="pushButton">
+      <widget class="QPushButton" name="pushSave">
        <property name="text">
         <string>&amp;Save</string>
        </property>

Modified: pcbsd/trunk/SysInstaller/sys-diskwidget.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sys-diskwidget.cpp	2009-11-20 16:33:13 UTC (rev 5109)
+++ pcbsd/trunk/SysInstaller/sys-diskwidget.cpp	2009-11-20 17:20:02 UTC (rev 5110)
@@ -198,7 +198,30 @@
 
 }
 
+// Function which will add a new filesystem in our custom dialog
+void SysInstaller::slotAddNewFileSystem()
+{
+  dialogFileSystem *dls = new dialogFileSystem();
+  dls->dialogInit(sysDisks, sysFinalDiskLayout);
+  dls->show();
+}
 
+// Function which will edit a filesystem the user has selected
+void SysInstaller::slotEditFileSystem()
+{
+  dialogFileSystem *dls = new dialogFileSystem();
+  dls->dialogInit(sysDisks, sysFinalDiskLayout);
+  //dls->editLayout(ID);
+  dls->show();
+}
+
+// Function which will delete a filesystem
+void SysInstaller::slotRemoveFileSystem()
+{
+
+}
+
+
 // Function which will refresh the custom partition widget based upon our sysFileDiskLayout
 void SysInstaller::slotRefreshCustomPartitionWidget()
 {

Modified: pcbsd/trunk/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-11-20 16:33:13 UTC (rev 5109)
+++ pcbsd/trunk/SysInstaller/sysinstaller.cpp	2009-11-20 17:20:02 UTC (rev 5110)
@@ -116,6 +116,9 @@
     connect(radioCustomDisk,SIGNAL(toggled(bool)), this, SLOT(slotChangeRadioCustomDisk()));
     connect(radioAutoPartition,SIGNAL(toggled(bool)), this, SLOT(slotChangeRadioCustomDisk()));
     connect(pushAutoMount,SIGNAL(clicked()), this, SLOT(slotPushAutoMountClicked()));
+    connect(pushAddMount,SIGNAL(clicked()), this, SLOT(slotAddNewFileSystem()));
+    connect(pushEditMount,SIGNAL(clicked()), this, SLOT(slotPushAutoMountClicked()));
+    connect(pushRemoveMount,SIGNAL(clicked()), this, SLOT(slotPushAutoMountClicked()));
 
 
     // Hide the ID part of our custom treeWidget

Modified: pcbsd/trunk/SysInstaller/sysinstaller.h
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.h	2009-11-20 16:33:13 UTC (rev 5109)
+++ pcbsd/trunk/SysInstaller/sysinstaller.h	2009-11-20 17:20:02 UTC (rev 5110)
@@ -7,6 +7,7 @@
 
 
 #include "ui_sysinstaller.h"
+#include "dialogFileSystem.h"
 
 #include "backend.h"
 
@@ -75,6 +76,9 @@
     void slotChangeRadioCustomDisk();
     void slotRefreshCustomPartitionWidget(); // Slot which refreshes the custom partition view
     void slotPushAutoMountClicked(); // Slot when user clicks to auto-create partitions in custom view
+    void slotAddNewFileSystem();
+    void slotEditFileSystem();
+    void slotRemoveFileSystem();
 
 private:
     void initSteps();
@@ -94,6 +98,7 @@
     bool checkDiskRequirements();
 
     QStackedWidget *stackWidget;
+    dialogFileSystem *dfs;
 
     QList<Step> steps;
     QList<Label *> labels;  // just to handle the "Labels" list



More information about the Commits mailing list