associationgeneralpage.h 2.21 KB
Newer Older
1 2 3 4 5 6
/***************************************************************************
 *   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.                                   *
 *                                                                         *
7
 *   copyright (C) 2003-2014                                               *
Ralf Habacker's avatar
Ralf Habacker committed
8
 *   Umbrello UML Modeller Authors <umbrello-devel@kde.org>                *
9 10
 ***************************************************************************/

11 12
#ifndef ASSOCIATIONGENERALPAGE_H
#define ASSOCIATIONGENERALPAGE_H
13

14
#include "basictypes.h"
15
#include "dialogpagebase.h"
16

17 18 19
#include <QList>
#include <QWidget>

20
class AssociationWidget;
21
class DocumentationWidget;
22 23 24
class QCheckBox;
class QGridLayout;
class QLabel;
25
class KComboBox;
26 27 28 29
class KLineEdit;
class ObjectWidget;
class UMLDoc;
class UMLObject;
30

31
/**
Oliver Kellogg's avatar
Oliver Kellogg committed
32
 * Displays properties of a UMLObject in a dialog box.  This is not usually directly
33
 * called.  The class @ref AssociationPropertiesDialog will set this up for you.
34
 *
Oliver Kellogg's avatar
Oliver Kellogg committed
35
 * @short Display properties on a UMLObject.
36
 * @author Paul Hensgen <phensgen@techie.com>
37
 * Bugs and comments to umbrello-devel@kde.org or http://bugs.kde.org
38
 */
39
class AssociationGeneralPage : public DialogPageBase
Andi Fischer's avatar
Andi Fischer committed
40
{
Oliver Kellogg's avatar
Oliver Kellogg committed
41
    Q_OBJECT
42
public:
43
    AssociationGeneralPage(QWidget *parent, AssociationWidget *a);
44
    ~AssociationGeneralPage();
45

46
    void apply();
47

48
private:
49 50 51 52 53
    QGridLayout *m_pNameAndTypeLayout;
    QLabel    *m_pAssocNameL;
    KLineEdit *m_pAssocNameLE;   // is used if m_pStereoChkB is unchecked
    KComboBox *m_pAssocNameComB; // is used if m_pStereoChkB is checked
    QCheckBox *m_pStereoChkB;
54
    KComboBox *m_pTypeCB;
55 56 57

    /* Choices for the QComboBox, and we store ints and strings
       so we can translate both ways */
58
    QList<Uml::AssociationType::Enum> m_AssocTypes;
59
    QStringList m_AssocTypeStrings;
60
    DocumentationWidget *m_docWidget;
61

Oliver Kellogg's avatar
Oliver Kellogg committed
62
    AssociationWidget *m_pAssociationWidget;
63
    ObjectWidget *m_pWidget;
64

Oliver Kellogg's avatar
Oliver Kellogg committed
65
    void constructWidget();
66 67

public slots:
68
    void slotStereoCheckboxChanged(int state);
Andi Fischer's avatar
Andi Fischer committed
69

70 71 72
};

#endif