diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-06-30 13:43:35 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-06-30 13:43:35 +0200 |
commit | 82d41a2d7b2ac2a9ffb15814064bed0053f8ab08 (patch) | |
tree | b8c0a3fdd866bc7f4ed40bf2cbfd3a671b5c877a | |
parent | 561ef94f856f6dc33246a70bcd11d24f6c1f30d5 (diff) | |
download | glibmm-82d41a2d7b2ac2a9ffb15814064bed0053f8ab08.tar.gz |
Properties example: Print the property values
-rw-r--r-- | examples/properties/properties_example.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/properties/properties_example.cc b/examples/properties/properties_example.cc index 0d6c336b..224ce2db 100644 --- a/examples/properties/properties_example.cc +++ b/examples/properties/properties_example.cc @@ -74,6 +74,8 @@ main(int, char**) p.property_firstname().signal_changed().connect(sigc::ptr_fun(&on_firstname_changed)); p.property_lastname().signal_changed().connect(sigc::ptr_fun(&on_lastname_changed)); p.property_age().signal_changed().connect(sigc::ptr_fun(&on_age_changed)); + std::cout << "Name, age: " << p.property_firstname() << " " << p.property_lastname() + << ", " << p.property_age() << std::endl; // now change the properties and see that the handlers get called std::cout << "Changing the properties of 'p'" << std::endl; @@ -81,6 +83,8 @@ main(int, char**) p.property_lastname() = "Doe"; p.property_age() = 43; std::cout << "Done changing the properties of 'p'" << std::endl; + std::cout << "Name, age: " << p.property_firstname() << " " << p.property_lastname() + << ", " << p.property_age() << std::endl; return 0; } |