[PC-BSD Commits] r5145 - pcbsd/trunk/SysInstaller
svn at pcbsd.org
svn at pcbsd.org
Wed Nov 25 10:19:06 PST 2009
Author: kris
Date: 2009-11-25 10:19:06 -0800 (Wed, 25 Nov 2009)
New Revision: 5145
Added:
pcbsd/trunk/SysInstaller/sys-keyboardwidget.cpp
Modified:
pcbsd/trunk/SysInstaller/SysInstaller.pro
pcbsd/trunk/SysInstaller/sysinstaller.cpp
pcbsd/trunk/SysInstaller/sysinstaller.h
Log:
Updated the SysInstaller, connect keyboard model stuff, and seperated keyboard code into seperate c++ file to
keep things neat and tidy
Modified: pcbsd/trunk/SysInstaller/SysInstaller.pro
===================================================================
--- pcbsd/trunk/SysInstaller/SysInstaller.pro 2009-11-25 17:54:01 UTC (rev 5144)
+++ pcbsd/trunk/SysInstaller/SysInstaller.pro 2009-11-25 18:19:06 UTC (rev 5145)
@@ -9,6 +9,7 @@
SOURCES += main.cpp \
sysinstaller.cpp \
sys-diskwidget.cpp \
+ sys-keyboardwidget.cpp \
sys-userwidget.cpp \
dialogFileSystem.cpp \
backend.cpp
Modified: pcbsd/trunk/SysInstaller/sysinstaller.cpp
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.cpp 2009-11-25 17:54:01 UTC (rev 5144)
+++ pcbsd/trunk/SysInstaller/sysinstaller.cpp 2009-11-25 18:19:06 UTC (rev 5145)
@@ -96,10 +96,8 @@
}
connect(comboLanguage, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotChangeLanguage(QString)));
- // load keyboards
- listKbLayouts->clear();
- listKbLayouts->addItems(Scripts::Backend::keyLayouts());
- comboBoxKeyboardModel->addItems(Scripts::Backend::keyModels());
+ // Load up the keyboard information
+ connectKeyboardSlots();
// Load the timezones
comboBoxTimezone->clear();
@@ -114,11 +112,6 @@
}
// Connect buttons / slots
- connect(listKbLayouts, SIGNAL(currentRowChanged(int)), this, SLOT(slotCurrentKbLayoutChanged(int)));
- connect(listKbVariants,SIGNAL(currentRowChanged(int)), this, SLOT(slotCurrentKbVariantChanged(int)));
- connect(listKbLayouts, SIGNAL(itemSelectionChanged()), this, SLOT(slotSelectedKbItemChanged()));
- connect(listKbVariants,SIGNAL(itemSelectionChanged()), this, SLOT(slotSelectedKbItemChanged()));
- connect(checkKbDefault,SIGNAL(stateChanged(int)), this, SLOT(slotDefaultKbChecked(int)));
connect(radioInstall,SIGNAL(toggled(bool)), this, SLOT(slotChangedInstallType()));
connect(radioUpgrade,SIGNAL(toggled(bool)), this, SLOT(slotChangedInstallType()));
connect(radioRestore,SIGNAL(toggled(bool)), this, SLOT(slotChangedInstallType()));
@@ -134,9 +127,6 @@
// Connect our user management slots
connectUserSlots();
- // Set the default keyboard stuff
- setKbDefaults();
-
// Hide the network options until the user selects it
slotChangedInstallSource();
slotChangedNic();
@@ -249,55 +239,6 @@
//
}
-void SysInstaller::slotCurrentKbLayoutChanged(int row)
-{
- if (row != -1) {
- QString kbLayout = listKbLayouts->currentItem()->text();
- setKbVariants(kbLayout);
- }
-}
-
-void SysInstaller::slotCurrentKbVariantChanged(int row)
-{
- if (row != -1)
- listKbVariants->currentItem()->text();
-}
-
-void SysInstaller::setKbVariants(const QString &kbLayout)
-{
- QString laycode = kbLayout;
- listKbVariants->clear();
-
- // Get the code we should search for
- laycode = laycode.remove(0, laycode.indexOf("(") + 1);
- laycode.truncate(laycode.indexOf(")") );
-
- listKbVariants->addItems(Scripts::Backend::keyVariants(laycode, savedKeyVariants));
-
- if ( laycode == "us" )
- listKbVariants->setCurrentRow(2);
- else
- listKbVariants->setCurrentRow(0);
-}
-
-void SysInstaller::slotSelectedKbItemChanged()
-{
- checkKbDefault->setChecked(false);
- lineKbTest->clear();
-}
-
-void SysInstaller::slotDefaultKbChecked(int state)
-{
- if (state == Qt::Checked)
- setKbDefaults();
-}
-
-void SysInstaller::setKbDefaults()
-{
- // set the keyboard layout and variant defaults; :)
- listKbLayouts->setCurrentRow(0);
-}
-
void SysInstaller::slotChangedOS()
{
Modified: pcbsd/trunk/SysInstaller/sysinstaller.h
===================================================================
--- pcbsd/trunk/SysInstaller/sysinstaller.h 2009-11-25 17:54:01 UTC (rev 5144)
+++ pcbsd/trunk/SysInstaller/sysinstaller.h 2009-11-25 18:19:06 UTC (rev 5145)
@@ -63,14 +63,20 @@
void slotAbort();
void slotChangeLanguage(const QString &);
+
+ // Keyboard slots
void slotCurrentKbLayoutChanged(int);
void slotCurrentKbVariantChanged(int);
void slotSelectedKbItemChanged();
void slotDefaultKbChecked(int);
+
+ // Source slots
void slotChangedInstallType();
void slotChangedOS();
void slotChangedInstallSource();
void slotChangedNic();
+
+ // Disk Slots
void slotChangedDisk();
void slotUseEntireDiskClicked();
void slotChangeRadioCustomDisk();
@@ -110,6 +116,7 @@
bool checkUserAccountInfo();
QRegExp passwordRegExp;
+ void connectKeyboardSlots();
void proceed(bool);
bool isInstalled();
More information about the Commits
mailing list