[PC-BSD Commits] r5147 - pcbsd/trunk/SysInstaller
svn at pcbsd.org
svn at pcbsd.org
Wed Nov 25 11:26:54 PST 2009
Author: kris
Date: 2009-11-25 11:26:54 -0800 (Wed, 25 Nov 2009)
New Revision: 5147
Added:
pcbsd/trunk/SysInstaller/sys-componentwidget.cpp
Modified:
pcbsd/trunk/SysInstaller/SysInstaller.pro
pcbsd/trunk/SysInstaller/backend.cpp
pcbsd/trunk/SysInstaller/backend.h
pcbsd/trunk/SysInstaller/sysinstaller.h
Log:
Added new source file for components widget, start creating backend entries to let us load / display components for
the user
Modified: pcbsd/trunk/SysInstaller/SysInstaller.pro
===================================================================
--- pcbsd/trunk/SysInstaller/SysInstaller.pro 2009-11-25 19:03:21 UTC (rev 5146)
+++ pcbsd/trunk/SysInstaller/SysInstaller.pro 2009-11-25 19:26:54 UTC (rev 5147)
@@ -8,6 +8,7 @@
TEMPLATE = app
SOURCES += main.cpp \
sysinstaller.cpp \
+ sys-componentwidget.cpp \
sys-diskwidget.cpp \
sys-keyboardwidget.cpp \
sys-userwidget.cpp \
Modified: pcbsd/trunk/SysInstaller/backend.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/backend.cpp 2009-11-25 19:03:21 UTC (rev 5146)
+++ pcbsd/trunk/SysInstaller/backend.cpp 2009-11-25 19:26:54 UTC (rev 5147)
@@ -171,6 +171,37 @@
kbp.waitForFinished();
}
+QList<QStringList> Backend::availComponents()
+{
+ QList<QStringList> components;
+ QStringList singleComponent;
+
+ QString tmp, name, desc, icon, line;
+
+ Process p(QStringList() << "list-components");
+
+ if (p.waitForFinished()) {
+ while (p.canReadLine()) {
+ line = p.readLine();
+ if ( line.indexOf("name:") != -1 ) {
+ name = line.remove(0, line.indexOf(": ") + 2);
+ }
+ if ( line.indexOf("descr:") != -1 ) {
+ desc = line.remove(0, line.indexOf(": ") + 2);
+ }
+ if ( line.indexOf("icon:") != -1 ) {
+ icon = line.remove(0, line.indexOf(": ") + 2);
+ singleComponent << name << desc << icon;
+ components << singleComponent;
+ singleComponent.clear();
+ }
+ }
+ }
+
+ components << singleComponent;
+ return components;
+}
+
QList<QStringList> Backend::hardDrives()
{
QList<QStringList> drives;
Modified: pcbsd/trunk/SysInstaller/backend.h
===================================================================
--- pcbsd/trunk/SysInstaller/backend.h 2009-11-25 19:03:21 UTC (rev 5146)
+++ pcbsd/trunk/SysInstaller/backend.h 2009-11-25 19:26:54 UTC (rev 5147)
@@ -46,6 +46,7 @@
static QStringList timezones();
static void changeKbMap(QString model, QString layout, QString variant);
static QList<QStringList> hardDrives();
+ static QList<QStringList> availComponents();
static int systemMemory();
//static QList<QStringList> slices();
Modified: pcbsd/trunk/SysInstaller/sysinstaller.h
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.h 2009-11-25 19:03:21 UTC (rev 5146)
+++ pcbsd/trunk/SysInstaller/sysinstaller.h 2009-11-25 19:26:54 UTC (rev 5147)
@@ -71,13 +71,15 @@
void slotDefaultKbChecked(int);
void slotUpdateKbOnSys();
+ // Component slots
+
// Source slots
void slotChangedInstallType();
void slotChangedOS();
void slotChangedInstallSource();
void slotChangedNic();
- // Disk Slots
+ // Disk slots
void slotChangedDisk();
void slotUseEntireDiskClicked();
void slotChangeRadioCustomDisk();
@@ -118,6 +120,7 @@
QRegExp passwordRegExp;
void connectKeyboardSlots();
+ void connectComponentSlots();
void proceed(bool);
bool isInstalled();
More information about the Commits
mailing list