MythTV
master
|
A text entry and edit widget. More...
#include <libmythui/mythuitextedit.h>
Public Types | |
enum | MoveDirection : std::uint8_t { MoveLeft, MoveRight, MoveUp, MoveDown, MovePageUp, MovePageDown, MoveEnd } |
Public Slots | |
void | Select () |
void | Deselect () |
Public Slots inherited from MythUIType | |
void | LoseFocus () |
bool | TakeFocus () |
void | Activate () |
void | Hide (void) |
void | Show (void) |
void | Refresh (void) |
void | UpdateDependState (bool isDefault) |
void | UpdateDependState (MythUIType *dependee, bool isDefault) |
Signals | |
void | valueChanged () |
Signals inherited from MythUIType | |
void | RequestUpdate () |
void | RequestRegionUpdate (const QRect &) |
void | TakingFocus () |
void | LosingFocus () |
void | VisibilityChanged (bool Visible) |
void | Showing () |
void | Hiding () |
void | Enabling () |
void | Disabling () |
void | FinishedMoving () |
void | FinishedFading () |
void | DependChanged (bool isDefault) |
Public Member Functions | |
MythUITextEdit (MythUIType *parent, const QString &name) | |
~MythUITextEdit () override=default | |
void | Pulse (void) override |
Pulse is called 70 times a second to trigger a single frame of an animation. More... | |
bool | keyPressEvent (QKeyEvent *event) override |
Key event handler. More... | |
bool | inputMethodEvent (QInputMethodEvent *event) override |
Input Method event handler. More... | |
bool | gestureEvent (MythGestureEvent *event) override |
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop. More... | |
void | Reset (void) override |
Reset the widget to it's original state, should not reset changes made by the theme. More... | |
void | SetText (const QString &text, bool moveCursor=true) |
void | InsertText (const QString &text) |
QString | GetText (void) const |
void | SetFilter (InputFilter filter) |
void | SetPassword (bool isPassword) |
void | SetMaxLength (int length) |
bool | MoveCursor (MoveDirection moveDir) |
void | SetKeyboardPosition (PopupPosition pos) |
PopupPosition | GetKeyboardPosition (void) |
void | SetDBValue (const QString &text) override |
QString | GetDBValue (void) const override |
Public Member Functions inherited from MythUIType | |
MythUIType (QObject *parent, const QString &name) | |
void | AddChild (MythUIType *child) |
Add a child UIType. More... | |
MythUIType * | GetChild (const QString &name) const |
Get a named child of this UIType. More... | |
MythUIType * | GetChildAt (QPoint p, bool recursive=true, bool focusable=true) const |
Return the first MythUIType at the given coordinates. More... | |
QList< MythUIType * > * | GetAllChildren (void) |
Return a list of all child widgets. More... | |
QList< MythUIType * > | GetAllDescendants (void) |
void | DeleteChild (const QString &name) |
Delete a named child of this UIType. More... | |
void | DeleteChild (MythUIType *child) |
Delete the given UIType if it is a child of this UIType. More... | |
void | DeleteAllChildren (void) |
Delete all child widgets. More... | |
bool | NeedsRedraw (void) const |
void | ResetNeedsRedraw (void) |
void | SetRedraw (void) |
void | SetChildNeedsRedraw (MythUIType *child) |
bool | CanTakeFocus (void) const |
Return if this widget can accept input focus. More... | |
void | SetCanTakeFocus (bool set=true) |
Set whether this widget can take focus. More... | |
void | SetFocusOrder (int order) |
bool | IsEnabled (void) const |
void | SetEnabled (bool enable) |
bool | MoveToTop (void) |
bool | MoveChildToTop (MythUIType *child) |
void | ActivateAnimations (MythUIAnimation::Trigger trigger) |
QList< MythUIAnimation * > * | GetAnimations (void) |
void | Draw (MythPainter *p, int xoffset, int yoffset, int alphaMod=255, QRect clipRect=QRect()) |
void | SetPosition (int x, int y) |
Convenience method, calls SetPosition(const MythPoint&) Override that instead to change functionality. More... | |
void | SetPosition (QPoint point) |
virtual void | SetPosition (const MythPoint &point) |
virtual MythPoint | GetPosition (void) const |
virtual void | SetSize (QSize size) |
virtual void | SetMinSize (const MythPoint &size) |
Set the minimum size of this widget, for widgets which can be rescaled. More... | |
virtual QSize | GetMinSize (void) const |
virtual void | SetArea (const MythRect &rect) |
virtual void | AdjustMinArea (int delta_x, int delta_y, int delta_w, int delta_h) |
Adjust the size of a sibling. More... | |
virtual void | VanishSibling (void) |
virtual void | SetMinAreaParent (MythRect actual_area, MythRect allowed_area, MythUIType *child) |
Adjust the size of sibling objects within the button. More... | |
virtual void | SetMinArea (const MythRect &rect) |
Set the minimum area based on the given size. More... | |
virtual MythRect | GetArea (void) const |
If the object has a minimum area defined, return it, other wise return the default area. More... | |
virtual MythRect | GetFullArea (void) const |
virtual void | RecalculateArea (bool recurse=true) |
void | ExpandArea (QRect rect) |
virtual QRegion | GetDirtyArea (void) const |
bool | IsVisible (bool recurse=false) const |
virtual void | SetVisible (bool visible) |
void | MoveTo (QPoint destXY, QPoint speedXY) |
void | AdjustAlpha (int mode, int alphachange, int minalpha=0, int maxalpha=255) |
void | SetAlpha (int newalpha) |
int | GetAlpha (void) const |
virtual void | mediaEvent (MythMediaEvent *event) |
Media/Device status event handler, received from MythMediaMonitor. More... | |
MythFontProperties * | GetFont (const QString &text) const |
bool | AddFont (const QString &text, MythFontProperties *fontProp) |
void | SetHelpText (const QString &text) |
QString | GetHelpText (void) const |
void | SetXMLLocation (const QString &filename, int where) |
QString | GetXMLLocation (void) const |
void | SetXMLName (const QString &name) |
QString | GetXMLName (void) const |
bool | IsDeferredLoading (bool recurse=false) const |
void | SetDeferLoad (bool defer) |
virtual void | LoadNow (void) |
Cause images in this and child widgets to be loaded. More... | |
bool | ContainsPoint (QPoint point) const |
Check if the given point falls within this widgets area. More... | |
virtual MythPainter * | GetPainter (void) |
void | SetPainter (MythPainter *painter) |
void | SetCentre (UIEffects::Centre centre) |
void | SetZoom (float zoom) |
void | SetHorizontalZoom (float zoom) |
void | SetVerticalZoom (float zoom) |
void | SetAngle (float angle) |
void | SetDependIsDefault (bool isDefault) |
void | SetReverseDependence (MythUIType *dependee, bool reverse) |
void | SetDependsMap (QMap< QString, QString > dependsMap) |
QMap< QString, QString > | GetDependsMap () const |
Public Member Functions inherited from StorageUser | |
virtual | ~StorageUser ()=default |
Protected Member Functions | |
bool | ParseElement (const QString &filename, QDomElement &element, bool showWarnings) override |
Parse the xml definition of this widget setting the state of the object accordingly. More... | |
void | CopyFrom (MythUIType *base) override |
Copy this widgets state from another. More... | |
void | CreateCopy (MythUIType *parent) override |
Copy the state of this widget to the one given, it must be of the same type. More... | |
void | Finalize (void) override |
Perform any post-xml parsing initialisation tasks. More... | |
void | Init (void) |
void | SetInitialStates (void) |
bool | InsertCharacter (const QString &character) |
void | RemoveCharacter (int position) |
void | CutTextToClipboard (void) |
void | CopyTextToClipboard (void) |
void | PasteTextFromClipboard (QClipboard::Mode mode=QClipboard::Clipboard) |
bool | UpdateTmpString (const QString &str) |
Protected Member Functions inherited from MythUIType | |
~MythUIType () override | |
void | customEvent (QEvent *event) override |
virtual void | DrawSelf (MythPainter *p, int xoffset, int yoffset, int alphaMod, QRect clipRect) |
void | AddFocusableChildrenToList (FocusInfoType &focusList) |
void | HandleAlphaPulse () |
Handle one frame of an alpha (transparency) change animation. More... | |
void | HandleMovementPulse () |
Handle one frame of a movement animation. More... | |
int | CalcAlpha (int alphamod) const |
void | ConnectDependants (bool recurse=false) |
Additional Inherited Members | |
Static Public Member Functions inherited from XMLParseBase | |
static QString | getFirstText (QDomElement &element) |
static bool | parseBool (const QString &text) |
static bool | parseBool (QDomElement &element) |
static MythPoint | parsePoint (const QString &text, bool normalize=true) |
static MythPoint | parsePoint (QDomElement &element, bool normalize=true) |
static QSize | parseSize (const QString &text, bool normalize=true) |
static QSize | parseSize (QDomElement &element, bool normalize=true) |
static MythRect | parseRect (const QString &text, bool normalize=true) |
static MythRect | parseRect (QDomElement &element, bool normalize=true) |
static int | parseAlignment (const QString &text) |
static int | parseAlignment (QDomElement &element) |
static QBrush | parseGradient (const QDomElement &element) |
static QString | parseText (QDomElement &element) |
static MythUIType * | GetGlobalObjectStore (void) |
static void | ClearGlobalObjectStore (void) |
static void | ParseChildren (const QString &filename, QDomElement &element, MythUIType *parent, bool showWarnings) |
static MythUIType * | ParseUIType (const QString &filename, QDomElement &element, const QString &type, MythUIType *parent, MythScreenType *screen, bool showWarnings, QMap< QString, QString > &parentDependsMap) |
static bool | WindowExists (const QString &xmlfile, const QString &windowname) |
static bool | LoadWindowFromXML (const QString &xmlfile, const QString &windowname, MythUIType *parent) |
static bool | LoadBaseTheme (void) |
static bool | LoadBaseTheme (const QString &baseTheme) |
static bool | CopyWindowFromBase (const QString &windowname, MythScreenType *win) |
Static Protected Member Functions inherited from MythUIType | |
static int | NormX (int width) |
static int | NormY (int height) |
A text entry and edit widget.
Definition at line 34 of file mythuitextedit.h.
enum MythUITextEdit::MoveDirection : std::uint8_t |
Enumerator | |
---|---|
MoveLeft | |
MoveRight | |
MoveUp | |
MoveDown | |
MovePageUp | |
MovePageDown | |
MoveEnd |
Definition at line 56 of file mythuitextedit.h.
MythUITextEdit::MythUITextEdit | ( | MythUIType * | parent, |
const QString & | name | ||
) |
Definition at line 28 of file mythuitextedit.cpp.
Referenced by CreateCopy().
|
overridedefault |
|
overridevirtual |
Pulse is called 70 times a second to trigger a single frame of an animation.
This changes the alpha value of the widget
Reimplemented from MythUIType.
Definition at line 58 of file mythuitextedit.cpp.
|
overridevirtual |
Key event handler.
event | Keypress event |
Reimplemented from MythUIType.
Definition at line 465 of file mythuitextedit.cpp.
Referenced by MythUIVirtualKeyboard::backClicked(), MythUIVirtualKeyboard::charClicked(), MythUIVirtualKeyboard::delClicked(), MythUIVirtualKeyboard::moveleftClicked(), MythUIVirtualKeyboard::moverightClicked(), and MythUIVirtualKeyboard::returnClicked().
|
overridevirtual |
Input Method event handler.
event | Input Method event |
Reimplemented from MythUIType.
Definition at line 421 of file mythuitextedit.cpp.
|
overridevirtual |
Mouse click/movement handler, receives mouse gesture events from the QCoreApplication event loop.
Should not be used directly.
event | Mouse event |
Reimplemented from MythUIType.
Definition at line 608 of file mythuitextedit.cpp.
|
overridevirtual |
Reset the widget to it's original state, should not reset changes made by the theme.
Reimplemented from MythUIType.
Definition at line 53 of file mythuitextedit.cpp.
Referenced by CutTextToClipboard(), ImportIconsWizard::enableControls(), SmartPlaylistEditor::newSmartPlaylist(), PhrasePopup::phraseSelected(), and SmartPlaylistEditor::startDeleteCategory().
Definition at line 198 of file mythuitextedit.cpp.
Referenced by CustomPriority::addClicked(), EditStreamMetadata::changeStreamMetadata(), EditMetadataDialog::checkClicked(), CustomEdit::clauseClicked(), MetadataOptions::ClearInetref(), RecMetadataEdit::ClearInetref(), ImportSettings::Create(), GeneralSettings::Create(), PlayerSettings::Create(), BookmarkEditor::Create(), MythNewsEditor::Create(), BrowserConfig::Create(), RSSEditPopup::Create(), FileSelector::Create(), ArchiveFileSelector::Create(), EditStreamMetadata::Create(), EditLyricsDialog::Create(), ImportMusicDialog::Create(), SpinBoxEntryDialog::Create(), EditPowerSearchPopup::Create(), SearchInputDialog::Create(), MythTextInputDialog::Create(), MetadataOptions::Create(), SearchButtonListDialog::Create(), MythUISearchDialog::Create(), RecMetadataEdit::Create(), ImportMusicDialog::customEvent(), ImportIconsWizard::doLoad(), SelectDestination::fileFinderClosed(), EditMetadataDialog::fillWidgets(), EditRomInfoDialog::fillWidgets(), VideoFilterDialog::fillWidgets(), inputMethodEvent(), InsertCharacter(), keyPressEvent(), SelectDestination::loadConfiguration(), CustomPriority::loadData(), SmartPlaylistEditor::loadFromDatabase(), EditLyricsDialog::loadLyrics(), PhrasePopup::phraseSelected(), MetadataOptions::QueryComplete(), RecMetadataEdit::QueryComplete(), RemoveCharacter(), Reset(), CustomPriority::ruleChanged(), CustomEdit::ruleChanged(), Ripper::ScanFinished(), RawSettingsEditor::selectionChanged(), EditMetadataDialog::setAlbum(), Ripper::setAlbum(), EditMetadataDialog::setArtist(), Ripper::setArtist(), EditMetadataDialog::setCompArtist(), EditMetadataDialog::setGenre(), Ripper::setGenre(), MythChannelOverlay::SetText(), CriteriaRowEditor::setValue(), BookmarkEditor::slotCategoryFound(), RSSEditPopup::SlotCheckRedirect(), FileSelector::updateFileList(), MythUIFileBrowser::updateLocalFileList(), MythUIFileBrowser::updateRemoteFileList(), FileAssocDialog::UpdateScreen(), UpdateTmpString(), and CriteriaRowEditor::updateValues().
void MythUITextEdit::InsertText | ( | const QString & | text | ) |
Definition at line 223 of file mythuitextedit.cpp.
Referenced by inputMethodEvent(), and PasteTextFromClipboard().
|
inline |
Definition at line 50 of file mythuitextedit.h.
Referenced by CustomPriority::addClicked(), Ripper::albumChanged(), Ripper::artistChanged(), MetadataOptions::CanSetArtwork(), EditMetadataDialog::checkClicked(), CustomPriority::checkSyntax(), CustomEdit::checkSyntax(), CustomEdit::clauseChanged(), CustomEdit::clauseClicked(), MythTerminal::Create(), MetadataOptions::CreateLookup(), MetadataOptions::customEvent(), CustomPriority::deleteClicked(), ImportMusicDialog::doScan(), NetSearch::DoSearch(), LocationDialog::doSearch(), SearchStream::doUpdateStreams(), PhrasePopup::editChanged(), SearchInputDialog::editChanged(), MythUIFileBrowser::editLostFocus(), CriteriaRowEditor::enableSaveButton(), SpinBoxEntryDialog::entryChanged(), SelectDestination::filenameEditLostFocus(), Ripper::genreChanged(), SmartPlaylistEditor::getCategoryAndName(), MythChannelOverlay::GetText(), MetadataOptions::HandleDownloadedImages(), SelectDestination::handleFind(), CustomPriority::installClicked(), CustomPriority::loadData(), FileSelector::locationEditLostFocus(), ImportMusicDialog::locationPressed(), ImportIconsWizard::manualSearch(), PhrasePopup::okClicked(), EditPowerSearchPopup::okClicked(), EditMetadataDialog::okPressed(), EditLyricsDialog::okPressed(), MythUIFileBrowser::OKPressed(), PasswordChange::OldPasswordChanged(), MetadataOptions::OnImageSearchListSelection(), FileAssocDialog::OnPlayerCommandChanged(), RSSEditPopup::ParseAndSave(), RecMetadataEdit::PerformQuery(), ManualSchedule::recordClicked(), CustomEdit::recordClicked(), PhrasePopup::recordClicked(), BookmarkEditor::Save(), MythNewsEditor::Save(), MetadataOptions::Save(), RecMetadataEdit::SaveChanges(), EditStreamMetadata::saveClicked(), SmartPlaylistEditor::saveClicked(), CriteriaRowEditor::saveClicked(), SelectDestination::saveConfiguration(), SearchButtonListDialog::searchChanged(), MythTextInputDialog::sendResult(), PasswordChange::SendResult(), EditRomInfoDialog::SetCountry(), SelectDestination::setDestination(), EditMetadataDialog::SetDirector(), EditRomInfoDialog::SetGamename(), EditRomInfoDialog::SetGenre(), EditMetadataDialog::SetHomepage(), EditMetadataDialog::SetInetRef(), EditMetadataDialog::SetPlayer(), EditRomInfoDialog::SetPlot(), EditMetadataDialog::SetPlot(), EditRomInfoDialog::SetPublisher(), EditMetadataDialog::SetRating(), EditMetadataDialog::SetSubtitle(), EditMetadataDialog::SetTagline(), VideoFilterDialog::setTextFilter(), EditMetadataDialog::SetTitle(), EditRomInfoDialog::SetYear(), BookmarkEditor::slotFindCategory(), GeneralSettings::slotSave(), ImportSettings::slotSave(), PlayerSettings::slotSave(), BrowserConfig::slotSave(), RSSEditPopup::SlotSave(), MythUISearchDialog::slotUpdateList(), EditLyricsDialog::somethingChanged(), ImportMusicDialog::startScan(), CustomEdit::storeClicked(), CustomEdit::storeRule(), CustomEdit::testClicked(), CustomPriority::testSchedule(), CustomPriority::textChanged(), CustomEdit::textChanged(), SmartPlaylistEditor::titleChanged(), EditMetadataDialog::updateArtistImage(), EditMetadataDialog::updateGenreImage(), EditMetadataCommon::updateMetadata(), SearchView::updateTracksList(), CriteriaRowEditor::valueButtonClicked(), RawSettingsEditor::valueChanged(), MetadataOptions::ValuesChanged(), Ripper::yearChanged(), and ImportMusicDialog::~ImportMusicDialog().
|
inline |
Definition at line 52 of file mythuitextedit.h.
Referenced by Ripper::Create(), SearchInputDialog::Create(), and MythTextInputDialog::Create().
|
inline |
Definition at line 53 of file mythuitextedit.h.
Referenced by SearchInputDialog::Create(), MythTextInputDialog::Create(), and PasswordChange::Create().
void MythUITextEdit::SetMaxLength | ( | int | length | ) |
Definition at line 193 of file mythuitextedit.cpp.
Referenced by CustomPriority::Create(), CustomEdit::Create(), NetSearch::Create(), ManualSchedule::Create(), EditMetadataDialog::Create(), RSSEditPopup::Create(), Ripper::Create(), PasswordChange::Create(), and RecMetadataEdit::Create().
bool MythUITextEdit::MoveCursor | ( | MoveDirection | moveDir | ) |
Definition at line 294 of file mythuitextedit.cpp.
Referenced by InsertCharacter(), keyPressEvent(), RemoveCharacter(), and SetText().
|
inline |
Definition at line 60 of file mythuitextedit.h.
|
inline |
Definition at line 61 of file mythuitextedit.h.
Referenced by MythUIVirtualKeyboard::MythUIVirtualKeyboard().
|
inlineoverridevirtual |
Implements StorageUser.
Definition at line 64 of file mythuitextedit.h.
|
inlineoverridevirtual |
Implements StorageUser.
Definition at line 65 of file mythuitextedit.h.
|
signal |
Referenced by EditRomInfoDialog::Create(), FileAssocDialog::Create(), CustomPriority::Create(), CustomEdit::Create(), SearchView::Create(), EditMetadataDialog::Create(), PhrasePopup::Create(), SpinBoxEntryDialog::Create(), Ripper::Create(), SearchStream::Create(), SearchInputDialog::Create(), CriteriaRowEditor::Create(), VideoFilterDialog::Create(), SearchButtonListDialog::Create(), MythUISearchDialog::Create(), PasswordChange::Create(), InsertText(), and SetText().
|
slot |
Definition at line 41 of file mythuitextedit.cpp.
Referenced by MythUITextEdit().
|
slot |
Definition at line 47 of file mythuitextedit.cpp.
Referenced by MythUITextEdit().
|
overrideprotectedvirtual |
Parse the xml definition of this widget setting the state of the object accordingly.
Reimplemented from MythUIType.
Definition at line 90 of file mythuitextedit.cpp.
|
overrideprotectedvirtual |
Copy this widgets state from another.
Reimplemented from MythUIType.
Definition at line 621 of file mythuitextedit.cpp.
|
overrideprotectedvirtual |
Copy the state of this widget to the one given, it must be of the same type.
Reimplemented from MythUIType.
Definition at line 645 of file mythuitextedit.cpp.
|
overrideprotectedvirtual |
Perform any post-xml parsing initialisation tasks.
This is called after the widget has been created and it's state established by ParseElement() or CopyFrom(). A derived class should use this to perform any initialisation tasks which should occur after this point.
Reimplemented from MythUIType.
Definition at line 128 of file mythuitextedit.cpp.
|
protected |
|
protected |
Definition at line 144 of file mythuitextedit.cpp.
Referenced by CopyFrom(), and Finalize().
|
protected |
Definition at line 234 of file mythuitextedit.cpp.
Referenced by InsertText(), and keyPressEvent().
|
protected |
Definition at line 280 of file mythuitextedit.cpp.
Referenced by keyPressEvent().
|
protected |
Definition at line 356 of file mythuitextedit.cpp.
Referenced by keyPressEvent().
|
protected |
Definition at line 362 of file mythuitextedit.cpp.
Referenced by CutTextToClipboard(), and keyPressEvent().
|
protected |
Definition at line 369 of file mythuitextedit.cpp.
Referenced by gestureEvent(), and keyPressEvent().
|
protected |
Definition at line 267 of file mythuitextedit.cpp.
Referenced by inputMethodEvent().
Definition at line 92 of file mythuitextedit.h.
Referenced by SetInitialStates().
|
protected |
Definition at line 94 of file mythuitextedit.h.
Referenced by CopyFrom(), and Pulse().
|
protected |
Definition at line 95 of file mythuitextedit.h.
Referenced by CopyFrom(), and Pulse().
|
protected |
Definition at line 96 of file mythuitextedit.h.
Referenced by keyPressEvent(), MythUITextEdit(), and Pulse().
|
protected |
Definition at line 98 of file mythuitextedit.h.
Referenced by CopyFrom(), InsertCharacter(), and SetMaxLength().
|
protected |
Definition at line 100 of file mythuitextedit.h.
Referenced by CopyFrom(), CopyTextToClipboard(), inputMethodEvent(), InsertCharacter(), keyPressEvent(), MoveCursor(), RemoveCharacter(), SetText(), and UpdateTmpString().
|
protected |
Definition at line 101 of file mythuitextedit.h.
Referenced by CopyFrom(), and InsertCharacter().
|
protected |
Definition at line 102 of file mythuitextedit.h.
Referenced by CopyFrom(), InsertCharacter(), keyPressEvent(), MoveCursor(), and RemoveCharacter().
Definition at line 104 of file mythuitextedit.h.
Referenced by inputMethodEvent(), and SetText().
|
protected |
Definition at line 106 of file mythuitextedit.h.
Referenced by CopyFrom(), and ParseElement().
|
protected |
Definition at line 108 of file mythuitextedit.h.
Referenced by Deselect(), Select(), and SetInitialStates().
|
protected |
Definition at line 109 of file mythuitextedit.h.
Referenced by Finalize(), MoveCursor(), Pulse(), and SetInitialStates().
|
protected |
Definition at line 110 of file mythuitextedit.h.
Referenced by Finalize(), InsertText(), MoveCursor(), SetInitialStates(), SetText(), and UpdateTmpString().
|
protected |
Definition at line 112 of file mythuitextedit.h.
Referenced by keyPressEvent().
Definition at line 114 of file mythuitextedit.h.
Referenced by inputMethodEvent(), and keyPressEvent().
|
protected |
Definition at line 115 of file mythuitextedit.h.
Referenced by inputMethodEvent(), and MythUITextEdit().