forked from samnazarko/osmc-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidgetKeyBoard.h
More file actions
executable file
·81 lines (69 loc) · 4.04 KB
/
widgetKeyBoard.h
File metadata and controls
executable file
·81 lines (69 loc) · 4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/***************************************************************************
* Copyright (C) 2008 by Giovanni Romano *
* Giovanni.Romano.76@gmail.com *
* *
* This program may be distributed under the terms of the Q Public *
* License as defined by Trolltech AS of Norway and appearing in the *
* file LICENSE.QPL included in the packaging of this file. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
***************************************************************************/
#include "qtinteractiveosmc_global.h"
#ifndef _WIDGETKEYBOARD_H
#define _WIDGETKEYBOARD_H
#include "QKeyPushButton.h"
#include <QSound>
#include <QLineEdit>
#include <QClipboard>
//
//
// classe che crea e controlla la tastiera:
class widgetKeyBoard : public QWidget {
Q_OBJECT
public:
QTINTERACTIVEOSMCSHARED_EXPORT widgetKeyBoard(bool embeddedKeyboard = false, QWidget *activeForm = NULL, QWidget *parent = NULL);
~widgetKeyBoard();
QTINTERACTIVEOSMCSHARED_EXPORT void createKeyboard(void);
bool isEmbeddedKeyboard(void);
void soundClick(void);
void setZoomFacility(bool active); // only valid for embedded keyboard
bool isZoomFacilityEnable(void);
bool statusEchoMode(void){return (this->m_echoMode);}
void setStatusEchoMode(bool echo) {this->m_echoMode = echo; }
void receiptChildKey(QKeyEvent *event, QLineEdit *focusThisControl, bool reset = false); // accoglie i tasti premuti
QLineEdit * currentTextBox(void) { return (this->m_currentTextBox);}
void switchKeyEchoMode(QLineEdit *control);
void enableSwitchingEcho(bool status); // if you don't want control echo from keyboard
bool isEnabledSwitchingEcho(void); // current status
void borderFrame(bool visible = true);
public slots:
void show(QWidget *activeForm);
void hide(bool noChangeColor);
void focusThis(QLineEdit *control);
protected:
virtual void closeEvent(QCloseEvent * event);
private:
widgetKeyBoard(const widgetKeyBoard&);
widgetKeyBoard& operator=(const widgetKeyBoard&);
void init_keyboard(QLineEdit *focusThisControl); // reinizializza le funzioni base della tastiera
QLineEdit * setCurrentTextStyle(QLineEdit *control);
QLineEdit * setDefaultTextStyle(QLineEdit *control);
QKeyPushButton *createNewKey(QString keyValue);
QLineEdit * getNextTextbox(QLineEdit *thisControl = NULL, bool reset = false);
void controlKeyEcho(QLineEdit *control);
private:
QLineEdit m_noFocusPalette; // usata per ripristinare la linetext senza focus
QWidget *m_nextInput; // punta alla textbox attualmente in focus
QWidget *m_activeWindow;
QLineEdit *m_currentTextBox; // mantiene il riferimento alla casella correntemente in uso
static bool m_created;
bool m_embeddedKeyboard;
bool m_echoMode; // status of current text object for echo
bool m_zoomFacilityEmbedded;
bool m_enablePasswordEcho; // controls the possibility to change among normal/password echo
QSound m_player;
QClipboard *m_clipboard;
};
#endif // _WIDGETKEYBOARD_H