diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-17 00:32:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-02-17 00:32:19 +0000 |
commit | 0d382a262c0638d0f572fc37193ccc5ed3dc895f (patch) | |
tree | 8578dcddfce4191f3f7a142a37769df7add48475 /k9author/k9menueditor.h | |
download | k9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.tar.gz k9copy-0d382a262c0638d0f572fc37193ccc5ed3dc895f.zip |
Added old abandoned version of k9copy
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k9copy@1091546 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'k9author/k9menueditor.h')
-rw-r--r-- | k9author/k9menueditor.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/k9author/k9menueditor.h b/k9author/k9menueditor.h new file mode 100644 index 0000000..53c1921 --- /dev/null +++ b/k9author/k9menueditor.h @@ -0,0 +1,64 @@ +// +// C++ Interface: k9menueditor +// +// Description: +// +// +// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef K9MENUEDITOR_H +#define K9MENUEDITOR_H + +#include <qcanvas.h> + +/** + @author Jean-Michel PETIT <k9copy@free.fr> +*/ + +class k9MenuButton; +class k9MenuEdit; +class k9CanvasSelection; +class k9MenuEditor : public QCanvasView { + Q_OBJECT + +public: + k9MenuEditor(QCanvas&, QWidget* parent=0, const char* name=0, WFlags f=0); + void clear(); + + k9MenuButton* getSelected() ; + void setMenu(k9MenuEdit *_menu) { + m_menu=_menu; + } + + QCanvasItem* getMoving() const; + + void setMoving(QCanvasItem* _value); + QPtrList< k9MenuButton > *getSelection() ; + void clearSelection(); + void hideSelection(); +protected: + void contentsMousePressEvent(QMouseEvent*); + void contentsMouseMoveEvent(QMouseEvent*); + void contentsMouseReleaseEvent(QMouseEvent* e); + void updateCursor(QMouseEvent *e); + virtual void resizeEvent ( QResizeEvent * e ); + void addSelection(QCanvasItem *_item); + bool isSelected(QCanvasItem *_item); + void drawSelection(); +signals: + void status(const QString&); + void itemSelected(); + +private: + QCanvasItem* moving; + QCanvasRectangle *m_rect; + QPoint moving_start; + k9MenuEdit *m_menu; + QPtrList <k9MenuButton> m_selection; + k9CanvasSelection *m_canvasSelection; +}; + +#endif |