Diffstat (limited to 'noncore/apps/opie-console/function_keyboard.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/function_keyboard.h | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.h b/noncore/apps/opie-console/function_keyboard.h index 05b991d..496d932 100644 --- a/noncore/apps/opie-console/function_keyboard.h +++ b/noncore/apps/opie-console/function_keyboard.h @@ -4,2 +4,3 @@ #include <qpe/config.h> +#include <qpe/qpeapplication.h> #include <qframe.h> @@ -14,17 +15,18 @@ -class FKey { - -public: +struct FKey { FKey(): qcode(0), unicode(0) {}; - FKey(const QString &l, ushort q, ushort u): label(l), qcode(q), unicode(u) {}; + FKey(const QString &l, const QString &f, ushort q, ushort u): + label(l), pixFile(f), qcode(q), unicode(u) { + + if (!f.isEmpty()) { - QString getL() { return label; } - ushort getQ() { return qcode; } - ushort getU() { return unicode; } + pix = new QPixmap (QPEApplication::qpeDir() + "pics/console/keys/" + f); - -private: + } + }; QString label; + QPixmap *pix; + QString pixFile; ushort qcode; @@ -40,2 +42,4 @@ public: + friend class FunctionKeyboardConfig; + void changeRows(int); @@ -43,4 +47,6 @@ public: + //Key getKey(int, int); + void paintEvent(QPaintEvent *); - void paintKey(int, int); + void paintKey(uint, uint); void mousePressEvent(QMouseEvent*); @@ -52,3 +58,3 @@ signals: - void keyPressed(ushort, ushort, bool, bool, bool, ushort, ushort); + void keyPressed(FKey, ushort, ushort, bool); @@ -89,3 +95,3 @@ private slots: - void slotKeyPressed(ushort, ushort, bool, bool, bool, ushort, ushort); + void slotKeyPressed(FKey, ushort, ushort, bool); void slotChangeRows(int); @@ -93,2 +99,3 @@ private slots: void slotChangeIcon(int); + void slotChangeLabelText(const QString &); @@ -96,5 +103,7 @@ private: + ushort selectedRow, selectedCol; + FunctionKeyboard *kb; QSpinBox *m_rowBox, *m_colBox; - QComboBox *m_labels; + QComboBox *m_labels, *m_qvalues; |