INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
orcaqgui2dfactory/gridelement.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 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 class QSplitter; 00018 00019 namespace orcaqgui2d 00020 { 00021 00026 class GridElement : public hydroqguielementutil::GuiElement2d 00027 { 00028 public: 00029 00030 GridElement( const hydroqguielementutil::GuiElementInfo &guiElementInfo ); 00031 00032 virtual bool isInGlobalCS() { return true; } 00033 00034 virtual void paint( QPainter *p, int z ); 00035 virtual bool paintThisLayer(int z) const { return z==hydroqguielementutil::Z_GRID || z==hydroqguielementutil::Z_ORIGIN; } 00036 00037 virtual QStringList contextMenu(); 00038 00039 virtual void execute( int action ); 00040 00041 void setDisplayGrid( bool display ) { isDisplayGrid_ = display; } 00042 void setDisplayOrigin( bool display ) { isDisplayOrigin_ = display; } 00043 void setDisplayLabels( bool display ) { isDisplayLabels_ = display; } 00044 00045 protected: 00046 00047 virtual bool isPermanentElement() const { return true; } 00048 00049 private: 00050 00051 // Distance between grid lines [m] 00052 double step_; 00053 00054 bool isDisplayGrid_; 00055 bool isDisplayOrigin_; 00056 bool isDisplayLabels_; 00057 00058 }; 00059 00060 } // namespace 00061 00062 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)