Added GUI setting for using system OSK;

also corrected the "useSystemOnScreenKeybard" to
"useSystemOnScreenKeyboard".
preferencesAboutTextFull
Craig Watson 9 years ago
parent 4f61ce8975
commit 7c34710325
  1. 236
      resources/forms/preferences.ui
  2. 2
      src/board/UBBoardController.cpp
  3. 5
      src/core/UBPreferencesController.cpp
  4. 2
      src/core/UBSettings.cpp
  5. 2
      src/core/UBSettings.h

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>759</width> <width>759</width>
<height>692</height> <height>718</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -24,42 +24,13 @@
<item row="1" column="0"> <item row="1" column="0">
<widget class="QTabWidget" name="mainTabWidget"> <widget class="QTabWidget" name="mainTabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>6</number> <number>0</number>
</property> </property>
<widget class="QWidget" name="displayTab"> <widget class="QWidget" name="displayTab">
<attribute name="title"> <attribute name="title">
<string>Display</string> <string>Display</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_3"> <layout class="QGridLayout" name="gridLayout_3">
<item row="3" column="0">
<spacer name="toolbarSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="9" column="0">
<spacer name="keyboardSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QGroupBox" name="multiDisplayGroupBox"> <widget class="QGroupBox" name="multiDisplayGroupBox">
<property name="title"> <property name="title">
@ -112,19 +83,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="12" column="0">
<spacer name="modeSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="0"> <item row="8" column="0">
<widget class="QGroupBox" name="toolbarGroupBox"> <widget class="QGroupBox" name="toolbarGroupBox">
<property name="sizePolicy"> <property name="sizePolicy">
@ -213,19 +171,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="7" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="0" rowspan="2"> <item row="4" column="0" rowspan="2">
<widget class="QGroupBox" name="stylusPaletteGroupBox"> <widget class="QGroupBox" name="stylusPaletteGroupBox">
<property name="minimumSize"> <property name="minimumSize">
@ -328,8 +273,8 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="10" column="0"> <item row="15" column="0">
<widget class="QGroupBox" name="keyboardGroupBox"> <widget class="QGroupBox" name="modeGroupBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -337,11 +282,11 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="title"> <property name="title">
<string>Virtual Keyboard</string> <string>Mode</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_13"> <layout class="QGridLayout" name="gridLayout_15">
<item row="0" column="0"> <item row="0" column="0">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer_5">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -357,19 +302,30 @@
</spacer> </spacer>
</item> </item>
<item row="0" column="1" rowspan="2"> <item row="0" column="1" rowspan="2">
<layout class="QGridLayout" name="gridLayout_11"> <layout class="QGridLayout" name="gridLayout_16">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_2"> <widget class="QLabel" name="modeLabel">
<property name="text"> <property name="text">
<string>Keyboard button size:</string> <string>Mode to start in:</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="keyboardPaletteKeyButtonSize"/> <widget class="QComboBox" name="startModeComboBox">
<item>
<property name="text">
<string>Board</string>
</property>
</item>
<item>
<property name="text">
<string>Desktop</string>
</property>
</item>
</widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_6">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -386,8 +342,76 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="16" column="0">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="9" column="0">
<spacer name="keyboardSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="14" column="0">
<spacer name="modeSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<spacer name="toolbarSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="13" column="0"> <item row="13" column="0">
<widget class="QGroupBox" name="modeGroupBox"> <widget class="QGroupBox" name="keyboardGroupBox">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@ -395,11 +419,18 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="title"> <property name="title">
<string>Mode</string> <string>Virtual Keyboard</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout_15"> <layout class="QGridLayout" name="gridLayout_13">
<item row="0" column="1">
<widget class="QCheckBox" name="useSystemOSKCheckBox">
<property name="text">
<string>Use system keyboard (recommended)</string>
</property>
</widget>
</item>
<item row="0" column="0"> <item row="0" column="0">
<spacer name="horizontalSpacer_5"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -414,31 +445,13 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="1" rowspan="2"> <item row="1" column="1" colspan="2">
<layout class="QGridLayout" name="gridLayout_16"> <layout class="QGridLayout" name="gridLayout_11">
<item row="0" column="0"> <item row="2" column="1">
<widget class="QLabel" name="modeLabel"> <widget class="QComboBox" name="keyboardPaletteKeyButtonSize"/>
<property name="text">
<string>Mode to start in:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="startModeComboBox">
<item>
<property name="text">
<string>Board</string>
</property>
</item>
<item>
<property name="text">
<string>Desktop</string>
</property>
</item>
</widget>
</item> </item>
<item row="0" column="2"> <item row="2" column="2">
<spacer name="horizontalSpacer_6"> <spacer name="horizontalSpacer_2">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
@ -450,24 +463,31 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Keyboard button size:</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item row="0" column="2">
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="14" column="0">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="penTab"> <widget class="QWidget" name="penTab">

@ -818,7 +818,7 @@ void UBBoardController::showKeyboard(bool show)
if(show) if(show)
UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector); UBDrawingController::drawingController()->setStylusTool(UBStylusTool::Selector);
if(UBSettings::settings()->useSystemOnScreenKeybard->get().toBool()) if(UBSettings::settings()->useSystemOnScreenKeyboard->get().toBool())
UBPlatformUtils::showOSK(show); UBPlatformUtils::showOSK(show);
else else
mPaletteManager->showVirtualKeyboard(show); mPaletteManager->showVirtualKeyboard(show);

@ -129,6 +129,7 @@ void UBPreferencesController::wire()
mPreferencesUI->keyboardPaletteKeyButtonSize->addItem(settings->supportedKeyboardSizes->at(i)); mPreferencesUI->keyboardPaletteKeyButtonSize->addItem(settings->supportedKeyboardSizes->at(i));
connect(mPreferencesUI->useSystemOSKCheckBox, SIGNAL(clicked(bool)), settings->useSystemOnScreenKeyboard, SLOT(setBool(bool)));
connect(mPreferencesUI->keyboardPaletteKeyButtonSize, SIGNAL(currentIndexChanged(const QString &)), settings->boardKeyboardPaletteKeyBtnSize, SLOT(setString(const QString &))); connect(mPreferencesUI->keyboardPaletteKeyButtonSize, SIGNAL(currentIndexChanged(const QString &)), settings->boardKeyboardPaletteKeyBtnSize, SLOT(setString(const QString &)));
connect(mPreferencesUI->startModeComboBox, SIGNAL(currentIndexChanged(int)), settings->appStartMode, SLOT(setInt(int))); connect(mPreferencesUI->startModeComboBox, SIGNAL(currentIndexChanged(int)), settings->appStartMode, SLOT(setInt(int)));
@ -199,6 +200,8 @@ void UBPreferencesController::init()
break; break;
} }
mPreferencesUI->useSystemOSKCheckBox->setChecked(settings->useSystemOnScreenKeyboard->get().toBool());
mPreferencesUI->startModeComboBox->setCurrentIndex(settings->appStartMode->get().toInt()); mPreferencesUI->startModeComboBox->setCurrentIndex(settings->appStartMode->get().toInt());
mPreferencesUI->useExternalBrowserCheckBox->setChecked(settings->webUseExternalBrowser->get().toBool()); mPreferencesUI->useExternalBrowserCheckBox->setChecked(settings->webUseExternalBrowser->get().toBool());
@ -259,6 +262,8 @@ void UBPreferencesController::defaultSettings()
mPreferencesUI->verticalChoice->setChecked(settings->appToolBarOrientationVertical->reset().toBool()); mPreferencesUI->verticalChoice->setChecked(settings->appToolBarOrientationVertical->reset().toBool());
mPreferencesUI->horizontalChoice->setChecked(!settings->appToolBarOrientationVertical->reset().toBool()); mPreferencesUI->horizontalChoice->setChecked(!settings->appToolBarOrientationVertical->reset().toBool());
mPreferencesUI->startModeComboBox->setCurrentIndex(0); mPreferencesUI->startModeComboBox->setCurrentIndex(0);
mPreferencesUI->useSystemOSKCheckBox->setChecked(settings->useSystemOnScreenKeyboard->reset().toBool());
} }
else if (mPreferencesUI->mainTabWidget->currentWidget() == mPreferencesUI->penTab) else if (mPreferencesUI->mainTabWidget->currentWidget() == mPreferencesUI->penTab)
{ {

@ -415,7 +415,7 @@ void UBSettings::init()
libIconSize = new UBSetting(this, "Library", "LibIconSize", defaultLibraryIconSize); libIconSize = new UBSetting(this, "Library", "LibIconSize", defaultLibraryIconSize);
useSystemOnScreenKeybard = new UBSetting(this, "App", "UseSystemOnScreenKeybard", false); useSystemOnScreenKeyboard = new UBSetting(this, "App", "UseSystemOnScreenKeyboard", true);
cleanNonPersistentSettings(); cleanNonPersistentSettings();
} }

@ -374,7 +374,7 @@ class UBSettings : public QObject
UBSetting* libIconSize; UBSetting* libIconSize;
UBSetting* useSystemOnScreenKeybard; UBSetting* useSystemOnScreenKeyboard;
UBSetting* magnifierDrawingMode; UBSetting* magnifierDrawingMode;
UBSetting* autoSaveInterval; UBSetting* autoSaveInterval;

Loading…
Cancel
Save