orca-robotics INTRODUCTION Overview Download and Install Documentation REPOSITORY Interfaces Drivers Libraries Utilities Software Map DEVELOPER Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
iguielementfactory.h00001 /* 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_IGUIELEMENTFACTORY_H 00012 #define ORCAGUI_IGUIELEMENTFACTORY_H 00013 00014 #include <QColor> 00015 #include <vector> 00016 #include <hydroqguielementutil/ihumanmanager.h> 00017 #include <hydroqguielementutil/mouseeventmanager.h> 00018 #include <hydroqguielementutil/shortcutkeymanager.h> 00019 #include <hydroqgui/guielementset.h> 00020 #include <hydroutil/uncopyable.h> 00021 00022 namespace hydroqgui 00023 { 00024 00025 namespace hydroqguielementutil { 00026 class IGuiElement; 00027 } 00028 00032 00033 // 00034 // Authors: Tobias Kaupp, Alex Brooks, Ben Upcroft 00035 // 00036 class IGuiElementFactory : public hydroutil::Uncopyable 00037 { 00038 public: 00039 00040 virtual ~IGuiElementFactory() {}; 00041 00045 std::vector<QString> supportedElementTypes() const; 00046 00048 std::vector<std::string> supportedElementTypesAsStdString() const; 00049 00053 bool isSupported( const QString &elementType ) const; 00054 00060 virtual bool lookupElementType( const QStringList &ids, QString &elementType ) const = 0; 00061 00069 virtual ::hydroqguielementutil::IGuiElement* create( const QString &elementType, 00070 const QStringList &elementDetails, 00071 QColor suggestedColor, 00072 ::hydroqguielementutil::IHumanManager &humanManager, 00073 ::hydroqguielementutil::MouseEventManager &mouseEventManager, 00074 ::hydroqguielementutil::ShortcutKeyManager &shortcutKeyManager, 00075 const GuiElementSet &guiElementSet ) const = 0; 00076 protected: 00077 00079 void addSupportedType( const QString & elementType ); 00080 00081 00082 private: 00083 std::vector<QString> supportedElementTypes_; 00084 00085 }; 00086 00087 } // namespace 00088 00089 00090 // Function for instantiating plug-in factories. 00091 // A plug-in library must have a function like so: 00092 // extern "C" { 00093 // hydroqgui::IGuiElementFactory *createFactory(); 00094 // } 00095 typedef hydroqgui::IGuiElementFactory *FactoryMakerFunc(); 00096 00097 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)