void PseudoStateData::set_reference(BrowserPseudoState * st) { if (reference != 0) disconnect(reference->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); if ((reference = st) != 0) { connect(reference->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); } }
void StateData::set_specification(BrowserOperation * op) { if (op != specification) { if (specification != 0) disconnect(specification->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); if ((specification = op) != 0) { connect(specification->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); } } }
void ClassData::set_base_type(const AType & t) { if (base_type.type != t.type) { if (base_type.type != 0) disconnect(base_type.type->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); if ((base_type.type = t.type) != 0) connect(base_type.type->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); } base_type.explicit_type = t.explicit_type; }
void StateData::on_delete() { if ((specification != 0) && specification->deletedp()) { disconnect(specification->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); specification = 0; } if ((reference != 0) && reference->deletedp()) { disconnect(reference->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); reference = 0; } }
void AttributeData::set_type(const AType & t) { if (type.type != t.type) { if (type.type != 0) disconnect(type.type->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); if ((type.type = t.type) != 0) { connect(type.type->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); } } type.explicit_type = t.explicit_type; }
void PseudoStateData::on_delete() { if ((reference != 0) && reference->deletedp()) { disconnect(reference->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); reference = 0; } }
void ActivityData::on_delete() { if ((specification != 0) && specification->deletedp()) { disconnect(specification->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); specification = 0; } }
void RelationData::set_idlcase(RoleData & role, BrowserAttribute * at, const char * e) { if (role.idl_case != at) { // do not disconnect because don't check the other side role.idl_case = at; if (at != 0) connect(at->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); } role.idl_explicit_case = e; }
void RelationData::set_association(const AType & t) { if (association.type != t.type) { if (association.type != 0) disconnect(association.type->get_data(), 0, this, 0); if ((association.type = t.type) != 0) { connect(association.type->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); } } association.explicit_type = t.explicit_type; }
bool Listener::decref_and_unlock(){ int refcnt = --this->refcnt; if (refcnt == 0) { on_delete(); //UNLOCK(listener); //EVTHREAD_FREE_LOCK(listener->lock, EVTHREAD_LOCKTYPE_RECURSIVE); delete this; return true; } else { //UNLOCK(listener); return false; } }
void main_window::setup_menu() { QMenu *file_menu = menuBar()->addMenu("File"); QAction *new_mission = new QAction("New mission", this); new_mission->setShortcut(QKeySequence::New); file_menu->addAction(new_mission); connect(new_mission, SIGNAL(triggered()), this, SLOT(on_new_mission())); QAction *load_mission = new QAction("Load mission", this); load_mission->setShortcut(QKeySequence::Open); file_menu->addAction(load_mission); connect(load_mission, SIGNAL(triggered()), this, SLOT(on_load_mission())); QAction *save_mission = new QAction("Save mission", this); save_mission->setShortcut(QKeySequence::Save); file_menu->addAction(save_mission); connect(save_mission, SIGNAL(triggered()), this, SLOT(on_save_mission())); QAction *save_as_mission = new QAction("Save as mission", this); save_as_mission->setShortcut(QKeySequence::SaveAs); file_menu->addAction(save_as_mission); connect(save_as_mission, SIGNAL(triggered()), this, SLOT(on_save_as_mission())); QMenu *edit_menu = menuBar()->addMenu("Edit"); QAction *select_all = new QAction("Select all", this); select_all->setShortcut(QKeySequence::SelectAll); edit_menu->addAction(select_all); connect(select_all, SIGNAL(triggered()), m_objects_tree, SLOT(selectAll())); QAction *select_none = new QAction("Select none", this); select_none->setShortcut(QKeySequence("Ctrl+D")); //QKeySequence::Deselect edit_menu->addAction(select_none); connect(select_none, SIGNAL(triggered()), m_objects_tree, SLOT(clearSelection())); QAction *delete_selected = new QAction("Delete selected", this); #ifdef Q_OS_MAC delete_selected->setShortcut(QKeySequence("Backspace")); #else delete_selected->setShortcut(QKeySequence::Delete); #endif edit_menu->addAction(delete_selected); connect(delete_selected, SIGNAL(triggered()), this, SLOT(on_delete())); }
static gint animation_timer (gpointer data) { switch (g_random_int_range (0, 3)) { case 0: on_insert (); break; case 1: on_delete (); break; case 2: on_reorder (); break; } n_animations--; return n_animations > 0; }
void ParameterData::do_connect(BrowserClass * c) { connect(c->get_data(), SIGNAL(deleted()), this, SLOT(on_delete())); }