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

 

         

pathplanneruserinteraction.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 PATHPLANNER_HI_H
00012 #define PATHPLANNER_HI_H
00013 
00014 #include <memory>
00015 #include <QObject>
00016 #include <orcaice/context.h>
00017 #include <hydroqguipath/pathdesignscreen.h>
00018 #include <hydroqguipath/pathplannerbuttons.h>
00019 #include <hydroqguipath/ipathinput.h>
00020 #include <orcaqgui2dfactory/pathplannerinput.h>
00021     
00022 namespace hydroqgui {
00023     class GuiElementSet;
00024 }
00025 
00026 namespace hydroqguielementutil {
00027     class MouseEventManager;
00028     class IHumanManager;
00029     class ShortcutKeyManager;
00030 }
00031 
00032 namespace orcaqgui2d {
00033 
00034 class PathPlanner2dElement;
00035 class PathPainter;
00036 
00042 class PathPlannerUserInteraction  : public QObject, 
00043                                     public hydroqguipath::IPathUserInteraction
00044 {
00045     Q_OBJECT
00046 
00047 public:
00048     PathPlannerUserInteraction( PathPlanner2dElement                    *ppElement,
00049                                 const std::string                       &proxyString,
00050                                 hydroqguielementutil::IHumanManager     &humanManager,
00051                                 hydroqguielementutil::MouseEventManager &mouseEventManager,
00052                                 PathPainter                             &painter,
00053                                 const orcaice::Context                  &context );
00054 
00055     void noLongerMouseEventReceiver();
00056     void paint( QPainter *p );
00057     void setFocus( bool inFocus );
00058     void setUseTransparency( bool useTransparency ); 
00059 
00060     void mousePressEvent(QMouseEvent *e) 
00061         {pathInput_->processPressEvent(e);}
00062     
00063     void mouseMoveEvent(QMouseEvent *e) 
00064         {pathInput_->processMoveEvent(e);}
00065     
00066     void mouseReleaseEvent(QMouseEvent *e) 
00067         {pathInput_->processReleaseEvent(e);}
00068     
00069     void mouseDoubleClickEvent(QMouseEvent *e) 
00070         {pathInput_->processDoubleClickEvent(e);}
00071 
00072 public slots:
00073     void savePathAs();
00074     void savePath();
00075     void waypointSettingsDialog();
00076     void waypointModeSelected();
00077     void send();
00078     void cancel();
00079 
00080 private:
00081 
00082     PathPlanner2dElement *ppElement_;
00083     std::string proxyString_;
00084     hydroqguielementutil::IHumanManager &humanManager_;
00085     hydroqguielementutil::MouseEventManager &mouseEventManager_;
00086     PathPainter &painter_;
00087     orcaice::Context context_;
00088     hydroqguipath::WaypointSettings wpSettings_;
00089 
00090     // saving the path which the pathplanner *interface* holds
00091     // (as opposed to the path the user enters in green)
00092     QString ifacePathFileName_;
00093     bool haveIfacePathFileName_;
00094     std::auto_ptr<PathFileHandler> ifacePathFileHandler_;
00095 
00096     // handles all user input through clicking, tables, etc.
00097     std::auto_ptr<PathPlannerInput> pathInput_;
00098     // sets up and destroys buttons and associated actions
00099     std::auto_ptr<hydroqguipath::PathplannerButtons> buttons_;
00100     
00101     // Do we own the global mode?
00102     bool gotMode_;
00103     
00104     bool useTransparency_;
00105 };
00106 
00107 }
00108 
00109 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5