orca-robotics


INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

REPOSITORY
Interfaces
Components
Libraries
Utilities
Software Map

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard
Wiki
login/pass: orca/orca

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

worldview.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This copy of Orca is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef ORCA_ORCAGUI3D_WORLDVIEW3D_H
00012 #define ORCA_ORCAGUI3D_WORLDVIEW3D_H
00013 
00014 #include <QMouseEvent>
00015 #include <QFileDialog>
00016 #include <QString>
00017 #include <QtOpenGL>
00018 #include <GL/glut.h>
00019 #include <orcaqgui3d/platformcsfinder.h>
00020 
00021 namespace orcaqgui
00022 {
00023     class GuiElementModel;
00024     class WaypointSettings;
00025     class HumanInput;
00026     class MainWindow;
00027 }
00028 
00029 namespace orcaqgui3d 
00030 {
00031 
00032 class WorldView : public QGLWidget
00033 {
00034    Q_OBJECT
00035 public:
00036     WorldView( PlatformCSFinder* platformCSFinder,
00037                 orcaqgui::GuiElementModel* model,
00038                 QWidget* parent=0, 
00039                 orcaqgui::MainWindow* mainWin=0 );
00040     ~WorldView();
00041 
00042     QImage captureMap();
00043 
00044 signals:
00045     void platformFocusChanged( QString& );
00046 
00047 protected:
00048     // from QGLWidget
00049     virtual void initializeGL();
00050     virtual void paintGL();
00051     virtual void resizeGL(int w, int h);
00052     // from QWidget
00053 //    virtual void paintEvent( QPaintEvent* paintEvent );
00054     virtual void mousePressEvent( QMouseEvent* );
00055     virtual void mouseMoveEvent( QMouseEvent* );
00056 //    virtual void mouseReleaseEvent( QMouseEvent* );
00057 //    virtual void mouseDoubleClickEvent( QMouseEvent* );
00058 //    virtual bool event(QEvent *event);
00059 //    virtual QSize sizeHint () const { return QSize( 600,600 ); };
00060 //    virtual QSize minimumSizeHint () const { return QSize( 200,200 ); };
00061     virtual void keyPressEvent(QKeyEvent *e);
00062 //     virtual void focusInEvent(QFocusEvent *fe);
00063 //     virtual void focusOutEvent(QFocusEvent *fe);
00064 
00065 private:
00066 
00067     void paintAllGuiElements( bool isFocusLocalised );
00068     bool transformToFocusPlatformCS();
00069 
00070     PlatformCSFinder *platformCSFinder_;
00071 
00072     // model
00073     orcaqgui::GuiElementModel* model_;
00074     orcaqgui::MainWindow *mainWin_;
00075 
00076     // void reset();
00077 
00078     QPointF         prevMousePt_;
00079     Qt::MouseButton currentButton_;
00080 //    QPointF mouseMovePnt_;
00081     
00082     QPainter *painter_;
00083     
00084     // void renderPointCloud();
00085 //     int screenWidth_;
00086 //     int screenHeight_;
00087     float zoomFactor_;
00088     float xOffset_, yOffset_, zOffset_;
00089     float yaw_, pitch_;
00090     // float fudgeFactor_;
00091     //int displayList; 
00092     bool showOGs_;
00093     bool showSnaps_;
00094     bool showLabels_;
00095     bool showGrids_;
00096     bool showRobots_;
00097     bool showPointclouds_;
00098     bool showPatchBorders_;
00099     float pointSize_;
00100 };
00101 
00102 } // namespace
00103 
00104 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5