LeechCraft Monocle 0.6.70-17335-ge406ffdcaf
Modular document viewer for LeechCraft
Loading...
Searching...
No Matches
LC::Monocle::IFormFieldText Class Referenceabstract

Interface to be implemented by text fields. More...

#include "iformfield.h"

Public Types

enum class  Type { SingleLine , Multiline , File }
 Describes various types of text entry fields. More...
 

Public Member Functions

virtual ~IFormFieldText ()=default
 Virtual destructor.
 
virtual QString GetText () const =0
 Returns the current text value of this field.
 
virtual void SetText (const QString &text)=0
 Sets the current text value of this field to text.
 
virtual Type GetTextType () const =0
 Returns the exact type of this text entry field.
 
virtual int GetMaximumLength () const =0
 Returns the maximum length of the text.
 
virtual bool IsPassword () const =0
 Returns whether this is a password entry field.
 
virtual bool IsRichText () const =0
 Returns whether rich text should be accepted.
 

Detailed Description

Interface to be implemented by text fields.

If a field is of type FormType::Text, it should also implement this interface.

See also
IFormField

Definition at line 121 of file iformfield.h.

Member Enumeration Documentation

◆ Type

Describes various types of text entry fields.

See also
GetTextType()
Enumerator
SingleLine 

Single line text edit.

Multiline 

Multiline text edit.

File 

File entry widget.

Definition at line 128 of file iformfield.h.

Constructor & Destructor Documentation

◆ ~IFormFieldText()

virtual LC::Monocle::IFormFieldText::~IFormFieldText ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ GetMaximumLength()

virtual int LC::Monocle::IFormFieldText::GetMaximumLength ( ) const
pure virtual

Returns the maximum length of the text.

A return value of 0 or less means the text length is unlimited.

Returns
The maximum length of the text or non-positive value for unlimited length.

◆ GetText()

virtual QString LC::Monocle::IFormFieldText::GetText ( ) const
pure virtual

Returns the current text value of this field.

Returns
The current text value of this field.
See also
SetText()

◆ GetTextType()

virtual Type LC::Monocle::IFormFieldText::GetTextType ( ) const
pure virtual

Returns the exact type of this text entry field.

Returns
The exact type of this text field.

◆ IsPassword()

virtual bool LC::Monocle::IFormFieldText::IsPassword ( ) const
pure virtual

Returns whether this is a password entry field.

Characters in password entry fields are masked by dots or something similar so that the entered text isn't visible.

Returns
Whether this is a password entry field.

◆ IsRichText()

virtual bool LC::Monocle::IFormFieldText::IsRichText ( ) const
pure virtual

Returns whether rich text should be accepted.

This only makes sense for Type::Multiline fields.

Returns
Whether rich text should be accepted.

◆ SetText()

virtual void LC::Monocle::IFormFieldText::SetText ( const QString & text)
pure virtual

Sets the current text value of this field to text.

Parameters
[in]textThe new text value of this field.
See also
GetText()

The documentation for this class was generated from the following file: