1 Star 0 Fork 68

lenvon2012/图与网络优化_Qt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
spvertex.cpp 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
ZzqiZQute 提交于 2018-06-25 21:36 . 20186252136
#include "spvertex.h"
#include "spvertexparam.h"
#include "common.h"
SPVertex::SPVertex()
{
params=new QList<SPVertexParam*>();
selected=false;
}
QList<SPVertexParam*>* SPVertex::getParams() const
{
return params;
}
SPVertex::~SPVertex(){
delete params;
}
void SPVertex::addVertexParams(SPVertexParam* vp){
for(int i=0;i<params->count();i++){
if(params->at(i)->getP()==vp->getP()){
params->removeAt(i);
break;
}
}
params->push_back(vp);
}
void SPVertex::removeVertexParamsAt(int pos){
params->removeAt(pos);
}
int SPVertex::getCenterY() const
{
return centerY;
}
void SPVertex::setCenterY(int value)
{
centerY = value;
}
int SPVertex::getCenterX() const
{
return centerX;
}
void SPVertex::setCenterX(int value)
{
centerX = value;
}
bool SPVertex::getSelected() const
{
return selected;
}
void SPVertex::setSelected(bool value)
{
selected = value;
}
void SPVertex::saveCenter()
{
oriCenterX=centerX;
oriCenterY=centerY;
}
int SPVertex::getOriCenterX() const
{
return oriCenterX;
}
int SPVertex::getOriCenterY() const
{
return oriCenterY;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/lenvon2012/graph_and_network_optimization_qt.git
[email protected]:lenvon2012/graph_and_network_optimization_qt.git
lenvon2012
graph_and_network_optimization_qt
图与网络优化_Qt
master

搜索帮助