用CIMExporter分别处理读到的线路,开关,变压器等元件。

Signed-off-by: facat@lab.com <facat@lab.com>
This commit is contained in:
facat@lab.com
2014-12-28 16:40:57 +08:00
parent 28e1df38fa
commit 9cb2f5a8f6
12 changed files with 124 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
#include "branch.h"
Branch::Branch(const QString& from, const QString& to):from(from),to(to)
Branch::Branch(const QString& from, const QString& to, QObject *parent):from(from),to(to)
{
}

View File

@@ -1,10 +1,12 @@
#ifndef BRANCH_H
#define BRANCH_H
#include <QObject>
#include <QString>
class Branch
class Branch:public QObject
{
Q_OBJECT
public:
Branch(const QString& from, const QString& to);
Branch(const QString& from, const QString& to,QObject* parent=0);
protected:
double r;
double x;

View File

@@ -1,6 +1,6 @@
#include "line.h"
Line::Line(const QPair<QString,QString>& fromTo, ACLineSegment* ac):Branch(fromTo.first,fromTo.second)
Line::Line(const QPair<QString,QString>& fromTo, ACLineSegment* ac, QObject *parent):Branch(fromTo.first,fromTo.second)
{
this->ratio=1;
this->ac=ac;

View File

@@ -1,12 +1,13 @@
#ifndef LINE_H
#define LINE_H
#include <QObject>
#include <QPair>
#include "branch.h"
#include "./../aclinesegment.h"
class Line:public Branch
{
public:
Line(const QPair<QString, QString> &fromTo, ACLineSegment* ac);
Line(const QPair<QString, QString> &fromTo, ACLineSegment* ac,QObject* parent=0);
protected:
virtual void extract();
private:

View File

@@ -1,6 +1,6 @@
#include "switch.h"
Switch::Switch(const QPair<QString,QString>& fromTo):Branch(fromTo.first,fromTo.second)
Switch::Switch(const QPair<QString,QString>& fromTo, QObject *parent):Branch(fromTo.first,fromTo.second)
{
this->extract();
}

View File

@@ -1,11 +1,12 @@
#ifndef SWITCH_H
#define SWITCH_H
#include <QObject>
#include <QPair>
#include "branch.h"
class Switch:public Branch
{
public:
Switch(const QPair<QString, QString> &fromTo);
Switch(const QPair<QString, QString> &fromTo,QObject *parent=0);
protected:
virtual void extract();

View File

@@ -1,7 +1,7 @@
#include "transformer.h"
Transformer::Transformer(const QPair<QString,QString>& fromTo, PowerTransformer* tf):Branch(fromTo.first,fromTo.second)
Transformer::Transformer(const QPair<QString,QString>& fromTo, PowerTransformer* tf, QObject *parent):Branch(fromTo.first,fromTo.second)
{
this->ratio=1;
this->tf=tf;

View File

@@ -1,12 +1,13 @@
#ifndef TRANSFORMER_H
#define TRANSFORMER_H
#include <QObject>
#include <QPair>
#include "branch.h"
#include "./../powertransformer.h"
class Transformer:public Branch
{
public:
Transformer(const QPair<QString, QString> &fromTo, PowerTransformer *tf);
Transformer(const QPair<QString, QString> &fromTo, PowerTransformer *tf,QObject *parent=0);
protected:
virtual void extract();
private: