00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef ITEMICONVIEW_H
00019 #define ITEMICONVIEW_H
00020
00021
00022 #include <qwidget.h>
00023 #include <qiconview.h>
00024 #include <qdragobject.h>
00025 #include <qwidget.h>
00026
00027
00028 #include <iostream>
00029 using namespace std;
00030
00035 class ItemIconView : public QIconView {
00036 Q_OBJECT
00037 public:
00038 ItemIconView(QColor backgroundColor,QIconView::ItemTextPos position,int gridX,int gridY,QWidget* parent = 0,const char* name = 0, WFlags f = 0);
00039 inline ~ItemIconView(){};
00040
00041 private slots:
00042 inline void slotMousePressed(int button,QIconViewItem* item){
00043 emit mouseButtonPressed(button,item,this->name());
00044 };
00045 inline void contentsMouseReleaseEvent(QMouseEvent* event){
00046 QIconView::contentsMouseReleaseEvent(event);
00047 emit mouseReleased(this->name());
00048 };
00049
00050
00051 protected:
00052 void contentsMousePressEvent(QMouseEvent* event);
00053 inline void contentsWheelEvent(QWheelEvent* event){event->accept();};
00054
00055 signals:
00056 void mousePressWoModificators(QString sourceGroup);
00057 void mouseButtonPressed(int,QIconViewItem*,QString sourceGroup);
00058 void mousePressWAltButton(QString sourceGroup,int index);
00059 void mouseButtonClicked(int,QIconViewItem*,QString sourceGroup);
00060 void mouseReleased(QString sourceGroup);
00061
00062 };
00063
00064 #endif