debug/src/channeliconview.h

00001 /***************************************************************************
00002                           channeliconview.h  -  description
00003                              -------------------
00004     begin                : Fri Mar 5 2004
00005     copyright            : (C) 2004 by Lynn Hazan
00006     email                : lynn.hazan.myrealbox.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef CHANNELICONVIEW_H
00019 #define CHANNELICONVIEW_H
00020 
00021 //QT include files
00022 #include <qwidget.h>
00023 #include <qpainter.h>
00024 #include <qiconview.h>
00025 #include <qdragobject.h>
00026 #include <qwidget.h>
00027 
00028 //General C++ include files
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

Generated on Mon Sep 17 20:47:30 2007 for NeuroScope by  doxygen 1.5.1