Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::Pref< int > Class Reference

#include <preferences.h>

Inheritance diagram for Inkscape::Pref< int >:
Inkscape::PrefBase< int > Inkscape::Preferences::Observer

Public Member Functions

 Pref (Glib::ustring path, int def=0, int min=INT_MIN, int max=INT_MAX)
 
- Public Member Functions inherited from Inkscape::PrefBase< int >
 operator const int & () const
 The current value.
 
void set_enabled (bool enabled)
 Disable switch. If disabled, the Pref will stick at its default value.
 
- Public Member Functions inherited from Inkscape::Preferences::Observer
 Observer (Glib::ustring path)
 Constructor.
 
virtual ~Observer ()
 

Public Attributes

int min
 
int max
 
- Public Attributes inherited from Inkscape::PrefBase< int >
int def
 The default value.
 
std::function< void()> action
 The action to perform when the value changes, if any.
 
- Public Attributes inherited from Inkscape::Preferences::Observer
Glib::ustring const observed_path
 Path which the observer watches.
 

Private Member Functions

auto read () const
 
auto changed (Preferences::Entry const &e) const
 

Private Attributes

friend PrefBase
 

Additional Inherited Members

- Protected Member Functions inherited from Inkscape::PrefBase< int >
 PrefBase (Glib::ustring path, int def)
 
 PrefBase (PrefBase const &)=delete
 
PrefBaseoperator= (PrefBase const &)=delete
 
void init ()
 
void act ()
 
void assign (int const &val2)
 
void enable ()
 
void disable ()
 
void notify (Preferences::Entry const &e) override
 Notification about a preference change.
 
- Protected Attributes inherited from Inkscape::PrefBase< int >
int val
 

Detailed Description

Definition at line 848 of file preferences.h.

Constructor & Destructor Documentation

◆ Pref()

Inkscape::Pref< int >::Pref ( Glib::ustring  path,
int  def = 0,
int  min = INT_MIN,
int  max = INT_MAX 
)
inline

Definition at line 852 of file preferences.h.

References init().

Member Function Documentation

◆ changed()

auto Inkscape::Pref< int >::changed ( Preferences::Entry const &  e) const
inlineprivate

Definition at line 856 of file preferences.h.

References Inkscape::Preferences::Entry::getIntLimited().

◆ read()

auto Inkscape::Pref< int >::read ( ) const
inlineprivate

Member Data Documentation

◆ max

int Inkscape::Pref< int >::max

Definition at line 851 of file preferences.h.

Referenced by Inkscape::UI::Tools::EraserTool::EraserTool().

◆ min

int Inkscape::Pref< int >::min

Definition at line 851 of file preferences.h.

Referenced by Inkscape::UI::Tools::EraserTool::EraserTool().

◆ PrefBase

friend Inkscape::Pref< int >::PrefBase
private

Definition at line 854 of file preferences.h.


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