[PC-BSD Commits] r15137 - users/kris/pc-installgui

svn at pcbsd.org svn at pcbsd.org
Thu Feb 2 08:58:27 PST 2012


Author: kris
Date: 2012-02-02 16:58:26 +0000 (Thu, 02 Feb 2012)
New Revision: 15137

Added:
   users/kris/pc-installgui/dialogKeyboard.cpp
   users/kris/pc-installgui/dialogKeyboard.h
   users/kris/pc-installgui/dialogKeyboard.ui
Modified:
   users/kris/pc-installgui/installer.cpp
   users/kris/pc-installgui/installer.h
   users/kris/pc-installgui/installer.ui
   users/kris/pc-installgui/pc-sysinstaller.pro
   users/kris/pc-installgui/sys-keyboardwidget.cpp
   users/kris/pc-installgui/sysinstaller.ui
Log:

Add keyboard widget to pc-installgui



Index: users/kris/pc-installgui/dialogKeyboard.ui
===================================================================
--- users/kris/pc-installgui/dialogKeyboard.ui	2012-02-02 16:37:30 UTC (rev 15136)
+++ users/kris/pc-installgui/dialogKeyboard.ui	2012-02-02 16:58:26 UTC (rev 15137)

Property changes on: users/kris/pc-installgui/dialogKeyboard.ui
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/xml
Modified: users/kris/pc-installgui/installer.cpp
===================================================================
--- users/kris/pc-installgui/installer.cpp	2012-02-02 16:37:30 UTC (rev 15136)
+++ users/kris/pc-installgui/installer.cpp	2012-02-02 16:58:26 UTC (rev 15137)
@@ -16,8 +16,13 @@
 
     connect(helpButton, SIGNAL(clicked()), this, SLOT(slotHelp()));
     connect(pushTouchKeyboard, SIGNAL(clicked()), this, SLOT(slotPushVirtKeyboard()));
+    connect(pushChangeKeyLayout, SIGNAL(clicked()), this, SLOT(slotPushKeyLayout()));
 
+    // Load the keyboard info
+    keyModels = Scripts::Backend::keyModels();
+    keyLayouts = Scripts::Backend::keyLayouts();
 
+
     // Start on the first screen
     installStackWidget->setCurrentIndex(0);
     backButton->setVisible(false);
@@ -33,6 +38,15 @@
     return false;
 }
 
+void Installer::slotPushKeyLayout()
+{
+  wKey = new widgetKeyboard();
+  wKey->programInit(keyModels, keyLayouts);
+  wKey->setWindowModality(Qt::ApplicationModal);
+  wKey->show();
+  wKey->raise();
+}
+
 void Installer::initInstall()
 {
     // load languages

Modified: users/kris/pc-installgui/installer.h
===================================================================
--- users/kris/pc-installgui/installer.h	2012-02-02 16:37:30 UTC (rev 15136)
+++ users/kris/pc-installgui/installer.h	2012-02-02 16:58:26 UTC (rev 15137)
@@ -11,6 +11,7 @@
 #include "ui_installer.h"
 #include "dialogHelp.h"
 #include "dialogInfoBox.h"
+#include "dialogKeyboard.h"
 #include "dialogDesktopSelection.h"
 #include "wizardFreeBSD.h"
 
@@ -44,6 +45,9 @@
     // Start xvkbd
     void slotPushVirtKeyboard();
 
+    // Keyboard selector
+    void slotPushKeyLayout();
+
     // Desktop selector slots
     void slotDesktopLeftClicked();
     void slotDesktopRightClicked();
@@ -119,6 +123,11 @@
     // FreeBSD setup wizard
     wizardFreeBSD *wFBSD;
 
+    // Keyboard Widget
+    widgetKeyboard *wKey;
+    QStringList keyModels;
+    QStringList keyLayouts;
+
 };
 
 #endif // INSTALLER_H

Modified: users/kris/pc-installgui/installer.ui
===================================================================
(Binary files differ)

Modified: users/kris/pc-installgui/pc-sysinstaller.pro
===================================================================
--- users/kris/pc-installgui/pc-sysinstaller.pro	2012-02-02 16:37:30 UTC (rev 15136)
+++ users/kris/pc-installgui/pc-sysinstaller.pro	2012-02-02 16:58:26 UTC (rev 15137)
@@ -8,6 +8,7 @@
     dialogInfoBox.cpp \
     dialogDesktopSelection.cpp \
     dialogFileSystem.cpp \
+    dialogKeyboard.cpp \
     dialogHelp.cpp \
     dialogSelectNet.cpp \
     dialogZFSMount.cpp \
@@ -18,6 +19,7 @@
     dialogInfoBox.h \
     dialogDesktopSelection.h \
     dialogFileSystem.h \
+    dialogKeyboard.h \
     dialogHelp.h \
     dialogSelectNet.h \
     dialogZFSMount.h \
@@ -94,5 +96,5 @@
 
 INSTALLS += dotrans
 
-FORMS += installer.ui dialogDesktopSelection.ui dialogFileSystem.ui dialogHelp.ui dialogSelectNet.ui dialogZFSMount.ui dialogInfoBox.ui wizardFreeBSD.ui
+FORMS += installer.ui dialogDesktopSelection.ui dialogFileSystem.ui dialogHelp.ui dialogSelectNet.ui dialogZFSMount.ui dialogInfoBox.ui wizardFreeBSD.ui dialogKeyboard.ui
 RESOURCES += sysinstaller.qrc

Modified: users/kris/pc-installgui/sys-keyboardwidget.cpp
===================================================================
--- users/kris/pc-installgui/sys-keyboardwidget.cpp	2012-02-02 16:37:30 UTC (rev 15136)
+++ users/kris/pc-installgui/sys-keyboardwidget.cpp	2012-02-02 16:58:26 UTC (rev 15137)
@@ -1,6 +1,6 @@
 #include "sysinstaller.h"
 
-void SysInstaller::connectKeyboardSlots()
+void widgetKeyboard::connectKeyboardSlots()
 {
   // load keyboards
   listKbLayouts->clear();
@@ -24,12 +24,12 @@
 }
 
 // Start xvkbd
-void SysInstaller::slotPushVirtKeyboard()
+void widgetKeyboard::slotPushVirtKeyboard()
 {
    system("killall -9 xvkbd; xvkbd -compact &");
 }
 
-void SysInstaller::slotCurrentKbLayoutChanged(int row)
+void widgetKeyboard::slotCurrentKbLayoutChanged(int row)
 {
     if (row != -1) {
         QString kbLayout = listKbLayouts->currentItem()->text();
@@ -39,7 +39,7 @@
    slotUpdateKbOnSys();
 }
 
-void SysInstaller::slotToggleKeyLayout()
+void widgetKeyboard::slotToggleKeyLayout()
 {
   if ( ! comboBoxKeyboardModel->currentIndex() == -1 )
      return;
@@ -58,7 +58,7 @@
    }
 }
 
-void SysInstaller::slotUpdateKbOnSys()
+void widgetKeyboard::slotUpdateKbOnSys()
 {
   QString model, layout, variant;
 
@@ -88,7 +88,7 @@
   Scripts::Backend::changeKbMap(model, layout, variant);
 }
 
-void SysInstaller::slotCurrentKbVariantChanged(int row)
+void widgetKeyboard::slotCurrentKbVariantChanged(int row)
 {
    if (row != -1)
       listKbVariants->currentItem()->text();
@@ -96,7 +96,7 @@
    slotUpdateKbOnSys();
 }
 
-void SysInstaller::setKbVariants(const QString &kbLayout)
+void widgetKeyboard::setKbVariants(const QString &kbLayout)
 {
     QString laycode = kbLayout;
     listKbVariants->clear();
@@ -111,13 +111,13 @@
     listKbVariants->setCurrentRow(0);
 }
 
-void SysInstaller::slotSelectedKbItemChanged()
+void widgetKeyboard::slotSelectedKbItemChanged()
 {
     lineKbTest->clear();
 }
 
 // set the keyboard layout and variant defaults
-void SysInstaller::setKbDefaults()
+void widgetKeyboard::setKbDefaults()
 {
 	// Find the "us" key layout as the default
 	for ( int i = 0; i < listKbLayouts->count(); i++ )

Modified: users/kris/pc-installgui/sysinstaller.ui
===================================================================
(Binary files differ)



More information about the Commits mailing list