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

 

         

orcaqgui2dfactory/gridelement.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, Ben Upcroft
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 ORCAGUI_GRIDELEMENT_H
00012 #define ORCAGUI_GRIDELEMENT_H
00013 
00014 #include <hydroqguielementutil/definitions2d.h>
00015 #include <hydroqguielementutil/guielement2d.h>
00016 
00017 namespace orcaqgui2d
00018 {
00019 
00024 class GridElement : public hydroqguielementutil::GuiElement2d
00025 {
00026 public:
00027 
00028         GridElement();
00029         
00030     virtual bool isInGlobalCS() { return true; }
00031     
00032         virtual void paint( QPainter *p, int z );
00033     virtual bool paintThisLayer(int z) const { return z==hydroqguielementutil::Z_GRID || z==hydroqguielementutil::Z_ORIGIN; }
00034 
00035     virtual QStringList contextMenu();
00036     
00037     virtual void execute( int action );
00038 
00039     void setDisplayGrid( bool display ) { isDisplayGrid_ = display; }
00040     void setDisplayOrigin( bool display ) { isDisplayOrigin_ = display; }
00041     void setDisplayLabels( bool display ) { isDisplayLabels_ = display; }
00042 
00043 protected:
00044 
00045     virtual bool isPermanentElement() const { return true; }
00046     
00047 private:
00048         
00049     // Distance between grid lines [m]
00050         double step_;
00051     
00052     bool isDisplayGrid_;
00053     bool isDisplayOrigin_;
00054     bool isDisplayLabels_;
00055     
00056 };
00057 
00058 } // namespace
00059 
00060 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5