#include <editwindow.h>
Public Member Functions | |
CSdiEditWindow (IShader *shader, int shaderType) | |
Constructor. | |
bool | maybeSave (void) |
Asks the user to save all modified shaders. | |
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 (const QString &fileName) |
Loads a source code file for the shader type this edit window represents. | |
QString | fileName (void) const |
Returns the file name if the currently opened file. |
An instance of CSdiEditWindow class contains only one text editor. You need a separate window for each shader type!
CSdiEditWindow::CSdiEditWindow | ( | IShader * | shader, | |
int | shaderType | |||
) |
Constructor.
shader | IShader object to qurey state from. Assumes the object is already initialized. | |
shaderType | What shader type should be supported by this window. |
bool CSdiEditWindow::maybeSave | ( | void | ) | [virtual] |
Asks the user to save all modified shaders.
Implements CBaseEditWindow.
void CSdiEditWindow::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 CSdiEditWindow::loadSourceFile | ( | const QString & | fileName | ) |
Loads a source code file for the shader type this edit window represents.
fileName | Source code file name. If this is an emoty string, the default shader source code will be loaded. |
QString CSdiEditWindow::fileName | ( | void | ) | const |
Returns the file name if the currently opened file.
If the current shader is not assigned to a file ( still 'untitled' ), this method returns an emtpty string.