summaryrefslogtreecommitdiff
path: root/noncore
authorhash <hash>2002-10-24 17:56:48 (UTC)
committer hash <hash>2002-10-24 17:56:48 (UTC)
commit3773cd825129f1cc6fa7a4ecb4129634f5189984 (patch) (side-by-side diff)
treed10cc2c4e45e2b47eddcae5534f59ce8f90092b1 /noncore
parentb01703c4b1de7006c88aa814ca00472b966b2464 (diff)
downloadopie-3773cd825129f1cc6fa7a4ecb4129634f5189984.zip
opie-3773cd825129f1cc6fa7a4ecb4129634f5189984.tar.gz
opie-3773cd825129f1cc6fa7a4ecb4129634f5189984.tar.bz2
closing a session returns keyboard to default better now
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/function_keyboard.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp
index ce65052..5f3b5ec 100644
--- a/noncore/apps/opie-console/function_keyboard.cpp
+++ b/noncore/apps/opie-console/function_keyboard.cpp
@@ -13,10 +13,13 @@
#include <qcombobox.h>
#include <qdir.h>
+#define DEFAULT_ROWS 2
+#define DEFAULT_COLS 11
+
/* FunctionKeyboard {{{1 */
FunctionKeyboard::FunctionKeyboard(QWidget *parent) :
- QFrame(parent), numRows(2), numCols(11),
+ QFrame(parent), numRows(DEFAULT_ROWS), numCols(DEFAULT_COLS),
pressedRow(0), pressedCol(0) {
setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
@@ -223,6 +226,10 @@ QSize FunctionKeyboard::sizeHint() const {
void FunctionKeyboard::loadDefaults() {
+ numRows = DEFAULT_ROWS;
+ numCols = DEFAULT_COLS;
+ keyWidth = (double)width()/numCols; // have to reset this thing too
+
keys.insert( "r0c0", FKey ("Enter", "enter", Qt::Key_Enter, 0));
keys.insert( "r0c1", FKey ("Space", "space", Qt::Key_Space, Qt::Key_Space));
keys.insert( "r0c2", FKey ("Tab", "tab", Qt::Key_Tab, 0));