glc_mover.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003  This file is part of the GLC-lib library.
00004  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
00005  Version 2.0.0 Beta 1, packaged on April 2010.
00006 
00007  http://glc-lib.sourceforge.net
00008 
00009  GLC-lib is free software; you can redistribute it and/or modify
00010  it under the terms of the GNU General Public License as published by
00011  the Free Software Foundation; either version 2 of the License, or
00012  (at your option) any later version.
00013 
00014  GLC-lib is distributed in the hope that it will be useful,
00015  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  GNU General Public License for more details.
00018 
00019  You should have received a copy of the GNU General Public License
00020  along with GLC-lib; if not, write to the Free Software
00021  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00022 
00023  *****************************************************************************/
00024 
00026 
00027 #ifndef GLC_MOVER_H_
00028 #define GLC_MOVER_H_
00029 
00030 #include "glc_repmover.h"
00031 #include "../maths/glc_vector3d.h"
00032 
00033 #include <QObject>
00034 #include <QList>
00035 
00036 #include "../glc_config.h"
00037 
00038 class QMouseEvent;
00039 class GLC_Viewport;
00040 
00043 
00044 
00045 class GLC_LIB_EXPORT GLC_Mover : public QObject
00046 {
00047         Q_OBJECT
00048 
00049 public:
00051         GLC_Mover(GLC_Viewport*, const QList<GLC_RepMover*>&);
00052 
00054         GLC_Mover(const GLC_Mover&);
00055 
00057         virtual ~GLC_Mover();
00058 
00059 
00061 
00063 
00064 public:
00066         virtual GLC_Mover* clone() const= 0;
00068 
00070 
00072 
00073 public:
00075         virtual void init(QMouseEvent * e)= 0;
00076 
00078         virtual bool move(QMouseEvent * e)= 0;
00079 
00081         virtual void ends(){}
00082 
00084         void setRepresentationsList(const QList<GLC_RepMover*>&);
00085 
00087         void initRepresentation();
00088 
00090         void updateRepresentation();
00091 
00092 
00094 
00096 
00098 
00099 public:
00101         void glExecute();
00102 
00104 
00105 signals:
00107         void updated();
00108 
00110 // Private services Functions
00112 private:
00114         void clearMoverRepresentation();
00115 
00117 // Private Members
00119 private:
00121         QList<GLC_RepMover*> m_RepMoverList;
00122 
00124 // Protected Members
00126 protected:
00127 
00129         GLC_Vector3d m_PreviousVector;
00130 
00132         GLC_Viewport* m_pViewport;
00133 
00135         GLC_RepMover::RepMoverInfo m_MoverInfo;
00136 };
00137 
00138 #endif /* GLC_MOVER_H_ */

SourceForge.net Logo

©2005 Laurent Ribon