Mcalc  0.1
a machinist's calculator
Public Member Functions | Static Public Member Functions | List of all members
mc::Settings Class Reference

#include <settings.hpp>

Inheritance diagram for mc::Settings:
Inheritance graph
[legend]
Collaboration diagram for mc::Settings:
Collaboration graph
[legend]

Public Member Functions

 ~Settings ()
 
void init_components ()
 
void set_builder (Glib::RefPtr< Gtk::Builder > b)
 
void set_submit (std::string s)
 
void bind (std::string s, Interface *i)
 
void load (std::string p)
 
void save ()
 
void notify (Event *e)
 
- Public Member Functions inherited from mc::Subscriber
 Subscriber ()
 
virtual ~Subscriber ()
 

Static Public Member Functions

static Settingsget_instance ()
 

Detailed Description

The Settings object acts as a collection of user-provided values.

Constructor & Destructor Documentation

mc::Settings::~Settings ( )

The destructor

Member Function Documentation

void mc::Settings::bind ( std::string  s,
Interface i 
)

Map an input to a setting value.

Parameters
sThe setting to update.
iThe interface to watch.
Settings * mc::Settings::get_instance ( )
static

Get the singleton instance of settings

void mc::Settings::load ( std::string  p)

Load the values from the database into the ui and settings.

void mc::Settings::notify ( Event e)
virtual

The method that will receive notifications from the broadcaster.

Parameters
eThe event object.

Implements mc::Subscriber.

void mc::Settings::save ( )

Save the values from the ui into the database.

void mc::Settings::set_builder ( Glib::RefPtr< Gtk::Builder >  b)

Set the builder object so that Settings can load widgets from the ui.

Parameters
bThe builder
void mc::Settings::set_submit ( std::string  s)

Link the given Gtk::Button element id to the save method.

Parameters
sThe id of the Gtk::Button to use.

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