[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/plasma/applets/plasmaboard
From: Björn Ruberg <bjoern () ruberg-wegener ! de>
Date: 2009-04-13 16:27:50
Message-ID: 1239640070.998317.3248.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 953289 by ruberg:
Arrows for the arrow keys
A ArrowBottomKey.cpp [License: GPL (v2+)]
A ArrowBottomKey.h [License: GPL (v2+)]
A ArrowLeftKey.cpp [License: GPL (v2+)]
A ArrowLeftKey.h [License: GPL (v2+)]
A ArrowRightKey.cpp [License: GPL (v2+)]
A ArrowRightKey.h [License: GPL (v2+)]
A ArrowTopKey.cpp [License: GPL (v2+)]
A ArrowTopKey.h [License: GPL (v2+)]
M +1 -1 CMakeLists.txt
M +12 -10 widget.cpp
--- trunk/playground/base/plasma/applets/plasmaboard/CMakeLists.txt #953288:953289
@@ -13,7 +13,7 @@
)
# We add our source code here
-set(plasmaboard_SRCS widget.cpp BoardKey.cpp PanelIcon.cpp AlphaNumKey.cpp \
FuncKey.cpp EnterKey.cpp BackspaceKey.cpp TabKey.cpp ShiftKey.cpp CapsKey.cpp) \
+set(plasmaboard_SRCS widget.cpp BoardKey.cpp PanelIcon.cpp AlphaNumKey.cpp \
FuncKey.cpp EnterKey.cpp BackspaceKey.cpp TabKey.cpp ShiftKey.cpp CapsKey.cpp \
ArrowTopKey.cpp ArrowBottomKey.cpp ArrowLeftKey.cpp ArrowRightKey.cpp)
# Now make sure all files get to the right place
kde4_add_plugin(plasma_applet_plasmaboard ${plasmaboard_SRCS})
--- trunk/playground/base/plasma/applets/plasmaboard/widget.cpp #953288:953289
@@ -27,6 +27,10 @@
#include "TabKey.h"
#include "ShiftKey.h"
#include "CapsKey.h"
+#include "ArrowTopKey.h"
+#include "ArrowBottomKey.h"
+#include "ArrowLeftKey.h"
+#include "ArrowRightKey.h"
#include <QPainter>
#include <QGraphicsGridLayout>
#include <X11/Xlib.h>
@@ -113,6 +117,11 @@
i++;
}
+ extKeys[22] = new ArrowTopKey(this);
+ extKeys[23] = new ArrowLeftKey(this);
+ extKeys[24] = new ArrowBottomKey(this);
+ extKeys[25] = new ArrowRightKey(this);
+
m_layout->addItem(extKeys[0], 0, 0, 1, 2, Qt::AlignLeft);
for(i = 1; i < 13; i++){
m_layout->addItem(extKeys[i], 0, (i*2)+1, 1, 2, Qt::AlignLeft);
@@ -158,9 +167,8 @@
m_layout->addItem(extKeys[23], 5, 29, 1, 2, Qt::AlignLeft);
- extKeys[23]->setKeycode(XK_Left, true);
- extKeys[23]->setText("Left");
+
int col = 31;
m_layout->addItem(extKeys[16], 1, col, 1, 2, Qt::AlignLeft);
@@ -176,18 +184,13 @@
extKeys[18]->setText("Ins");
m_layout->addItem(extKeys[22], 4, col, 1, 2, Qt::AlignLeft);
- extKeys[22]->setKeycode(XK_Up, true);
- extKeys[22]->setText("Up");
m_layout->addItem(extKeys[24], 5, col, 1, 2, Qt::AlignLeft);
- extKeys[24]->setKeycode(XK_Down, true);
- extKeys[24]->setText("Down");
+
col+=2;
m_layout->addItem(extKeys[25], 5, col, 1, 2, Qt::AlignLeft);
- extKeys[25]->setKeycode(XK_Right, true);
- extKeys[25]->setText("Right");
m_layout->addItem(extKeys[19], 1, col, 1, 2, Qt::AlignLeft);
extKeys[19]->setKeycode(XK_Delete, true);
@@ -214,7 +217,7 @@
basicKeys = true;
// create objects
- int i = 0;
+ int i = 6;
while ( i < 14 ) {
funcKeys[i] = new FuncKey(this);
i++;
@@ -361,7 +364,6 @@
funcKeys[8]->setKeycode(XK_Alt_L, false);
funcKeys[8]->setText("ALT");
funcKeys[9]->setKeycode(XK_space, true);
- funcKeys[9]->setText("SPACE");
funcKeys[10]->setKeycode(XK_ISO_Level3_Shift, false);
funcKeys[10]->setText("ALT GR");
funcKeys[11]->setKeycode(XK_Meta_L, false);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic