#include <editwindow.h>
Public Member Functions | |
CMdiEditWindow (IShader *shader) | |
Constructor. | |
bool | maybeSave (void) |
Destructor. | |
void | loadInitialShaderSource (void) |
Loads the initial shader sources into the editor. | |
void | uploadShaderSource (IShader *shader) |
Uploads the source code to an IShader object. | |
void | loadSourceFile (int shaderType, const QString &fileName) |
Loads a source code file for a given shader type. | |
QString | fileName (int shaderType) |
Returns the file name for a shader type. |
Contains the editors for all shader types in a single window. Yout need only a single instance to deal with all shader types.
CMdiEditWindow::CMdiEditWindow | ( | IShader * | shader | ) |
Constructor.
shader | IShader object to qurey state from. Assumes the object is already initialized. |
void CMdiEditWindow::uploadShaderSource | ( | IShader * | shader | ) | [virtual] |
Uploads the source code to an IShader object.
shader | IShader object where the source code should be stored. |
Implements CBaseEditWindow.
void CMdiEditWindow::loadSourceFile | ( | int | shaderType, | |
const QString & | fileName | |||
) |
Loads a source code file for a given shader type.
shaderType | Specifies the editor, which shuld load the source code. | |
fileName | Source code file name. If this is an emoty string, the default shader source code will be loaded. |
QString CMdiEditWindow::fileName | ( | int | shaderType | ) |
Returns the file name for a shader type.
It returns form the file name from the CSourceEdit widget responsible for the given shader type.
shaderType | Shader type where to request the name. |