00001 /* 00002 * QCameraPathDropSite.h 00003 * $Id: 00004 * 00005 * Copyright (C) 2001 Thomas Woerner, Markus Janich 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 * 00021 */ 00022 00023 00024 00025 #ifndef _QCAMERAPATHDROPSITE_H 00026 #define _QCAMERAPATHDROPSITE_H 00027 00028 00029 // Qt 00031 #include <qlabel.h> 00032 00033 // QGLViewer 00035 #include <CCamera.h> 00036 00037 // Own 00039 #include "CList.h" 00040 00041 00042 00044 00049 class QCameraPathDropSite: public QLabel { 00050 Q_OBJECT 00051 00052 public: 00054 // PUBLIC METHODS // 00056 00057 QCameraPathDropSite(QWidget *parent=0, const char * name = 0); 00058 ~QCameraPathDropSite() { } 00059 00060 void setCameraPath(CList<CCamera> *pList) { 00061 m_CameraList.clear(1); 00062 for (int i=0; i<pList->getNumObjects(); i++) 00063 m_CameraList.insertAsLast(new CCamera((*pList)[i])); 00064 }; 00065 00066 signals: 00068 // SIGNALS // 00070 00071 void sigCameraPathDropped(const CList<CCamera> &list); 00072 00073 protected: 00075 // PROTECTED METHODS // 00077 00079 void dragEnterEvent(QDragEnterEvent *pqEvent); 00080 00082 void dragLeaveEvent(QDragLeaveEvent *pqEvent); 00083 00085 void dropEvent(QDropEvent *pqEvent); 00086 00088 void mousePressEvent(QMouseEvent *pqEvent); 00089 00091 void mouseReleaseEvent(QMouseEvent *pqEvent); 00092 00093 private: 00095 // PRIVATE MEMBERS // 00097 CList<CCamera> m_CameraList; 00098 }; 00099 00100 00101 #endif // _QCAMERAPATHDROPSITE_H