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

umbrello/umbrello

  • sources
  • kde-4.12
  • kdesdk
  • umbrello
  • umbrello
  • codegenerators
codeblockwithcomments.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This program is free software; you can redistribute it and/or modify *
3  * it under the terms of the GNU General Public License as published by *
4  * the Free Software Foundation; either version 2 of the License, or *
5  * (at your option) any later version. *
6  * *
7  * copyright (C) 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> *
8  * copyright (C) 2004-2013 *
9  * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10  ***************************************************************************/
11 
12 #ifndef CODEBLOCKWITHCOMMENTS_H
13 #define CODEBLOCKWITHCOMMENTS_H
14 
15 #include "codeblock.h"
16 #include "codecomment.h"
17 
18 class HierarchicalCodeBlock;
19 
24 class CodeBlockWithComments : public CodeBlock
25 {
26 public:
27 
28  explicit CodeBlockWithComments (CodeDocument * parent, const QString & body = "", const QString & comment = "");
29 
33  virtual ~CodeBlockWithComments ();
34 
35  void setComment (CodeComment * object);
36 
37  CodeComment * getComment () const;
38 
39  virtual QString toString () const;
40 
41  void setOverallIndentationLevel (int level);
42 
43  virtual void saveToXMI (QDomDocument & doc, QDomElement & root);
44 
45  virtual void loadFromXMI (QDomElement & root);
46 
47  virtual void setAttributesFromObject (TextBlock * obj);
48 
49 protected:
50 
51  virtual void setAttributesOnNode (QDomDocument & doc, QDomElement & blockElement);
52 
53  virtual void setAttributesFromNode (QDomElement & element);
54 
55 private:
56 
57  CodeComment * m_comment;
58 
59 };
60 
61 #endif // CODEBLOCKWITHCOMMENTS_H
CodeBlockWithComments::~CodeBlockWithComments
virtual ~CodeBlockWithComments()
Empty Destructor.
Definition: codeblockwithcomments.cpp:31
CodeBlock
A "chunk" of code within the code document.
Definition: codeblock.h:20
CodeBlockWithComments::getComment
CodeComment * getComment() const
Get the Comment object.
Definition: codeblockwithcomments.cpp:46
CodeBlockWithComments::setAttributesFromObject
virtual void setAttributesFromObject(TextBlock *obj)
Set the class attributes from a passed object.
Definition: codeblockwithcomments.cpp:83
CodeBlockWithComments::setAttributesOnNode
virtual void setAttributesOnNode(QDomDocument &doc, QDomElement &blockElement)
Set attributes of the node that represents this class in the XMI document.
Definition: codeblockwithcomments.cpp:68
CodeBlockWithComments::toString
virtual QString toString() const
Definition: codeblockwithcomments.cpp:136
CodeBlockWithComments::setOverallIndentationLevel
void setOverallIndentationLevel(int level)
A utility method that causes the comment and body of the code block to have the same indentation leve...
Definition: codeblockwithcomments.cpp:163
codecomment.h
codeblock.h
CodeBlockWithComments
class CodeBlockWithComments A very common type of text block in any type of code. ...
Definition: codeblockwithcomments.h:24
CodeDocument
A document containing the code for one file.
Definition: codedocument.h:32
CodeBlockWithComments::CodeBlockWithComments
CodeBlockWithComments(CodeDocument *parent, const QString &body="", const QString &comment="")
Basic Constructor.
Definition: codeblockwithcomments.cpp:23
CodeBlockWithComments::setAttributesFromNode
virtual void setAttributesFromNode(QDomElement &element)
Set the class attributes of this object from the passed element node.
Definition: codeblockwithcomments.cpp:105
HierarchicalCodeBlock
Definition: hierarchicalcodeblock.h:22
TextBlock
The fundemental unit of text within an output file containing code.
Definition: textblock.h:24
CodeBlockWithComments::saveToXMI
virtual void saveToXMI(QDomDocument &doc, QDomElement &root)
Save the XMI representation of this object.
Definition: codeblockwithcomments.cpp:54
CodeComment
Text which will be comments.
Definition: codecomment.h:23
CodeBlockWithComments::setComment
void setComment(CodeComment *object)
Set the Comment object.
Definition: codeblockwithcomments.cpp:38
CodeBlockWithComments::loadFromXMI
virtual void loadFromXMI(QDomElement &root)
Load params from the appropriate XMI element node.
Definition: codeblockwithcomments.cpp:96
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:05:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

umbrello/umbrello

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

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