Added GUI setting for using system OSK;

also corrected the "useSystemOnScreenKeybard" to
"useSystemOnScreenKeyboard".
preferencesAboutTextFull
Craig Watson 9 years ago
parent 4f61ce8975
commit 7c34710325
  1. 224
      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>
<y>0</y>
<width>759</width>
<height>692</height>
<height>718</height>
</rect>
</property>
<property name="windowTitle">
@ -24,42 +24,13 @@
<item row="1" column="0">
<widget class="QTabWidget" name="mainTabWidget">
<property name="currentIndex">
<number>6</number>
<number>0</number>
</property>
<widget class="QWidget" name="displayTab">
<attribute name="title">
<string>Display</string>
</attribute>
<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">
<widget class="QGroupBox" name="multiDisplayGroupBox">
<property name="title">
@ -112,19 +83,6 @@
</layout>
</widget>
</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">
<widget class="QGroupBox" name="toolbarGroupBox">
<property name="sizePolicy">
@ -213,19 +171,6 @@
</layout>
</widget>
</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">
<widget class="QGroupBox" name="stylusPaletteGroupBox">
<property name="minimumSize">
@ -328,8 +273,8 @@
</layout>
</widget>
</item>
<item row="10" column="0">
<widget class="QGroupBox" name="keyboardGroupBox">
<item row="15" column="0">
<widget class="QGroupBox" name="modeGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -337,11 +282,11 @@
</sizepolicy>
</property>
<property name="title">
<string>Virtual Keyboard</string>
<string>Mode</string>
</property>
<layout class="QGridLayout" name="gridLayout_13">
<layout class="QGridLayout" name="gridLayout_15">
<item row="0" column="0">
<spacer name="horizontalSpacer">
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -357,19 +302,30 @@
</spacer>
</item>
<item row="0" column="1" rowspan="2">
<layout class="QGridLayout" name="gridLayout_11">
<layout class="QGridLayout" name="gridLayout_16">
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="modeLabel">
<property name="text">
<string>Keyboard button size:</string>
<string>Mode to start in:</string>
</property>
</widget>
</item>
<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 row="0" column="2">
<spacer name="horizontalSpacer_2">
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -386,8 +342,76 @@
</layout>
</widget>
</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">
<widget class="QGroupBox" name="modeGroupBox">
<widget class="QGroupBox" name="keyboardGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
<horstretch>0</horstretch>
@ -395,11 +419,18 @@
</sizepolicy>
</property>
<property name="title">
<string>Mode</string>
<string>Virtual Keyboard</string>
</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">
<spacer name="horizontalSpacer_5">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -414,31 +445,13 @@
</property>
</spacer>
</item>
<item row="0" column="1" rowspan="2">
<layout class="QGridLayout" name="gridLayout_16">
<item row="0" column="0">
<widget class="QLabel" name="modeLabel">
<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 row="1" column="1" colspan="2">
<layout class="QGridLayout" name="gridLayout_11">
<item row="2" column="1">
<widget class="QComboBox" name="keyboardPaletteKeyButtonSize"/>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_6">
<item row="2" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
@ -450,26 +463,33 @@
</property>
</spacer>
</item>
</layout>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Keyboard button size:</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="14" column="0">
<spacer name="verticalSpacer_7">
<item row="0" column="2">
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="penTab">
<attribute name="title">
<string>Pen</string>

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

@ -129,6 +129,7 @@ void UBPreferencesController::wire()
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->startModeComboBox, SIGNAL(currentIndexChanged(int)), settings->appStartMode, SLOT(setInt(int)));
@ -199,6 +200,8 @@ void UBPreferencesController::init()
break;
}
mPreferencesUI->useSystemOSKCheckBox->setChecked(settings->useSystemOnScreenKeyboard->get().toBool());
mPreferencesUI->startModeComboBox->setCurrentIndex(settings->appStartMode->get().toInt());
mPreferencesUI->useExternalBrowserCheckBox->setChecked(settings->webUseExternalBrowser->get().toBool());
@ -259,6 +262,8 @@ void UBPreferencesController::defaultSettings()
mPreferencesUI->verticalChoice->setChecked(settings->appToolBarOrientationVertical->reset().toBool());
mPreferencesUI->horizontalChoice->setChecked(!settings->appToolBarOrientationVertical->reset().toBool());
mPreferencesUI->startModeComboBox->setCurrentIndex(0);
mPreferencesUI->useSystemOSKCheckBox->setChecked(settings->useSystemOnScreenKeyboard->reset().toBool());
}
else if (mPreferencesUI->mainTabWidget->currentWidget() == mPreferencesUI->penTab)
{

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

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

Loading…
Cancel
Save