| 7 |
|
|
| 8 |
#include "config.h" |
#include "config.h" |
| 9 |
#include "OneSpouseToFamilyLink.hh" |
#include "OneSpouseToFamilyLink.hh" |
| 10 |
|
#include "OneSpouseToFamilyLinkHandler.hh" |
| 11 |
|
#include "MMIUnionFamilyNote.hh" |
| 12 |
|
|
| 13 |
OneSpouseToFamilyLink::OneSpouseToFamilyLink(void) : |
OneSpouseToFamilyLink::OneSpouseToFamilyLink(void) : |
| 14 |
MMIUnionFamilyNote(0) |
OneSpouseToFamilyLink_glade(), |
| 15 |
|
OneFamilyLink() |
| 16 |
{ |
{ |
| 17 |
_husband->set_text(""); |
_husband->set_text(""); |
| 18 |
_wife->set_text(""); |
_wife->set_text(""); |
| 21 |
|
|
| 22 |
OneSpouseToFamilyLink::~OneSpouseToFamilyLink(void) |
OneSpouseToFamilyLink::~OneSpouseToFamilyLink(void) |
| 23 |
{ |
{ |
|
if (MMIUnionFamilyNote != 0) |
|
|
{ |
|
|
MMIUnionFamilyNote->clear(); |
|
|
} |
|
| 24 |
return; |
return; |
| 25 |
} |
} |
| 26 |
|
|
| 27 |
OneSpouseToFamilyLink::OneSpouseToFamilyLink(std::string const &union_date, |
OneSpouseToFamilyLink::OneSpouseToFamilyLink(OneFamilyLinkHandler const * const handler) : |
| 28 |
std::string const &union_place, |
OneSpouseToFamilyLink_glade(), |
| 29 |
std::string const &husb, |
OneFamilyLink(handler) |
|
std::string const &wife, |
|
|
std::vector <std::string> const &children, |
|
|
SigC::Slot0<void> * slot_husband, |
|
|
SigC::Slot0<void> * slot_wife, |
|
|
std::vector< SigC::Slot0<void> * > slot_children) : |
|
|
MMIUnionFamilyNote(0) |
|
| 30 |
{ |
{ |
| 31 |
_union_date->set_text(union_date); |
OneSpouseToFamilyLinkHandler const * const spouse_to_family_link_handler = static_cast < OneSpouseToFamilyLinkHandler const * const >(handler); |
| 32 |
_union_place->set_text(union_place); |
|
| 33 |
_husband->set_text(husb); |
_union_date->set_text(spouse_to_family_link_handler->getUnionDate()); |
| 34 |
|
_union_place->set_text(spouse_to_family_link_handler->getUnionPlace()); |
| 35 |
|
_husband->set_text(spouse_to_family_link_handler->getHusband()); |
| 36 |
|
OneFamilyLinkHandler::SlotHandler_t * slot_husband = spouse_to_family_link_handler->getSlotHusband(); |
| 37 |
if (slot_husband != 0) |
if (slot_husband != 0) |
| 38 |
{ |
{ |
| 39 |
_goto_husband->clicked.connect(*slot_husband); |
_goto_husband->button_release_event.connect(*slot_husband); |
| 40 |
} |
} |
| 41 |
_wife->set_text(wife); |
_wife->set_text(spouse_to_family_link_handler->getWife()); |
| 42 |
|
OneFamilyLinkHandler::SlotHandler_t * slot_wife = spouse_to_family_link_handler->getSlotWife(); |
| 43 |
if (slot_wife != 0) |
if (slot_wife != 0) |
| 44 |
{ |
{ |
| 45 |
_goto_wife->clicked.connect(*slot_wife); |
_goto_wife->button_release_event.connect(*slot_wife); |
| 46 |
} |
} |
| 47 |
|
std::vector< std::string > children = spouse_to_family_link_handler->getChildren(); |
| 48 |
|
std::vector< OneFamilyLinkHandler::SlotHandler_t * > slots_children = spouse_to_family_link_handler->getSlotsChildren(); |
| 49 |
for (unsigned int cpt_child = 0; cpt_child < children.size(); cpt_child++) |
for (unsigned int cpt_child = 0; cpt_child < children.size(); cpt_child++) |
| 50 |
{ |
{ |
| 51 |
Gtk::Button * goto_child = manage(new Gtk::Button(children[cpt_child])); |
Gtk::Button * goto_child = manage(new Gtk::Button(children[cpt_child])); |
| 52 |
if (slot_children[cpt_child] != 0) |
if (slots_children[cpt_child] != 0) |
| 53 |
{ |
{ |
| 54 |
goto_child->clicked.connect(*slot_children[cpt_child]); |
goto_child->button_release_event.connect(*slots_children[cpt_child]); |
| 55 |
} |
} |
| 56 |
this->pack_start(*goto_child); |
this->pack_start(*goto_child); |
| 57 |
goto_child->show(); |
goto_child->show(); |
| 58 |
} |
} |
| 59 |
return; |
return; |
| 60 |
} |
} |
|
|
|
|
|
|