• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

rocs/App

  • sources
  • kde-4.14
  • kdeedu
  • rocs
  • App
  • InterfacePlugins
  • ApiDoc
ObjectDocumentation.cpp
Go to the documentation of this file.
1 /*
2  This file is part of Rocs.
3  Copyright 2013 Andreas Cord-Landwehr <cola@uni-paderborn.de>
4 
5  This program is free software; you can redistribute it and/or
6  modify it under the terms of the GNU General Public License as
7  published by the Free Software Foundation; either version 2 of
8  the License, or (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #include "ObjectDocumentation.h"
20 #include <QStringList>
21 #include <KDebug>
22 
23 ObjectDocumentation::ObjectDocumentation(QObject* parent)
24  : QObject(parent)
25 {
26 }
27 
28 ObjectDocumentation::~ObjectDocumentation()
29 {
30 }
31 
32 void ObjectDocumentation::setId(const QString &id)
33 {
34  _id = id;
35 }
36 
37 QString ObjectDocumentation::id() const
38 {
39  return _id;
40 }
41 
42 void ObjectDocumentation::setComponentType(const QString& compenentTypeName)
43 {
44  if (compenentTypeName == "DataStructure") {
45  _componentType = DataStructure;
46  return;
47  }
48  if (compenentTypeName == "Data") {
49  _componentType = Data;
50  return;
51  }
52  if (compenentTypeName == "Pointer") {
53  _componentType = Pointer;
54  return;
55  }
56  if (compenentTypeName == "EngineComponent") {
57  _componentType = EngineComponent;
58  return;
59  }
60 
61  // else
62  kError() << "Unable to understand componentType " << compenentTypeName;
63  _componentType = EngineComponent;
64 }
65 
66 ObjectDocumentation::ComponentType ObjectDocumentation::componentType() const
67 {
68  return _componentType;
69 }
70 
71 void ObjectDocumentation::setTitle(const QString &title)
72 {
73  _title = title;
74 }
75 
76 QString ObjectDocumentation::title() const
77 {
78  return _title;
79 }
80 
81 void ObjectDocumentation::setDescription(const QStringList &description)
82 {
83  _description = description;
84 }
85 
86 QVariantList ObjectDocumentation::description() const
87 {
88  QVariantList list;
89  foreach (QString paragraph, _description) {
90  list << paragraph;
91  }
92  return list;
93 }
94 
95 void ObjectDocumentation::setSyntaxExample(const QString &syntaxExample)
96 {
97  _syntaxExample = syntaxExample;
98 }
99 
100 QString ObjectDocumentation::syntaxExample() const
101 {
102  return _syntaxExample;
103 }
104 
105 void ObjectDocumentation::addProperty(PropertyDocumentation* property)
106 {
107  _properties.append(property);
108 }
109 
110 QList< PropertyDocumentation* > ObjectDocumentation::properties() const
111 {
112  return _properties;
113 }
114 
115 void ObjectDocumentation::addMethod(MethodDocumentation* method)
116 {
117  _methods.append(method);
118 }
119 
120 QList< MethodDocumentation* > ObjectDocumentation::methods() const
121 {
122  return _methods;
123 }
124 
125 void ObjectDocumentation::setObjectParent(const QString& id)
126 {
127  _objectParent = id;
128 }
129 
130 QString ObjectDocumentation::objectParent() const
131 {
132  return _objectParent;
133 }
134 
135 QString ObjectDocumentation::apiDocumentIdentifier()
136 {
137  return _id;
138 }
ObjectDocumentation::objectParent
QString objectParent() const
Definition: ObjectDocumentation.cpp:130
ObjectDocumentation.h
PropertyDocumentation
Definition: PropertyDocumentation.h:28
ObjectDocumentation::addMethod
void addMethod(MethodDocumentation *method)
Definition: ObjectDocumentation.cpp:115
ObjectDocumentation::setComponentType
void setComponentType(const QString &compenentTypeName)
Definition: ObjectDocumentation.cpp:42
ObjectDocumentation::ComponentType
ComponentType
Definition: ObjectDocumentation.h:39
ObjectDocumentation::Data
Definition: ObjectDocumentation.h:42
ObjectDocumentation::setSyntaxExample
void setSyntaxExample(const QString &syntaxExample)
Definition: ObjectDocumentation.cpp:95
ObjectDocumentation::ObjectDocumentation
ObjectDocumentation(QObject *parent=0)
Definition: ObjectDocumentation.cpp:23
ObjectDocumentation::setDescription
void setDescription(const QStringList &description)
Definition: ObjectDocumentation.cpp:81
ObjectDocumentation::properties
QList< PropertyDocumentation * > properties() const
Definition: ObjectDocumentation.cpp:110
ObjectDocumentation::addProperty
void addProperty(PropertyDocumentation *property)
Definition: ObjectDocumentation.cpp:105
ObjectDocumentation::setTitle
void setTitle(const QString &title)
Definition: ObjectDocumentation.cpp:71
QList::append
void append(const T &value)
ObjectDocumentation::setObjectParent
void setObjectParent(const QString &id)
Definition: ObjectDocumentation.cpp:125
ObjectDocumentation::DataStructure
Definition: ObjectDocumentation.h:40
QObject
ObjectDocumentation::apiDocumentIdentifier
QString apiDocumentIdentifier()
Definition: ObjectDocumentation.cpp:135
QString
QList< PropertyDocumentation * >
QStringList
ObjectDocumentation::syntaxExample
QString syntaxExample() const
ObjectDocumentation::title
QString title() const
MethodDocumentation
Definition: MethodDocumentation.h:29
ObjectDocumentation::setId
void setId(const QString &id)
Definition: ObjectDocumentation.cpp:32
ObjectDocumentation::description
QVariantList description() const
ObjectDocumentation::id
QString id() const
ObjectDocumentation::Pointer
Definition: ObjectDocumentation.h:41
ObjectDocumentation::componentType
ComponentType componentType() const
Definition: ObjectDocumentation.cpp:66
ObjectDocumentation::methods
QList< MethodDocumentation * > methods() const
Definition: ObjectDocumentation.cpp:120
ObjectDocumentation::~ObjectDocumentation
~ObjectDocumentation()
Definition: ObjectDocumentation.cpp:28
ObjectDocumentation::EngineComponent
Definition: ObjectDocumentation.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:16:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

rocs/App

Skip menu "rocs/App"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal