本文整理汇总了C++中Relation::getID方法的典型用法代码示例。如果您正苦于以下问题:C++ Relation::getID方法的具体用法?C++ Relation::getID怎么用?C++ Relation::getID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Relation
的用法示例。
在下文中一共展示了Relation::getID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Token
Relation::Relation(const Relation& inputRelation)
{
Id = new Token(*inputRelation.getID());
tuples = new set<Tuple>((*inputRelation.getTuples()));
schema = new Schema((*inputRelation.getSchema()));
}
示例2: timerEvent
void EntitieCustomeWidget::timerEvent(){
if(core->getFocus()!=-1){
if(this->curFocus != core->getFocus() || (core->getFocusObj()!=this->curObj)){
this->curFocus = core->getFocus();
this->curObj = core->getFocusObj();
if(core->getFocusObj()){
if(core->getFocus()<core->getEntitieCount()){
Entitie* e = core->getEntitieAt(core->getFocus());
this->ClearWidget();
this->entitieName = new QLabel("Название сущности:");
this->tb = new QLineEdit();
// Label
this->tb->setMaxLength(50);
this->tb->setText(QString::fromStdString(e->getID()));
// Layout
this->setLayout(qbl);
// Добавление widget'ов
this->qbl->addWidget(this->entitieName);
this->qbl->addWidget(this->tb);
for(int i=0; i<e->fieldCount(); i++){
LineOfField* lf = new LineOfField(this, e, e->fieldAt(i),this);
this->fildlist->push_back(lf);
this->qbl->addWidget(lf);
}
this->addButton = new QPushButton("Добавить поле");
this->qbl->addWidget(this->addButton);
this->qbl->addStretch();
QObject::connect(this->addButton,SIGNAL(clicked()),this,SLOT(buttonAdd()));
}
}else{
if(core->getFocus()<core->getRelationCount()){
Relation* r = core->getRelationAt(core->getFocus());
this->ClearWidget();
this->entitieName = new QLabel("Название связи:");
this->tb = new QLineEdit();
// Label
this->tb->setMaxLength(50);
this->tb->setText(QString::fromStdString(r->getID()));
this->qbl->addWidget(this->entitieName);
this->qbl->addWidget(this->tb);
this->qbl->addWidget(new QLabel("Ключевое поле"));
this->key = new QLineEdit("Ключ");
this->key->setText(QString::fromStdString(r->getKey()));
this->qbl->addWidget(this->key);
//==========================================
this->ml = new QCheckBox("Множественная связь слева");
this->ml->setChecked(r->getMulL());
this->qbl->addWidget(ml);
//==========================================
this->mr = new QCheckBox("Множественная связь справа");
this->mr->setChecked(r->getMulR());
this->qbl->addWidget(mr);
//==========================================
this->al = new QCheckBox("Абстрактная связь слева");
this->al->setChecked(r->getAbsL());
this->qbl->addWidget(al);
//==========================================
this->ar = new QCheckBox("Абстрактная связь справа");
this->ar->setChecked(r->getAbsR());
this->qbl->addWidget(ar);
//==========================================
this->qbl->addStretch();
this->setLayout(qbl);
}
}
}
}else{
this->curFocus = -1;
this->curObj = true;
while(this->layout()->count()>0){
QLayoutItem* item = this->layout()->itemAt(0);
this->layout()->removeItem( item );
this->layout()->removeWidget(item->widget());
delete item->widget();
delete item;
this->layout()->update();
}
}
}