LeechCraft Monocle  0.6.70-6645-gcd10d7e
Modular document viewer for LeechCraft
LeechCraft::Monocle::IFormFieldText Class Referenceabstract

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

#include "iformfield.h"

Public Types

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

Public Member Functions

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

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 150 of file iformfield.h.

Member Enumeration Documentation

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 157 of file iformfield.h.

Constructor & Destructor Documentation

virtual LeechCraft::Monocle::IFormFieldText::~IFormFieldText ( )
inlinevirtual

Virtual destructor.

Definition at line 174 of file iformfield.h.

Member Function Documentation

virtual int LeechCraft::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.
virtual QString LeechCraft::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()
virtual Type LeechCraft::Monocle::IFormFieldText::GetTextType ( ) const
pure virtual

Returns the exact type of this text entry field.

Returns
The exact type of this text field.
virtual bool LeechCraft::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.
virtual bool LeechCraft::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.
virtual void LeechCraft::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: