Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

QCameraInterpolationTool.h

Go to the documentation of this file.
00001 /*
00002  * QCameraInterpolationTool.h
00003  * $Id: 
00004  *
00005  * Copyright (C) 2001 Thomas Woerner, Michael Meissner
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 _QCAMERAINTERPOLATION_TOOL_H
00033 #define _QCAMERAINTERPOLATION_TOOL_H
00034 
00035 
00036 // Qt
00038 #include <QGLExaminerViewer.h>
00039 #include <qdialog.h>
00040 #include <qcombobox.h>
00041 #include <qpushbutton.h>
00042 #include <qlineedit.h>
00043 
00044 // Own
00046 #include "CCameraPathInterpolator.h"
00047 #include "QCameraPathDrag.h"
00048 #include "QCameraPathDropSite.h"
00049 #include "QCameraKeyPathDrag.h"
00050 #include "QCameraKeyPathDropSite.h"
00051 #include "QIconOptions.h"
00052 #include "QSceneTreeNode.h"
00053 
00054 
00061 class QCameraInterpolationTool : public QDialog, public QSceneTreeDrawable
00062 {
00063    Q_OBJECT
00064     
00065    public:
00067       // PUBLIC METHODS //
00069     
00071       QCameraInterpolationTool(QGLViewer *pQGLViewer, QWidget* parent=NULL, const char* name=NULL, 
00072                                bool modal=FALSE, WFlags fl=0);
00074       ~QCameraInterpolationTool() {}
00075 
00077       void updateBoundingBox();
00078     
00080       virtual void draw();
00081 
00085       CList<CCamera> &getCameraPath() {
00086         return *m_CameraList.getFullDuplicate();
00087       };
00088 
00089    signals:
00091       // SIGNALS //
00093 
00095       void sigRedraw();
00096 
00100       void sigCameraPathChanged(const CList<CCamera> &cCameraPath);
00101 
00102 
00103    public slots:
00105       // PUBLIC SLOTS //
00107 
00109       void sltKeyLoad();
00110 
00112       void sltKeySave();
00113 
00115       void sltSave();
00116 
00118       void sltShapeSave();
00119 
00121       void sltInterpolate();
00122 
00124       void sltUndo();
00125 
00127       void sltShowOptions();
00128 
00130       void sltArrowSize(double);
00131 
00133       void sltFrustumSize(double);
00134 
00136       void sltSetCameraPath(const CList<CCamera> &list);
00137 
00139       void sltSetCameraKeyPath(const CList<CCameraKeyPathPoint> &path);
00140 
00141 
00142    protected:
00144       // PROTECTED METHODS //
00146 
00148       void makeArrowDispList();
00149 
00151       void makePathDispList();
00152 
00154       void dragEnterEvent(QDragEnterEvent*); 
00155  
00157       void dragLeaveEvent(QDragLeaveEvent*) { return; }
00158 
00160       void dropEvent(QDropEvent*);  
00161           
00162    private:
00164       // PRIVATE METHODS //
00166     
00167       QComboBox *m_pAlgoCombo;
00168       QComboBox *m_pPathCombo;
00169       QLineEdit *m_pKeysLine;
00170       QLineEdit *m_pFramesLine;
00171       QPushButton *m_pInterpolateButton;
00172       QPushButton *m_pUndoButton;
00173       QCameraKeyPathDropSite *m_pKeyDropSite;
00174       QCameraPathDropSite    *m_pDropSite;
00175 
00176       QIconOptions *m_pOptions;
00177 
00178       float m_rfIconSize;
00179       float m_rfFrustumSize;
00180       GLuint m_glPathDispList;
00181       GLuint m_glArrowDispList;
00182 
00183       QGLViewer *m_pQGLViewer;
00184 
00185       CList<CCameraKeyPathPoint> m_KeyPathList;
00186       CList<CCameraKeyPathPoint> m_ShapePathList;
00187 
00188       // CCamera list for drop site
00189       CList<CCamera> m_CameraList;
00190 };
00191 
00192 #endif /* QINTERPOLATION_TOOL_H */

Generated on Wed Sep 14 04:50:33 2005 for QGLViewer by  doxygen 1.4.4