LibreOffice Module vcl (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
weld::EntryFormatter Class Reference

#include <weldutils.hxx>

Inheritance diagram for weld::EntryFormatter:
[legend]
Collaboration diagram for weld::EntryFormatter:
[legend]

Public Member Functions

 EntryFormatter (weld::Entry &rEntry)
 
 EntryFormatter (weld::FormattedSpinButton &rSpinButton)
 
weld::Entryget_widget ()
 
virtual Selection GetEntrySelection () const override
 
virtual OUString GetEntryText () const override
 
virtual void SetEntryText (const OUString &rText, const Selection &rSel) override
 
virtual void SetEntryTextColor (const Color *pColor) override
 
virtual SelectionOptions GetEntrySelectionOptions () const override
 
virtual void FieldModified () override
 
virtual void ClearMinValue () override
 
virtual void SetMinValue (double dMin) override
 
virtual void ClearMaxValue () override
 
virtual void SetMaxValue (double dMin) override
 
virtual void SetSpinSize (double dStep) override
 
void SetEntrySelectionOptions (SelectionOptions eOptions)
 
void connect_changed (const Link< weld::Entry &, void > &rLink)
 
void connect_focus_out (const Link< weld::Widget &, void > &rLink)
 
virtual ~EntryFormatter () override
 
- Public Member Functions inherited from Formatter
 Formatter ()
 
virtual ~Formatter ()
 
void SetFieldText (const OUString &rText, const Selection &rNewSelection)
 
bool HasMinValue () const
 
double GetMinValue () const
 
bool HasMaxValue () const
 
double GetMaxValue () const
 
void SetValue (double dVal)
 
double GetValue ()
 
void SetTextValue (const OUString &rText)
 
bool IsEmptyFieldEnabled () const
 
void EnableEmptyField (bool bEnable)
 
void SetDefaultValue (double dDefault)
 
double GetDefaultValue () const
 
void SetLastSelection (const Selection &rSelection)
 
sal_uLong GetFormatKey () const
 
void SetFormatKey (sal_uLong nFormatKey)
 
SvNumberFormatterGetOrCreateFormatter () const
 
SvNumberFormatterGetFormatter () const
 
void SetFormatter (SvNumberFormatter *pFormatter, bool bResetFormat=true)
 
bool GetThousandsSep () const
 
void SetThousandsSep (bool _bUseSeparator)
 
void DisableRemainderFactor ()
 
bool GetDisableRemainderFactor () const
 
void SetWrapOnLimits (bool bWrapOnLimits)
 
sal_uInt16 GetDecimalDigits () const
 
void SetDecimalDigits (sal_uInt16 _nPrecision)
 
SvNumberFormatterStandardFormatter ()
 
OUString GetFormat (LanguageType &eLang) const
 
bool SetFormat (const OUString &rFormatString, LanguageType eLang)
 
bool IsStrictFormat () const
 
void SetStrictFormat (bool bEnable)
 
double GetSpinSize () const
 
void SetSpinFirst (double dFirst)
 
double GetSpinFirst () const
 
void SetSpinLast (double dLast)
 
double GetSpinLast () const
 
bool TreatingAsNumber () const
 
void TreatAsNumber (bool bDoSo)
 
void SetInputHdl (const Link< sal_Int64 *, TriState > &rLink)
 
void SetOutputHdl (const Link< LinkParamNone *, bool > &rLink)
 
void SetTextFormatted (const OUString &rText)
 
OUString const & GetTextValue () const
 
void SetDefaultText (const OUString &rDefault)
 
const OUString & GetDefaultText () const
 
const ColorGetLastOutputColor () const
 
void Commit ()
 reformats the current text. More...
 
void SetAutoColor (bool _bAutomatic)
 
void EnableNotANumber (bool _bEnable)
 enables handling of not-a-number value. More...
 
void UseInputStringForFormatting ()
 When being set to true, the strings in the field are formatted using the InputLine format. More...
 
bool IsUsingInputStringForFormatting () const
 
void Modify (bool makeValueDirty=true)
 
void EntryLostFocus ()
 
void ReFormat ()
 
virtual void FormatChanged (FORMAT_CHANGE_TYPE nWhat)
 

Private Member Functions

 DECL_DLLPRIVATE_LINK (ModifyHdl, weld::Entry &, void)
 
 DECL_DLLPRIVATE_LINK (FocusOutHdl, weld::Widget &, void)
 
void Init ()
 
virtual void UpdateCurrentValue (double dCurrentValue) override
 

Private Attributes

weld::Entrym_rEntry
 
weld::FormattedSpinButtonm_pSpinButton
 
Link< weld::Entry &, voidm_aModifyHdl
 
Link< weld::Widget &, voidm_aFocusOutHdl
 
SelectionOptions m_eOptions
 

Additional Inherited Members

- Protected Types inherited from Formatter
enum  valueState {
  valueDirty,
  valueString,
  valueDouble
}
 
- Protected Member Functions inherited from Formatter
virtual bool CheckText (const OUString &) const
 
void ImplSetTextImpl (const OUString &rNew, Selection const *pNewSel)
 
void ImplSetValue (double dValue, bool bForce)
 
bool ImplGetValue (double &dNewVal)
 
void ImplSetFormatKey (sal_uLong nFormatKey)
 
SvNumberFormatterCreateFormatter ()
 
- Protected Attributes inherited from Formatter
OUString m_sLastValidText
 
Selection m_aLastSelection
 
double m_dMinValue
 
double m_dMaxValue
 
bool m_bHasMin: 1
 
bool m_bHasMax: 1
 
bool m_bWrapOnLimits: 1
 
bool m_bStrictFormat: 1
 
bool m_bEnableEmptyField: 1
 
bool m_bAutoColor: 1
 
bool m_bEnableNaN: 1
 
bool m_bDisableRemainderFactor: 1
 
valueState m_ValueState
 
double m_dCurrentValue
 
double m_dDefaultValue
 
sal_uLong m_nFormatKey
 
SvNumberFormatterm_pFormatter
 
StaticFormatter m_aStaticFormatter
 
double m_dSpinSize
 
double m_dSpinFirst
 
double m_dSpinLast
 
bool m_bTreatAsNumber
 
OUString m_sCurrentTextValue
 
OUString m_sDefaultText
 
const Colorm_pLastOutputColor
 
bool m_bUseInputStringForFormatting
 
Link< sal_Int64 *, TriStatem_aInputHdl
 
Link< LinkParamNone *, bool > m_aOutputHdl
 

Detailed Description

Definition at line 193 of file weldutils.hxx.

Constructor & Destructor Documentation

weld::EntryFormatter::EntryFormatter ( weld::Entry rEntry)

Definition at line 141 of file weldutils.cxx.

References Init().

weld::EntryFormatter::EntryFormatter ( weld::FormattedSpinButton rSpinButton)

Definition at line 133 of file weldutils.cxx.

References Init().

weld::EntryFormatter::~EntryFormatter ( )
overridevirtual

Member Function Documentation

void weld::EntryFormatter::ClearMaxValue ( )
overridevirtual
void weld::EntryFormatter::ClearMinValue ( )
overridevirtual
void weld::EntryFormatter::connect_changed ( const Link< weld::Entry &, void > &  rLink)
inline

Definition at line 227 of file weldutils.hxx.

void weld::EntryFormatter::connect_focus_out ( const Link< weld::Widget &, void > &  rLink)
inline

Definition at line 228 of file weldutils.hxx.

weld::EntryFormatter::DECL_DLLPRIVATE_LINK ( ModifyHdl  ,
weld::Entry ,
void   
)
private
weld::EntryFormatter::DECL_DLLPRIVATE_LINK ( FocusOutHdl  ,
weld::Widget ,
void   
)
private
void weld::EntryFormatter::FieldModified ( )
overridevirtual

Implements Formatter.

Definition at line 231 of file weldutils.cxx.

References m_aModifyHdl, and m_rEntry.

weld::Entry& weld::EntryFormatter::get_widget ( )
inline

Definition at line 199 of file weldutils.hxx.

Referenced by weld::TimeFormatter::Init().

Selection weld::EntryFormatter::GetEntrySelection ( ) const
overridevirtual

Implements Formatter.

Definition at line 165 of file weldutils.cxx.

References weld::Entry::get_selection_bounds(), and m_rEntry.

SelectionOptions weld::EntryFormatter::GetEntrySelectionOptions ( ) const
overridevirtual

Implements Formatter.

Definition at line 229 of file weldutils.cxx.

References m_eOptions.

OUString weld::EntryFormatter::GetEntryText ( ) const
overridevirtual

Implements Formatter.

Definition at line 172 of file weldutils.cxx.

References weld::Entry::get_text(), and m_rEntry.

void weld::EntryFormatter::Init ( void  )
private
void weld::EntryFormatter::SetEntrySelectionOptions ( SelectionOptions  eOptions)
inline

Definition at line 217 of file weldutils.hxx.

void weld::EntryFormatter::SetEntryText ( const OUString &  rText,
const Selection rSel 
)
overridevirtual
void weld::EntryFormatter::SetEntryTextColor ( const Color pColor)
overridevirtual

Implements Formatter.

Definition at line 182 of file weldutils.cxx.

References COL_AUTO(), m_rEntry, and weld::Entry::set_font_color().

void weld::EntryFormatter::SetMaxValue ( double  dMin)
overridevirtual
void weld::EntryFormatter::SetMinValue ( double  dMin)
overridevirtual
void weld::EntryFormatter::SetSpinSize ( double  dStep)
overridevirtual
void weld::EntryFormatter::UpdateCurrentValue ( double  dCurrentValue)
overrideprivatevirtual

Member Data Documentation

Link<weld::Widget&, void> weld::EntryFormatter::m_aFocusOutHdl
private

Definition at line 236 of file weldutils.hxx.

Link<weld::Entry&, void> weld::EntryFormatter::m_aModifyHdl
private

Definition at line 235 of file weldutils.hxx.

Referenced by FieldModified().

SelectionOptions weld::EntryFormatter::m_eOptions
private

Definition at line 237 of file weldutils.hxx.

Referenced by GetEntrySelectionOptions().

weld::FormattedSpinButton* weld::EntryFormatter::m_pSpinButton
private
weld::Entry& weld::EntryFormatter::m_rEntry
private

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