当前位置: 首页>>代码示例>>C++>>正文


C++ Relation::getID方法代码示例

本文整理汇总了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()));
}
开发者ID:SchuylerGoodman,项目名称:RelationalDatabase,代码行数:6,代码来源:Relation.cpp

示例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();
        }
    }
}
开发者ID:Ladone3,项目名称:er_diogram_mdp,代码行数:85,代码来源:entitiecustomewidget.cpp


注:本文中的Relation::getID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。