1#ifndef MYTHUI_TEXTEDIT_H_
2#define MYTHUI_TEXTEDIT_H_
12class 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 };
A custom event that represents a mouse gesture.
A QElapsedTimer based timer to replace use of QTime as a timer.
Image widget, displays a single image or multiple images in sequence.
This widget is used for grouping other widgets for display when a particular named state is called.
A text entry and edit widget.
~MythUITextEdit() override=default
void SetPassword(bool isPassword)
QString GetText(void) const
void SetKeyboardPosition(PopupPosition pos)
PopupPosition GetKeyboardPosition(void)
void SetFilter(InputFilter filter)
void SetDBValue(const QString &text) override
QString GetDBValue(void) const override
All purpose text widget, displays a text string.
The base class on which all widgets and screens are based.
virtual bool gestureEvent(MythGestureEvent *event)
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
virtual void CopyFrom(MythUIType *base)
Copy this widgets state from another.
virtual void Finalize(void)
Perform any post-xml parsing initialisation tasks.
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.
virtual bool inputMethodEvent(QInputMethodEvent *event)
Input Method event handler.
virtual void Reset(void)
Reset the widget to it's original state, should not reset changes made by the theme.
virtual bool ParseElement(const QString &filename, QDomElement &element, bool showWarnings)
Parse the xml definition of this widget setting the state of the object accordingly.
virtual bool keyPressEvent(QKeyEvent *event)
Key event handler.
PopupPosition
Preferred position to place virtual keyboard popup.