summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/enumliteral.h
blob: e9a63b1a561e94f114812ab25526a3ec7fbffb90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   copyright (C) 2003-2006                                               *
 *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
 ***************************************************************************/

#ifndef ENUMLITERAL_H
#define ENUMLITERAL_H

#include "classifierlistitem.h"

/**
 * This class is used to set up information for an enum literal.  Enum
 * literals are the values that enums can be set to.
 *
 * @short Sets up attribute information.
 * @author Paul Hensgen <phensgen@techie.com>
 * @see UMLObject
 * Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
 */

class UMLEnumLiteral : public UMLClassifierListItem {
public:
    /**
     * Sets up an enum literal.
     *
     * @param parent    The parent of this UMLEnumLiteral.
     * @param name              The name of this UMLEnumLiteral.
     * @param id                The unique id given to this UMLEnumLiteral.
     */
    UMLEnumLiteral(const UMLObject* parent,
                   const TQString& name, Uml::IDType id = Uml::id_None);

    /**
     * Sets up an enum literal.
     *
     * @param parent    The parent of this UMLEnumLiteral.
     */
    UMLEnumLiteral(const UMLObject* parent);

    /**
     * Overloaded '==' operator
     */
    bool operator==(UMLEnumLiteral &rhs);

    /**
     * Copy the internal presentation of this object into the new
     * object.
     */
    virtual void copyInto(UMLEnumLiteral *rhs) const;

    /**
     * Make a clone of this object.
     */
    virtual UMLObject* clone() const;

    /**
     * destructor
     */
    virtual ~UMLEnumLiteral();

    /**
     * Creates the <UML:EnumLiteral> XMI element.
     */
    void saveToXMI(TQDomDocument& qDoc, TQDomElement& qElement);

    /**
     * Display the properties configuration dialog for the enum literal.
     */
    bool showPropertiesDialog(TQWidget* parent);

protected:
    /**
     * Loads the <UML:EnumLiteral> XMI element (empty.)
     */
    bool load(TQDomElement& element);

};

#endif