CBaseEditWindow Class Reference

Editor main window base class. More...

#include <editwindow.h>

Inheritance diagram for CBaseEditWindow:

CMdiEditWindow CSdiEditWindow

List of all members.

Signals

void linkProgram (void)
 The user requested to compile and link the current shader.
void deactivateProgram (void)
 The current shader should be deactivated.
void aboutToQuit (void)
 Tells the application that the user wants to quit the application.
void requestSdiMode (void)
 Requests to switch to SDI mode.
void requestMdiMode (void)
 Requests to switch to MDI mode.

Public Member Functions

 CBaseEditWindow (void)
 Constructor.
virtual ~CBaseEditWindow (void)
 Destructor.
virtual bool maybeSave (void)=0
 Asks the user to save all modified shaders.
virtual void loadInitialShaderSource (void)=0
 Loads the initial shader sources into the editor.
virtual void uploadShaderSource (IShader *shader)=0
 Uploads the source code to an IShader object.

Protected Member Functions

virtual CSourceEditactiveDocument (void)=0
 Returns the active document in the window.
virtual void createActions (IShader *shader)
 Creates the QAction objects used in this class.
virtual void createMenus (IShader *shader)
 Creates the QMenu objects used in the class.
void updateWindowTitle (void)
 Updates the window title.

Protected Attributes

QPushButton * m_btnLink
 The 'Compile and Link' button.
QCheckBox * m_chkAttach
 The 'Attach to Shader' check box.
QMenu * m_menuFile
 The 'File' menu.
QMenu * m_menuEdit
 The 'Edit' menu.
QMenu * m_menuShader
 The 'Shader' menu.
QMenu * m_menuView
 The 'View' menu.
QMenu * m_menuHelp
 The '?' menu.


Detailed Description

Editor main window base class.

The different editor main window classes are derived from this class. This calss is designed to derive editor windows that allow SDI and MDI source code editing.


Member Function Documentation

virtual bool CBaseEditWindow::maybeSave ( void   )  [pure virtual]

Asks the user to save all modified shaders.

Returns:
True, if the calling operation can safely continue (no data is lost). False, if the calling operation should be canceled.

Implemented in CSdiEditWindow, and CMdiEditWindow.

virtual void CBaseEditWindow::uploadShaderSource ( IShader shader  )  [pure virtual]

Uploads the source code to an IShader object.

Parameters:
shader IShader object where the source code should be stored.

Implemented in CSdiEditWindow, and CMdiEditWindow.

void CBaseEditWindow::deactivateProgram ( void   )  [signal]

The current shader should be deactivated.

This happens, when the user opens an existing or creates a new shader.

void CBaseEditWindow::aboutToQuit ( void   )  [signal]

Tells the application that the user wants to quit the application.

Warning:
The reciever should call maybeSave() to avoid loss of data!

virtual CSourceEdit* CBaseEditWindow::activeDocument ( void   )  [protected, pure virtual]

Returns the active document in the window.

This method can be used to create MDI emulation functionality.

Returns:
The active source code editor.

void CBaseEditWindow::createActions ( IShader shader  )  [protected, virtual]

Creates the QAction objects used in this class.

Must be called explicitly in the constructor of the derived class.

Parameters:
shader IShader object to read state from.

void CBaseEditWindow::createMenus ( IShader shader  )  [protected, virtual]

Creates the QMenu objects used in the class.

Must be called explicitly in the constructor of the derived class.

Precondition:
Assumes that createActions() has already been called.
Parameters:
shader IShader object to read state from.

void CBaseEditWindow::updateWindowTitle ( void   )  [protected]

Updates the window title.

It ready the active document's file name and constructs a title string.


The documentation for this class was generated from the following files:
Generated on Sun Mar 2 17:12:32 2008 for Shader Maker by  doxygen 1.5.4