Thai Virtual Keyboard (TVK)
TVK is a virtual keyboard for the Thai language written for the QT GUI toolkit in C++ (QT versions 3 and 4). TVK is used in Sontana and is intended to be used by other software developers in their own programs.The virtual keyboard is resizable and includes all Thai letters, even the rarely used komut, fongman, pintu, yamakan, angkanku and nikhahit; as defined by TIS 620-2533/UniCode 3.
TVK is very flexible with respect to size. You can resize to almost any aspect with any font size. It would be very easy to use in a kiosk type computer with touch screen.
Screenshots...
Using TVK
Simply point and click on the keyboard.- Changing font:
- The virtual "F" key calls up a font dialog so you can choose which font to use.
- After changing font TVK will automatically resize to the best fit.
- Use ^- (CTRL minus sign) and ^+ (CTRL plus sign) to decrease and increase font size; TVK will automatically resize.
- Use ^0 (CTRL zero) to undo the last font change.
- Resizing TVK: You can resize the window and TVK at any time, this does not affect the font size.
- Typing: You can type with the physical keyboard while TVK is the active widget, key events can be passed to any other widget.
- Settings: TVK maintains the chosen font and size so it will be used the next time TVK is started.
How To Use In Your Own Software
The widget allows text to be input by clicking on a keyboard. The key is highlighted when you click on it. The widget emits a signal corresponding to the TIS-620 code for the letter, it's up to you to make a suitable slot. TVK does not include any composition; it is up to the programmer to ensure that input is correct for WTT (run anywhere) specification.A test program is included for you to verify the basic behaviour. The class emits the signal void KeyPressed(int tis620val) where tis620val is the TIS-620 coding of the letter. For action keys like tab, enter and delete the ASCII code is emitted.
This is all the code you need:
... // Declare the keyboard widget ThaiVirtualKeyboard *tvk = new ThaiVirtualKeyboard; ... // Connect the keyboard widget to the editing widget connect(tvk, SIGNAL(KeyPressed(int)), myEditWidget, SLOT(insertCharacter(int))); ... /// Show the keyboard on screen tvk->show(); ... |