~ubuntu-branches/ubuntu/breezy/kdemultimedia/breezy

« back to all changes in this revision

Viewing changes to arts/builder/module.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-03-24 04:48:58 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050324044858-8ff88o9jxej6ii3d
Tags: 4:3.4.0-0ubuntu3
Add kubuntu_02_hide_arts_menu_entries.diff to hide artsbuilder and artscontrol k-menu entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
    You should have received a copy of the GNU General Public License
17
17
    along with this program; if not, write to the Free Software
18
 
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
18
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
19
19
 
20
20
    */
21
21
 
22
22
#ifndef __MODULE_H_
23
23
#define __MODULE_H_
24
24
 
25
 
 
26
25
#include <list>
27
26
 
28
27
#include <qpixmap.h>
36
35
class ModulePort
37
36
{
38
37
        //ModulePort *connection;
 
38
        
39
39
public:
40
40
        Arts::PortDesc PortDesc;
41
41
        long pdID;
42
42
 
43
 
        enum ConnType {none,source,dest,value,conf};
44
 
        enum Direction {in,out};
 
43
        enum ConnType {none, source, dest, value, conf};
 
44
        enum Direction {in, out};
45
45
 
46
 
        bool            selected;
47
 
        StructureComponent         *owner;
 
46
        bool                             selected;
 
47
        StructureComponent      *owner;
48
48
 
49
49
        QString         description;
50
50
        QRect           clickrect;
55
55
 
56
56
        long            route_owner;
57
57
 
58
 
        ModulePort(StructureComponent *owner, const std::string& description, 
 
58
        ModulePort( StructureComponent *owner, const std::string& description,
59
59
                                int drawsegment, Direction direction, Arts::PortDesc PortDesc);
60
60
 
61
61
        bool down();
68
68
        Arts::StructureDesc StructureDesc;
69
69
        Arts::ModuleDesc    ModuleDesc;
70
70
 
71
 
        int _x,_y,_width,_height;
72
 
        bool _selected, _visible;
73
71
        QPixmap *_pixmap;
74
72
        QString _name;
75
73
 
 
74
        int _width, _height;
 
75
        bool moveInternal(int x, int y);
 
76
 
76
77
        void initModule();
77
78
 
78
79
public:
79
 
        Module(Arts::ModuleDesc moduledesc, Arts::StructureDesc structuredesc,
80
 
                                                                                        StructureCanvas *canvas);
81
 
        Module(const Arts::ModuleInfo& minfo, Arts::StructureDesc structuredesc,
82
 
                                                                                        StructureCanvas *canvas);
 
80
        Module( Arts::ModuleDesc moduledesc, Arts::StructureDesc structuredesc,
 
81
                        StructureCanvas *canvas);
 
82
        Module( const Arts::ModuleInfo& minfo, Arts::StructureDesc structuredesc,
 
83
                        StructureCanvas *canvas);
83
84
        virtual ~Module();
84
85
 
85
86
        ModulePort *findPort(int xoffset, int direction);
87
88
        bool isInterface;
88
89
 
89
90
        long mdID;
90
 
        std::list<ModulePort *> inports,outports;
 
91
        std::list<ModulePort *> inports, outports;
91
92
 
92
93
// StructureComponent interface
93
94
 
 
95
        int width() const;
 
96
        int height() const;
94
97
        ComponentType type();
95
98
 
96
99
        ModulePort *portAt(int segment, int x, int y);
97
100
        void dumpPorts(std::list<ModulePort *>& ports);
98
101
 
99
 
        bool visible();
100
 
        void show();
101
 
        void hide();
102
 
 
103
102
        bool drawNeedsBackground(int segment);
104
103
        void drawSegment(QPainter *dest, int cellsize, int segment);
105
104
        QPixmap *pixmap();
106
 
        const char *name();
107
 
 
108
 
        bool selected();
109
 
        void setSelected(bool newselection);
110
 
 
111
 
        // in cells
112
 
        bool move(int x, int y);
113
 
        int width();
114
 
        int height();
115
 
        int x();
116
 
        int y();
117
 
};
 
105
        QString name();
 
106
 };
118
107
 
119
108
#endif