Go to the documentation of this file. 1 #ifndef MYTHUI_TEXTEDIT_H_
2 #define MYTHUI_TEXTEDIT_H_
12 class QInputMethodEvent;
42 void Pulse(
void)
override;
46 void Reset(
void)
override;
48 void SetText(
const QString &text,
bool moveCursor =
true);
49 void InsertText(
const QString &text);
50 QString
GetText(
void)
const {
return m_message; }
53 void SetPassword(
bool isPassword) { m_isPassword = isPassword; }
54 void SetMaxLength(
int length);
57 { MoveLeft, MoveRight,
MoveUp, MoveDown, MovePageUp, MovePageDown, MoveEnd };
58 bool MoveCursor(MoveDirection moveDir);
64 void SetDBValue(
const QString &text)
override { SetText(text); }
65 QString
GetDBValue(
void)
const override {
return GetText(); }
76 bool showWarnings)
override;
82 void SetInitialStates(
void);
84 bool InsertCharacter(
const QString &character);
85 void RemoveCharacter(
int position);
87 void CutTextToClipboard(
void);
88 void CopyTextToClipboard(
void);
90 bool UpdateTmpString(
const QString &str);
92 bool m_initialized {
false };
94 int m_blinkInterval { 0 };
95 int m_cursorBlinkRate { 40 };
98 int m_maxLength { 255 };
102 int m_position { -1 };
104 bool m_isPassword {
false };
112 int m_composeKey { 0 };
114 bool m_isIMEinput {
false };
virtual bool keyPressEvent(QKeyEvent *event)
Key event handler.
Image widget, displays a single image or multiple images in sequence.
virtual bool inputMethodEvent(QInputMethodEvent *event)
Input Method event handler.
A QElapsedTimer based timer to replace use of QTime as a timer.
A text entry and edit widget.
QString GetText(void) const
void SetDBValue(const QString &text) override
virtual void Pulse(void)
Pulse is called 70 times a second to trigger a single frame of an animation.
virtual void CreateCopy(MythUIType *parent)
Copy the state of this widget to the one given, it must be of the same type.
void SetPassword(bool isPassword)
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
void SetFilter(InputFilter filter)
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
The base class on which all widgets and screens are based.
PopupPosition GetKeyboardPosition(void)
All purpose text widget, displays a text string.
void SetKeyboardPosition(PopupPosition pos)
virtual bool gestureEvent(MythGestureEvent *event)
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
PopupPosition
Preferred position to place virtual keyboard popup.
A custom event that represents a mouse gesture.
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
QString GetDBValue(void) const override
This widget is used for grouping other widgets for display when a particular named state is called....
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.