[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/ktouch/src
From:       Andreas Nicolai <Andreas.Nicolai () gmx ! net>
Date:       2007-06-21 11:35:55
Message-ID: 1182425755.843551.22364.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 678431 by ghorwin:

Added configuration option for hiding/dimming yet unknown keys.


 M  +11 -1     ktouchkeyboardwidget.cpp  
 M  +14 -7     ui/ktouchprefkeyboardpage.ui  


--- trunk/KDE/kdeedu/ktouch/src/ktouchkeyboardwidget.cpp #678430:678431
@@ -134,7 +134,17 @@
 
 void KTouchKeyboardWidget::setKnownChars(const QSet<QChar>& knownChars) {
     if (!Prefs::showKeyboard()) return;
-	if (!Prefs::showLearnedKeysOnly()) return;
+	if (!Prefs::showLearnedKeysOnly()) {
+		// make sure all key states are set to normal and then show the next key again
+		QList<KTouchKey*>::iterator it;
+		for( it = m_keyboard->m_keys.begin(); it != m_keyboard->m_keys.end(); ++it ) {
+			KTouchKey * key = *it;
+			key->m_state = KTouchKey::NormalState;
+			key->update();
+		}
+		newKey(m_nextKey);
+		return;
+	}
 	kDebug() << "KTouchKeyboardWidget::setKnownChars: " << m_nextKey << endl;
 	m_knownChars = knownChars;
 	// loop over all keys and set them to disabled at first
--- trunk/KDE/kdeedu/ktouch/src/ui/ktouchprefkeyboardpage.ui #678430:678431
@@ -6,14 +6,14 @@
     <x>0</x>
     <y>0</y>
     <width>396</width>
-    <height>217</height>
+    <height>298</height>
    </rect>
   </property>
   <property name="windowTitle" >
    <string>Keyboard Settings</string>
   </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" >
+  <layout class="QVBoxLayout" >
+   <item>
     <widget class="QGroupBox" name="kcfg_ShowKeyboard" >
      <property name="title" >
       <string>Show keyboard</string>
@@ -21,8 +21,8 @@
      <property name="checkable" >
       <bool>true</bool>
      </property>
-     <layout class="QGridLayout" >
-      <item row="0" column="0" >
+     <layout class="QVBoxLayout" >
+      <item>
        <widget class="QCheckBox" name="kcfg_ShowAnimation" >
         <property name="toolTip" >
          <string>Show on the keyboards the keys you have to type</string>
@@ -35,7 +35,14 @@
         </property>
        </widget>
       </item>
-      <item row="1" column="0" >
+      <item>
+       <widget class="QCheckBox" name="kcfg_ShowLearnedKeysOnly" >
+        <property name="text" >
+         <string>Hide/dim not yet learned keys </string>
+        </property>
+       </widget>
+      </item>
+      <item>
        <widget class="QGroupBox" name="kcfg_OverrideKeyboardFont" >
         <property name="toolTip" >
          <string>If checked you can specify your own keyboard font instead of the \
predefined one of the keyboard layout.</string> @@ -91,7 +98,7 @@
      </layout>
     </widget>
    </item>
-   <item row="1" column="0" >
+   <item>
     <spacer>
      <property name="orientation" >
       <enum>Qt::Vertical</enum>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic