summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/dialogs/pkgcontentspage.h
blob: 654310e5a29a2138468f34f96297f00b6e589989 (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
/***************************************************************************
 *                                                                         *
 *   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 PKGCONTENTSPAGE_H
#define PKGCONTENTSPAGE_H

#include <tqwidget.h>
#include <tqgroupbox.h>
#include <tqlistbox.h>
#include <tqptrlist.h>

#include "../package.h"
#include "../listpopupmenu.h"

/**
 * @short The page shows all the objects that belong to a @ref UMLPackage.
 * @author Oliver Kellogg <okellogg@users.sourceforge.net>
 * Bugs and comments to uml-devel@lists.sf.net or http://bugs.trinitydesktop.org
 */
class PkgContentsPage : public TQWidget {
    Q_OBJECT
  
public:
    /**
     * Constructs an instance of PkgContentsPage.
     *
     * @param parent    The parent of the page.
     * @param pkg               The UMLPackage being represented.
     */
    PkgContentsPage(TQWidget *parent, UMLPackage *pkg);

    /**
     * Standard destructor.
     */
    ~PkgContentsPage();

private:
    UMLPackage * m_pPackage;
    TQListBox * m_pContentLB;
    TQGroupBox * m_pContentGB;
    ListPopupMenu * m_pMenu;

    /**
     * Fills the list box with the package's contents.
     */
    void fillListBox();

public slots:
    void slotDoubleClick(TQListBoxItem * i);
    void slotRightButtonClicked(TQListBoxItem */* item*/, const TQPoint &/* p*/);
    void slotRightButtonPressed(TQListBoxItem * item, const TQPoint & p);
    void slotPopupMenuSel(int id);
};

#endif