orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

iguielement.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 HYDRO_HYDROQGUI_IGUI_ELEMENT_H
00012 #define HYDRO_HYDROQGUI_IGUI_ELEMENT_H
00013 
00014 #include <string>
00015 #include <assert.h>
00016 #include <QString>
00017 #include <QColor>
00018 #include <QPointF>
00019 #include <QMouseEvent>
00020 #include <hydroutil/uncopyable.h>
00021 
00022 namespace hydroqguielementutil
00023 {
00024        
00033 class IGuiElement : public hydroutil::Uncopyable
00034 {                                 
00035 public:
00036     
00037     IGuiElement() : platform_(""),
00038                    details_(""),
00039                    type_("")
00040                    {};
00041     
00042     virtual ~IGuiElement() {};
00043 
00046     virtual bool isInGlobalCS()=0;
00047 
00049     virtual void update () {};
00050 
00053     virtual QStringList contextMenu() { return QStringList(); };
00054     
00057     virtual void execute( int action ) {};
00058     
00062     virtual void setColor( QColor color ) {};
00063 
00067     virtual void setFocus( bool inFocus ) {};
00068     
00071     virtual void noLongerMouseEventReceiver() {assert(false&&"unimplemented noLongerMouseEventReceiver");}
00072 
00073     virtual void mousePressEvent(QMouseEvent *e) {assert(false&&"unimplemented mouse function");}
00074     virtual void mouseMoveEvent(QMouseEvent *e) {assert(false&&"unimplemented mouse function");}
00075     virtual void mouseReleaseEvent(QMouseEvent *e) {assert(false&&"unimplemented mouse function");}
00076     virtual void mouseDoubleClickEvent(QMouseEvent *e) {assert(false&&"unimplemented mouse function");} 
00077     
00079     virtual void setUseTransparency( bool useTransparency ) {};
00080     
00082     QString platform() { return platform_; };
00083     void setPlatform( QString platform ) { platform_ = platform; };
00084     
00086     QString details() { return details_; };
00087     void setDetails( QString details ) { details_ = details; };
00088     
00090     QString type() { return type_; };
00091     void setName( QString type ) { type_ = type; };
00092     
00094     virtual bool isPermanentElement() const { return false; }
00095     
00097     virtual void paint( QPainter *p, int z )=0;
00098 
00099 
00100 private:
00101     QString platform_;
00102     QString details_;
00103     QString type_;
00104     
00105 };
00106 
00107 } // namespace
00108 
00109 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5