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

#include <weld.hxx>

Collaboration diagram for weld::MetricSpinButton:
[legend]

Public Member Functions

 MetricSpinButton (std::unique_ptr< SpinButton > pSpinButton, FieldUnit eSrcUnit)
 
FieldUnit get_unit () const
 
void set_unit (FieldUnit eUnit)
 
sal_Int64 convert_value_to (sal_Int64 nValue, FieldUnit eValueUnit) const
 
sal_Int64 convert_value_from (sal_Int64 nValue, FieldUnit eValueUnit) const
 
void set_value (sal_Int64 nValue, FieldUnit eValueUnit)
 
sal_Int64 get_value (FieldUnit eDestUnit) const
 
void reformat ()
 
void set_range (sal_Int64 min, sal_Int64 max, FieldUnit eValueUnit)
 
void get_range (sal_Int64 &min, sal_Int64 &max, FieldUnit eDestUnit) const
 
void set_min (sal_Int64 min, FieldUnit eValueUnit)
 
void set_max (sal_Int64 max, FieldUnit eValueUnit)
 
sal_Int64 get_min (FieldUnit eValueUnit) const
 
sal_Int64 get_max (FieldUnit eValueUnit) const
 
void set_increments (int step, int page, FieldUnit eValueUnit)
 
void get_increments (int &step, int &page, FieldUnit eDestUnit) const
 
void connect_value_changed (const Link< MetricSpinButton &, void > &rLink)
 
sal_Int64 normalize (sal_Int64 nValue) const
 
sal_Int64 denormalize (sal_Int64 nValue) const
 
void set_sensitive (bool sensitive)
 
bool get_sensitive () const
 
bool get_visible () const
 
void grab_focus ()
 
bool has_focus () const
 
void show ()
 
void set_visible (bool bShow)
 
void hide ()
 
void set_digits (unsigned int digits)
 
void set_accessible_name (const OUString &rName)
 
unsigned int get_digits () const
 
void save_value ()
 
bool get_value_changed_from_saved () const
 
void set_text (const OUString &rText)
 
OUString get_text () const
 
void set_size_request (int nWidth, int nHeight)
 
Size get_size_request () const
 
Size get_preferred_size () const
 
void connect_focus_in (const Link< Widget &, void > &rLink)
 
void connect_focus_out (const Link< Widget &, void > &rLink)
 
OUString get_buildable_name () const
 
void set_help_id (const OUString &rName)
 
void set_position (int nCursorPos)
 
void set_width_chars (int nChars)
 
int get_width_chars () const
 
weld::SpinButtonget_widget ()
 

Static Public Member Functions

static OUString MetricToString (FieldUnit rUnit)
 

Private Member Functions

 DECL_LINK (spin_button_value_changed, weld::SpinButton &, void)
 
 DECL_LINK (spin_button_output, weld::SpinButton &, void)
 
 DECL_LINK (spin_button_input, int *result, bool)
 
void signal_value_changed ()
 
sal_Int64 ConvertValue (sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit) const
 
OUString format_number (sal_Int64 nValue) const
 
void update_width_chars ()
 

Private Attributes

FieldUnit m_eSrcUnit
 
std::unique_ptr< weld::SpinButtonm_xSpinButton
 
Link< MetricSpinButton &, void > m_aValueChangedHdl
 

Detailed Description

Definition at line 2014 of file weld.hxx.

Constructor & Destructor Documentation

◆ MetricSpinButton()

weld::MetricSpinButton::MetricSpinButton ( std::unique_ptr< SpinButton pSpinButton,
FieldUnit  eSrcUnit 
)
inline

Definition at line 2031 of file weld.hxx.

References LINK.

Member Function Documentation

◆ connect_focus_in()

void weld::MetricSpinButton::connect_focus_in ( const Link< Widget &, void > &  rLink)
inline

Definition at line 2162 of file weld.hxx.

◆ connect_focus_out()

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

Definition at line 2166 of file weld.hxx.

◆ connect_value_changed()

void weld::MetricSpinButton::connect_value_changed ( const Link< MetricSpinButton &, void > &  rLink)
inline

Definition at line 2131 of file weld.hxx.

◆ convert_value_from()

sal_Int64 weld::MetricSpinButton::convert_value_from ( sal_Int64  nValue,
FieldUnit  eValueUnit 
) const
inline

Definition at line 2054 of file weld.hxx.

References vcl::ConvertValue(), and nValue.

◆ convert_value_to()

sal_Int64 weld::MetricSpinButton::convert_value_to ( sal_Int64  nValue,
FieldUnit  eValueUnit 
) const
inline

Definition at line 2049 of file weld.hxx.

References vcl::ConvertValue(), and nValue.

◆ ConvertValue()

sal_Int64 weld::MetricSpinButton::ConvertValue ( sal_Int64  nValue,
FieldUnit  eInUnit,
FieldUnit  eOutUnit 
) const
private

Definition at line 362 of file builder.cxx.

References vcl::ConvertValue(), m_xSpinButton, and nValue.

◆ DECL_LINK() [1/3]

weld::MetricSpinButton::DECL_LINK ( spin_button_input  ,
int result,
bool   
)
private

◆ DECL_LINK() [2/3]

weld::MetricSpinButton::DECL_LINK ( spin_button_output  ,
weld::SpinButton ,
void   
)
private

◆ DECL_LINK() [3/3]

weld::MetricSpinButton::DECL_LINK ( spin_button_value_changed  ,
weld::SpinButton ,
void   
)
private

◆ denormalize()

sal_Int64 weld::MetricSpinButton::denormalize ( sal_Int64  nValue) const
inline

Definition at line 2137 of file weld.hxx.

References nValue.

◆ format_number()

OUString weld::MetricSpinButton::format_number ( sal_Int64  nValue) const
private

◆ get_buildable_name()

OUString weld::MetricSpinButton::get_buildable_name ( ) const
inline

Definition at line 2170 of file weld.hxx.

◆ get_digits()

unsigned int weld::MetricSpinButton::get_digits ( ) const
inline

Definition at line 2148 of file weld.hxx.

◆ get_increments()

void weld::MetricSpinButton::get_increments ( int step,
int page,
FieldUnit  eDestUnit 
) const
inline

Definition at line 2124 of file weld.hxx.

Referenced by set_digits(), and set_unit().

◆ get_max()

sal_Int64 weld::MetricSpinButton::get_max ( FieldUnit  eValueUnit) const
inline

Definition at line 2110 of file weld.hxx.

References max.

◆ get_min()

sal_Int64 weld::MetricSpinButton::get_min ( FieldUnit  eValueUnit) const
inline

Definition at line 2103 of file weld.hxx.

References min().

◆ get_preferred_size()

Size weld::MetricSpinButton::get_preferred_size ( ) const
inline

Definition at line 2161 of file weld.hxx.

◆ get_range()

void weld::MetricSpinButton::get_range ( sal_Int64 &  min,
sal_Int64 &  max,
FieldUnit  eDestUnit 
) const
inline

Definition at line 2082 of file weld.hxx.

References max, and min().

◆ get_sensitive()

bool weld::MetricSpinButton::get_sensitive ( ) const
inline

Definition at line 2139 of file weld.hxx.

◆ get_size_request()

Size weld::MetricSpinButton::get_size_request ( ) const
inline

Definition at line 2160 of file weld.hxx.

◆ get_text()

OUString weld::MetricSpinButton::get_text ( ) const
inline

Definition at line 2155 of file weld.hxx.

◆ get_unit()

FieldUnit weld::MetricSpinButton::get_unit ( ) const
inline

Definition at line 2045 of file weld.hxx.

◆ get_value()

sal_Int64 weld::MetricSpinButton::get_value ( FieldUnit  eDestUnit) const
inline

Definition at line 2064 of file weld.hxx.

Referenced by set_digits(), and set_unit().

◆ get_value_changed_from_saved()

bool weld::MetricSpinButton::get_value_changed_from_saved ( ) const
inline

Definition at line 2150 of file weld.hxx.

◆ get_visible()

bool weld::MetricSpinButton::get_visible ( ) const
inline

Definition at line 2140 of file weld.hxx.

◆ get_widget()

weld::SpinButton & weld::MetricSpinButton::get_widget ( )
inline

Definition at line 2178 of file weld.hxx.

◆ get_width_chars()

int weld::MetricSpinButton::get_width_chars ( ) const
inline

Definition at line 2177 of file weld.hxx.

◆ grab_focus()

void weld::MetricSpinButton::grab_focus ( )
inline

Definition at line 2141 of file weld.hxx.

◆ has_focus()

bool weld::MetricSpinButton::has_focus ( ) const
inline

Definition at line 2142 of file weld.hxx.

◆ hide()

void weld::MetricSpinButton::hide ( )
inline

Definition at line 2145 of file weld.hxx.

◆ MetricToString()

OUString weld::MetricSpinButton::MetricToString ( FieldUnit  rUnit)
static

Definition at line 232 of file builder.cxx.

References ImplGetFieldUnits().

Referenced by format_number().

◆ normalize()

sal_Int64 weld::MetricSpinButton::normalize ( sal_Int64  nValue) const
inline

Definition at line 2136 of file weld.hxx.

References nValue.

◆ reformat()

void weld::MetricSpinButton::reformat ( )
inline

Definition at line 2072 of file weld.hxx.

◆ save_value()

void weld::MetricSpinButton::save_value ( )
inline

Definition at line 2149 of file weld.hxx.

◆ set_accessible_name()

void weld::MetricSpinButton::set_accessible_name ( const OUString &  rName)
inline

Definition at line 2147 of file weld.hxx.

◆ set_digits()

void weld::MetricSpinButton::set_digits ( unsigned int  digits)

◆ set_help_id()

void weld::MetricSpinButton::set_help_id ( const OUString &  rName)
inline

Definition at line 2171 of file weld.hxx.

◆ set_increments()

void weld::MetricSpinButton::set_increments ( int  step,
int  page,
FieldUnit  eValueUnit 
)
inline

Definition at line 2117 of file weld.hxx.

Referenced by set_digits(), and set_unit().

◆ set_max()

void weld::MetricSpinButton::set_max ( sal_Int64  max,
FieldUnit  eValueUnit 
)
inline

Definition at line 2096 of file weld.hxx.

References max, and min().

◆ set_min()

void weld::MetricSpinButton::set_min ( sal_Int64  min,
FieldUnit  eValueUnit 
)
inline

Definition at line 2089 of file weld.hxx.

References max, and min().

◆ set_position()

void weld::MetricSpinButton::set_position ( int  nCursorPos)
inline

Definition at line 2172 of file weld.hxx.

◆ set_range()

void weld::MetricSpinButton::set_range ( sal_Int64  min,
sal_Int64  max,
FieldUnit  eValueUnit 
)
inline

Definition at line 2074 of file weld.hxx.

References max, and min().

◆ set_sensitive()

void weld::MetricSpinButton::set_sensitive ( bool  sensitive)
inline

Definition at line 2138 of file weld.hxx.

◆ set_size_request()

void weld::MetricSpinButton::set_size_request ( int  nWidth,
int  nHeight 
)
inline

Definition at line 2156 of file weld.hxx.

◆ set_text()

void weld::MetricSpinButton::set_text ( const OUString &  rText)
inline

Definition at line 2154 of file weld.hxx.

◆ set_unit()

void weld::MetricSpinButton::set_unit ( FieldUnit  eUnit)

◆ set_value()

void weld::MetricSpinButton::set_value ( sal_Int64  nValue,
FieldUnit  eValueUnit 
)
inline

Definition at line 2059 of file weld.hxx.

References nValue.

Referenced by set_digits(), and set_unit().

◆ set_visible()

void weld::MetricSpinButton::set_visible ( bool  bShow)
inline

Definition at line 2144 of file weld.hxx.

◆ set_width_chars()

void weld::MetricSpinButton::set_width_chars ( int  nChars)
inline

Definition at line 2176 of file weld.hxx.

◆ show()

void weld::MetricSpinButton::show ( )
inline

Definition at line 2143 of file weld.hxx.

◆ signal_value_changed()

void weld::MetricSpinButton::signal_value_changed ( )
inlineprivate

Definition at line 2024 of file weld.hxx.

References Link< typename Arg, typename Ret >::Call().

◆ update_width_chars()

void weld::MetricSpinButton::update_width_chars ( )
private

Definition at line 257 of file builder.cxx.

References format_number(), m_xSpinButton, max, min(), and Width.

Referenced by set_digits(), and set_unit().

Member Data Documentation

◆ m_aValueChangedHdl

Link<MetricSpinButton&, void> weld::MetricSpinButton::m_aValueChangedHdl
private

Definition at line 2018 of file weld.hxx.

◆ m_eSrcUnit

FieldUnit weld::MetricSpinButton::m_eSrcUnit
private

Definition at line 2016 of file weld.hxx.

Referenced by format_number(), set_digits(), and set_unit().

◆ m_xSpinButton

std::unique_ptr<weld::SpinButton> weld::MetricSpinButton::m_xSpinButton
private

Definition at line 2017 of file weld.hxx.

Referenced by ConvertValue(), format_number(), set_digits(), set_unit(), and update_width_chars().


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