petalnode.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "petalnode.h"
00014
00015 PetalNode::PetalNode(NodeType nt) {
00016 m_type = nt;
00017 }
00018
00019 PetalNode::~PetalNode() {
00020 }
00021
00022 PetalNode::NodeType PetalNode::type() const {
00023 return m_type;
00024 }
00025
00026 QStringList PetalNode::initialArgs() const {
00027 return m_initialArgs;
00028 }
00029
00030 QString PetalNode::name() const {
00031 if (m_initialArgs.count() == 0)
00032 return QString();
00033 return m_initialArgs.first();
00034 }
00035
00036 PetalNode::NameValueList PetalNode::attributes() const {
00037 return m_attributes;
00038 }
00039
00040
00041
00042
00043
00044
00045
00046 void PetalNode::setInitialArgs(const QStringList& args) {
00047 m_initialArgs = args;
00048 }
00049
00050 void PetalNode::setAttributes(PetalNode::NameValueList vl) {
00051 m_attributes = vl;
00052 }
00053
00054 PetalNode::StringOrNode PetalNode::findAttribute(const QString& name) const {
00055 for (uint i = 0; i < m_attributes.count(); i++) {
00056 if (m_attributes[i].first == name)
00057 return m_attributes[i].second;
00058 }
00059 return StringOrNode();
00060 }
00061
This file is part of the documentation for umbrello Version 3.1.0.