Hotel_Info_Ui::Hotel_Info_Ui( QWidget * parent ) : QWidget( parent ) { ownerNum = 0; roomTypeNum = 0; roomNum = 0; restNum = 0; tableNum =0; ui.setupUi( this ); QObject::connect(ui.saveHotelInfo, SIGNAL(clicked()), this, SLOT(SaveHotelInfo())); QObject::connect(ui.addRoomType, SIGNAL(clicked()), this, SLOT(AddRoomType())); QObject::connect(ui.delRoomType, SIGNAL(clicked()), this, SLOT(DeleteRoomType())); QObject::connect(ui.saveRoomTypes, SIGNAL(clicked()), this, SLOT(SaveRoomTypes())); QObject::connect(ui.addRoomButton, SIGNAL(clicked()), this, SLOT(AddRoom())); QObject::connect(ui.remRoomButton, SIGNAL(clicked()), this, SLOT(RemoveRoom())); QObject::connect(ui.saveRoomsInfo, SIGNAL(clicked()), this, SLOT(SaveRoomInfo())); QObject::connect(ui.addOwnerButton, SIGNAL(clicked()), this, SLOT(AddOwner())); QObject::connect(ui.delOwnerButton, SIGNAL(clicked()), this, SLOT(DeleteOwner())); QObject::connect(ui.saveOwnerInfo, SIGNAL(clicked()), this, SLOT(SaveOwnerInfo())); QObject::connect(ui.addRestButton, SIGNAL(clicked()), this, SLOT(AddRestaurant())); QObject::connect(ui.remRestButton, SIGNAL(clicked()), this, SLOT(RemoveRestaurant())); QObject::connect(ui.saveRestInfo, SIGNAL(clicked()), this, SLOT(SaveRestaurants())); QObject::connect(ui.addTableButton, SIGNAL(clicked()), this, SLOT(AddRestTable())); QObject::connect(ui.remTableButton, SIGNAL(clicked()), this, SLOT(RemoveRestTable())); QObject::connect(ui.saveTablesInfo, SIGNAL(clicked()), this, SLOT(SaveRestTableInfo())); }
//--------------------------------------------------------------------------- bool TShortCuts::AddOwner(TMenuItem *mi,AnsiString Prefix, int level, int sortorder) { if(mi->IsLine()) //skip separators return true; if(IsBlockedOwner(mi)) return true; TShortCutOwner sco; sco.mi=mi; sco.prefix=Prefix; sco.level=level; sco.name=StripHotkey(mi->Caption); sco.sortorder=sortorder; shortcutowners.push_back(sco); if(mi&&mi->ShortCut) SetShortCut(mi->ShortCut,sco.GetPrefixedStr()); int count=mi->Count; if(!count) return true; level++; for(int i=0;i<count;i++) { TMenuItem *mi2=mi->Items[i]; if(!AddOwner(mi2,Prefix,level,sortorder)) return false; } return true; }
void HeeksObj::AddOwners(std::list<HeeksObj*> owners) { for (std::list<HeeksObj*>::iterator itOwner = m_owners.begin(); itOwner != m_owners.end(); itOwner++) { AddOwner( *itOwner ); } }
void AudioDescriptor::AddOwners(std::vector<hoa_mode_manager::GameMode *>& owners) { std::vector<hoa_mode_manager::GameMode *>::const_iterator it = owners.begin(); for(; it != owners.end(); ++it) { AddOwner(*it); } }
/* ===================== sdClientProjectile::Launch ===================== */ void sdClientProjectile::Launch( idEntity* owner, const idVec3& tracerMuzzleOrigin, const idMat3& tracerMuzzleAxis ) { idAngles tracerMuzzleAngles = tracerMuzzleAxis.ToAngles(); idVec3 anglesVec( tracerMuzzleAngles.pitch, tracerMuzzleAngles.yaw, tracerMuzzleAngles.roll ); AddOwner( owner ); sdScriptHelper helper; helper.Push( tracerMuzzleOrigin ); helper.Push( anglesVec ); CallNonBlockingScriptEvent( scriptObject->GetFunction( "OnLaunch" ), helper ); }
//--------------------------------------------------------------------------- bool TShortCuts::AddOwnerMenu(TMenuItem *root, AnsiString Prefix, AnsiString RootName, int sortorder) { int count=root->Count; if(!count) return false; TShortCutOwner sco; sco.mi=0; sco.prefix=Prefix; sco.level=0; sco.name=RootName; sco.sortorder=sortorder; shortcutowners.push_back(sco); for(int i=0;i<count;i++) { TMenuItem *mi2=root->Items[i]; if(!AddOwner(mi2,Prefix,1,sortorder)) return false; } return true; }
/* ================ sdClientProjectile_Parabolic::Event_SetOwner ================ */ void sdClientProjectile_Parabolic::Event_SetOwner( idEntity* other ) { AddOwner( other ); }
void HeeksObj::SetOwner(HeeksObj *obj) { m_owners.clear(); if(obj)AddOwner(obj); }