00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef CHANNELICONVIEW_H
00019 #define CHANNELICONVIEW_H
00020
00021
00022 #include <qwidget.h>
00023 #include <qpainter.h>
00024 #include <qiconview.h>
00025 #include <qdragobject.h>
00026 #include <qwidget.h>
00027
00028
00029 #include <iostream>
00030 using namespace std;
00031
00036 class ChannelIconView : public QIconView {
00037 Q_OBJECT
00038 public:
00039 ChannelIconView(QColor backgroundColor,int gridX,int gridY,bool edit,QWidget* parent = 0,const char* name = 0, WFlags f = 0);
00040 inline ~ChannelIconView(){};
00041
00042 protected:
00043 virtual QDragObject* dragObject();
00044 virtual void contentsDropEvent(QDropEvent* event);
00045 virtual void contentsMousePressEvent(QMouseEvent* event);
00046 inline void contentsWheelEvent(QWheelEvent* event){event->accept();};
00047
00048 signals:
00049 void channelsMoved(QString targetGroup,QIconViewItem* after);
00050 void channelsMoved(const QValueList<int>& channelIds,QString sourceGroup,QIconViewItem* after);
00051 void dropLabel(int sourceId,int targetId,int start,int destination);
00052 void moussePressWoModificators(QString sourceGroup);
00053
00054 public slots:
00055 inline void setDragAndDrop(bool dragDrop){drag = dragDrop;};
00056
00057 protected slots:
00058 void slotDropped(QDropEvent* event,const QValueList<QIconDragItem>& draggedList);
00059
00060 private:
00062 QIconViewItem* findItemToInsertAfter(QPoint position);
00063
00065 bool drag;
00066
00067 };
00068
00069 #endif