Inkscape
Vector Graphics Editor
|
#include <preferences.h>
Public Member Functions | |
operator const T & () const | |
The current value. | |
void | set_enabled (bool enabled) |
Disable switch. If disabled, the Pref will stick at its default value. | |
![]() | |
Observer (Glib::ustring path) | |
Constructor. | |
virtual | ~Observer () |
Public Attributes | |
T | def |
The default value. | |
std::function< void()> | action |
The action to perform when the value changes, if any. | |
![]() | |
Glib::ustring const | observed_path |
Path which the observer watches. | |
Protected Member Functions | |
PrefBase (Glib::ustring path, T def) | |
PrefBase (PrefBase const &)=delete | |
PrefBase & | operator= (PrefBase const &)=delete |
void | init () |
void | act () |
void | assign (T const &val2) |
void | enable () |
void | disable () |
void | notify (Preferences::Entry const &e) override |
Notification about a preference change. | |
Protected Attributes | |
T | val |
Definition at line 806 of file preferences.h.
|
inlineprotected |
Definition at line 824 of file preferences.h.
|
protecteddelete |
|
inlineprotected |
Definition at line 829 of file preferences.h.
References Inkscape::PrefBase< T >::action.
Referenced by Inkscape::PrefBase< T >::assign().
|
inlineprotected |
Definition at line 830 of file preferences.h.
References Inkscape::PrefBase< T >::act(), and Inkscape::PrefBase< T >::val.
Referenced by Inkscape::PrefBase< T >::disable(), Inkscape::PrefBase< T >::enable(), and Inkscape::PrefBase< T >::notify().
|
inlineprotected |
Definition at line 832 of file preferences.h.
References Inkscape::PrefBase< T >::assign(), Inkscape::PrefBase< T >::def, Inkscape::Preferences::get(), and Inkscape::Preferences::removeObserver().
Referenced by Inkscape::PrefBase< T >::set_enabled().
|
inlineprotected |
Definition at line 831 of file preferences.h.
References Inkscape::Preferences::addObserver(), Inkscape::PrefBase< T >::assign(), and Inkscape::Preferences::get().
Referenced by Inkscape::PrefBase< T >::set_enabled().
|
inlineprotected |
Definition at line 828 of file preferences.h.
References Inkscape::Preferences::addObserver(), Inkscape::Preferences::get(), and Inkscape::PrefBase< T >::val.
|
inlineoverrideprotectedvirtual |
Notification about a preference change.
new_val | Entry object containing information about the modified preference. |
Implements Inkscape::Preferences::Observer.
Definition at line 833 of file preferences.h.
References Inkscape::PrefBase< T >::assign().
|
inline |
The current value.
Definition at line 813 of file preferences.h.
|
protecteddelete |
|
inline |
Disable switch. If disabled, the Pref will stick at its default value.
Definition at line 819 of file preferences.h.
References Inkscape::PrefBase< T >::disable(), and Inkscape::PrefBase< T >::enable().
Referenced by Inkscape::UI::Widget::Prefs::set_devmode().
std::function<void()> Inkscape::PrefBase< T >::action |
The action to perform when the value changes, if any.
Definition at line 816 of file preferences.h.
Referenced by Inkscape::PrefBase< T >::act(), Inkscape::UI::Tools::EraserTool::EraserTool(), Inkscape::UI::Widget::Prefs::Prefs(), and Inkscape::UI::Dialog::XmlTree::XmlTree().
T Inkscape::PrefBase< T >::def |
The default value.
Definition at line 810 of file preferences.h.
Referenced by Inkscape::PrefBase< T >::disable().
|
protected |
Definition at line 822 of file preferences.h.
Referenced by Inkscape::PrefBase< T >::assign(), Inkscape::PrefBase< T >::init(), and Inkscape::PrefBase< bool >::operator const bool &().