editor.h

Go to the documentation of this file.
00001 //=============================================================================
00016 #ifndef __EDITOR_H_INCLUDED__
00017 #define __EDITOR_H_INCLUDED__
00018 
00019 #include <QtCore/QObject>
00020 #include <QtCore/QPoint>
00021 
00022 
00023 // forward declarations
00024 class IShader;
00025 class CBaseEditWindow;
00026 
00027 
00028 //=============================================================================
00029 //  CEditor
00030 //=============================================================================
00031 
00040 class CEditor : public QObject
00041 {
00042     Q_OBJECT
00043 public:
00047     CEditor( IShader* shader );
00048     virtual ~CEditor( void ); 
00049 
00054     void init( const QPoint & position );
00055 
00058     void shutdown( void );
00059 
00065     bool maybeSave( void );
00066 
00067 signals:
00073     void linkProgram( void );
00074 
00078     void deactivateProgram( void );
00079 
00082     void aboutToQuit( void ); // the editor is ready to quit the app.
00083 
00084 private slots:;
00085 
00086     // these are forwarded from the editor windows
00087     void link();
00088     void shouldDeactivateProgram( void );
00089     void gotQuitSignal( void );
00090 
00091     // switching between SDI and MDI windows.
00092     void switchToSDI( void );
00093     void switchToMDI( void );
00094 
00095 private:
00096 
00097     // changing the editor window
00098     void createMdiWindow( const QPoint & position, bool loadStdSource );
00099     void createSdiWindow( const QPoint & position, bool loadStdSource );
00100     void destroyEditWindow( void );
00101     void setupSignals( void );
00102 
00103     // the shader object
00104     IShader* m_shader;
00105 
00106     // Wether the editor is in MDI mode.
00107     // The initial state is true.
00108     bool m_isMDI;
00109 
00110     // Ihere is a single window for every shader type.
00111     // If the editor is in single-window mode, 
00112     // then only m_editWindows[0] is used, the others are NULL.
00113     CBaseEditWindow** m_editWindows; // [ IShader::MAX_SHADER_TYPES ]
00114 };
00115 
00116 #endif // __EDITOR_H_INCLUDED__
00117 

Generated on Sun Mar 2 17:12:31 2008 for Shader Maker by  doxygen 1.5.4