summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/dialogs/activitypage.h
blob: 6743e2aa43ced74d9de1d47fd109a86fb6ede2a9 (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
86
87
88
89
90
91
92
93
94
95
/***************************************************************************
 *                                                                         *
 *   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) 2002-2006                                               *
 *   Umbrello UML Modeller Authors <uml-devel@uml.sf.net>                  *
 ***************************************************************************/

#ifndef ACTIVITYPAGE_H
#define ACTIVITYPAGE_H
//qt includes
#include <tqwidget.h>
#include <tqgroupbox.h>
#include <tqlistbox.h>
//kde includes
#include <karrowbutton.h>
//app includes

class StateWidget;
class ListPopupMenu;

/**
 * @author Paul Hensgen
 * Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org
 */
class ActivityPage : public TQWidget {
    Q_OBJECT
  
public:
    /**
     *  Constructor
     */
    ActivityPage( TQWidget * pParent, StateWidget * pWidget );

    /**
    *   Deconstructor
    */
    ~ActivityPage();

    /**
    *   Sets up the page.
    */
    void setupPage();

    /**
    *   Sets the activities of the widget.
    */
    void updateActivities();

protected:
    /**
     *  Set the state of the widgets on the page with the given value.
     *
     *  @param  state   The state to set the widgets as.
     */
    void enableWidgets(bool state);

    /**
     *  The widget to get the activities from.
     */
    StateWidget * m_pStateWidget;

    /**
     *  Popup menu used.
     */
    ListPopupMenu * m_pMenu;
    //GUI widgets
    TQListBox * m_pActivityLB;
    TQGroupBox * m_pActivityGB;
    KArrowButton * m_pUpArrowB, * m_pDownArrowB, * m_pTopArrowB, *m_pBottomArrowB;
    TQPushButton* m_pDeleteActivityButton;
    TQPushButton* m_pRenameButton;

public slots:
    /**
     *  Popup menu item selected
     */
    void slotMenuSelection( int sel );
    void slotClicked( TQListBoxItem* item );
    void slotDoubleClicked( TQListBoxItem* item );
    void slotRightButtonClicked(TQListBoxItem* item, const TQPoint& p);
    void slotRightButtonPressed(TQListBoxItem* item, const TQPoint& p);
    void slotTopClicked();
    void slotUpClicked();
    void slotDownClicked();
    void slotBottomClicked();
    void slotNewActivity();
    void slotDelete();
    void slotRename();
};

#endif