QCameraPathDropSite.h

Go to the documentation of this file.
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  * As a special exception to the GPL, the QGLViewer authors (Markus
00022  * Janich, Michael Meissner, Richard Guenther, Alexander Buck and Thomas
00023  * Woerner) give permission to link this program with Qt (non-)commercial
00024  * edition, and distribute the resulting executable, without including
00025  * the source code for the Qt (non-)commercial edition in the source
00026  * distribution.
00027  *
00028  */
00029 
00030 
00031 
00032 #ifndef _QCAMERAPATHDROPSITE_H
00033 #define _QCAMERAPATHDROPSITE_H
00034 
00035 
00036 // Qt
00038 #include <qlabel.h>
00039 
00040 // QGLViewer
00042 #include <CCamera.h>
00043 
00044 // Own
00046 #include "CList.h"
00047 
00048 
00049 
00051 
00056 class QCameraPathDropSite: public QLabel {
00057    Q_OBJECT
00058 
00059    public:
00061       // PUBLIC METHODS //
00063 
00064       QCameraPathDropSite(QWidget *parent=0, const char * name = 0);
00065       ~QCameraPathDropSite() { }
00066 
00067       void setCameraPath(CList<CCamera> *pList) {
00068                m_CameraList.clear(1);
00069                for (int i=0; i<pList->getNumObjects(); i++)
00070                   m_CameraList.insertAsLast(new CCamera((*pList)[i]));
00071             };
00072 
00073    signals:
00075       // SIGNALS //
00077 
00078       void sigCameraPathDropped(const CList<CCamera> &list);
00079 
00080    protected:
00082       // PROTECTED METHODS //
00084 
00086       void dragEnterEvent(QDragEnterEvent *pqEvent);
00087 
00089       void dragLeaveEvent(QDragLeaveEvent *pqEvent);
00090 
00092       void dropEvent(QDropEvent *pqEvent);
00093     
00095       void mousePressEvent(QMouseEvent *pqEvent);
00096 
00098       void mouseReleaseEvent(QMouseEvent *pqEvent);
00099 
00100    private:
00102       // PRIVATE MEMBERS //
00104       CList<CCamera> m_CameraList;
00105 };
00106 
00107 
00108 #endif // _QCAMERAPATHDROPSITE_H

Generated on Tue Jul 11 10:42:56 2006 for QGLViewer by  doxygen 1.4.7