- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# plugin.h

Go to the documentation of this file.

    00001
    00002 //**************************************************************************/
    00003 // Copyright (c) 2008 Autodesk, Inc.
    00004 // All rights reserved.
    00005 //
    00006 // Use of this software is subject to the terms of the Autodesk license
    00007 // agreement provided at the time of installation or download, or which
    00008 // otherwise accompanies this software in either electronic or hard copy form.
    00009 //
    00010 //**************************************************************************/
    00011 // DESCRIPTION:
    00012 // CREATED: October 2008
    00013 //**************************************************************************/
    00014
    00015 namespace mudbox {
    00016
    00029 struct MBDLL_DECL Plugin
    00030 {
    00031     typedef void initializer( void );
    00032
    00034     Plugin( void ) {};
    00035
    00037     Plugin( const QString &sName, const QString &sDescription, const QString &sAuthor, const QString &sURL, const QString &sCompileTime, initializer *fFunc = 0 );
    00038
    00040     static void SetVersion( const QString& sName, const QString &sVersion );
    00041
    00042     QString m_sName;
    00043     QString m_sDescription;
    00044     QString m_sAuthor;
    00045     QString m_sURL;
    00046     QString m_sCompileTime;
    00047     QString m_sPluginFolder;
    00048     initializer *m_pInitializer;
    00049     QString m_sVersion;
    00050 };
    00051
    00056 class MBDLL_DECL WindowPlugin : public QObject
    00057 {
    00058 public:
    00060     virtual void Start() = 0;
    00061
    00063     virtual void Stop() = 0;
    00064
    00066     virtual bool IsEnabled() = 0;
    00067
    00069     virtual QWidget* CreateWidget(QWidget *parent, QString name) = 0;
    00070
    00072     virtual QWidget* Widget() = 0;
    00073
    00075     virtual QString Name();
    00076
    00078     virtual QString Title();
    00079
    00081     virtual bool AddToWindowMenu();
    00082
    00083 protected:
    00084     QString m_name;
    00085     QString m_title;
    00086     bool    m_addToWindowMenu;
    00087 };
    00088
    00093 class MBDLL_DECL WebBrowserPlugin : public WindowPlugin
    00094 {
    00095 public:
    00096     WebBrowserPlugin(const QString name, const QString title);
    00097
    00099     typedef enum
    00100     {
    00101         eNavNone = 0,
    00102         eNavMudLife,
    00103         eNavTutorials,
    00104         eNavMeshUpload,
    00105         eNavStampUpload,
    00106         eNavStencilUpload,
    00107     } NavigationPoints;
    00108
    00110     typedef enum
    00111     {
    00112         eFileTypeStamps,
    00113         eFileTypeStencils,
    00114         eFileTypeMeshes,
    00115     } FileType;
    00116
    00118     virtual void Navigate(const NavigationPoints nav) = 0;
    00119
    00121     virtual void Upload(const QStringList &files, const FileType fileType) = 0;
    00122
    00124     virtual void GetFileList(const FileType fileType, QFileInfoList &fileList, QString filter = "") = 0;
    00125 };
    00126
    00127 }; // end of namespace mudbox