blob: dc06f3ad62dba30760046a9b9af90a07d725df0b (
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
|
//
// C++ Interface: k9menueditor
//
// Description:
//
//
// Author: Jean-Michel PETIT <[email protected]>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef K9MENUEDITOR_H
#define K9MENUEDITOR_H
#include <tqcanvas.h>
/**
@author Jean-Michel PETIT <[email protected]>
*/
class k9MenuButton;
class k9MenuEdit;
class k9CanvasSelection;
class k9MenuEditor : public TQCanvasView {
Q_OBJECT
TQ_OBJECT
public:
k9MenuEditor(TQCanvas&, TQWidget* parent=0, const char* name=0, WFlags f=0);
void clear();
k9MenuButton* getSelected() ;
void setMenu(k9MenuEdit *_menu) {
m_menu=_menu;
}
TQCanvasItem* getMoving() const;
void setMoving(TQCanvasItem* _value);
TQPtrList< k9MenuButton > *getSelection() ;
void clearSelection();
void hideSelection();
protected:
void contentsMousePressEvent(TQMouseEvent*);
void contentsMouseMoveEvent(TQMouseEvent*);
void contentsMouseReleaseEvent(TQMouseEvent* e);
void updateCursor(TQMouseEvent *e);
virtual void resizeEvent ( TQResizeEvent * e );
void addSelection(TQCanvasItem *_item);
bool isSelected(TQCanvasItem *_item);
void drawSelection();
signals:
void status(const TQString&);
void itemSelected();
private:
TQCanvasItem* moving;
TQCanvasRectangle *m_rect;
TQPoint moving_start;
k9MenuEdit *m_menu;
TQPtrList <k9MenuButton> m_selection;
k9CanvasSelection *m_canvasSelection;
};
#endif
|