Optika  Development
 All Classes Files Functions Variables Typedefs Pages
List of all members
Optika::OptikaGUI Class Reference

A class that allows the user to create and customize their Optika GUI. More...

#include <Optika_GUI.hpp>

Public Member Functions

Constructors
 OptikaGUI (RCP< ParameterList > validParameters, RCP< DependencySheet > dependencySheet=null, void(*customFunc)(RCP< const ParameterList >)=NULL)
 Constructs an OptikaGUI object. More...
 
 OptikaGUI (const std::string &xmlFileName, void(*customFunc)(RCP< const ParameterList >)=NULL)
 Constructs an OptikaGUI object. More...
 
Execution Functions
void exec ()
 Runs the GUI and gets the user input.
 
Getters and Setters
void setAboutInfo (const std::string &aboutInfo)
 Adds the information specified to the about dialog of the GUI. More...
 
void setActionButtonText (const std::string &text)
 Sets the text in the "action" button". More...
 
void setWindowTitle (const std::string &title)
 Sets the title of the GUI window that is displayed to the user. More...
 
void setWindowIcon (const std::string &filePath)
 Sets the window icon to the image specified in the filePath. More...
 
void setStyleSheet (const std::string &filePath)
 Sets the QT style sheet that should be used for the GUI. More...
 
void setCustomFunction (void(*customFunc)(RCP< const ParameterList >))
 Sets the custom function to be used in the GUI. When ever the user clicks the action button, this function will be run. More...
 
std::string getWindowTitle ()
 Gets the window title. More...
 
std::string getWindowIcon ()
 Gets the file path describing the location of the file being used for the window icon. More...
 
std::string getStyleSheet ()
 Gets the file path describing the location of the file being used as the QT Style Sheet. More...
 
std::string getAboutInfo ()
 Gets the information to be added to the about dialog of the GUI. More...
 

Detailed Description

A class that allows the user to create and customize their Optika GUI.

Constructor & Destructor Documentation

Optika::OptikaGUI::OptikaGUI ( RCP< ParameterList >  validParameters,
RCP< DependencySheet >  dependencySheet = null,
void(*)(RCP< const ParameterList >)  customFunc = NULL 
)

Constructs an OptikaGUI object.

Parameters
validParametersA list of parameters from which the users may specify values.
dependencySheetA sheet listing any dependencies between parameters in the validParameters ParameterList.
customFuncA custom function for Optika to run upon the user clicking the action button.
Optika::OptikaGUI::OptikaGUI ( const std::string &  xmlFileName,
void(*)(RCP< const ParameterList >)  customFunc = NULL 
)

Constructs an OptikaGUI object.

Parameters
xmlFileNameName of an XML file describing the GUI.
customFuncA custom function for Optika to run upon the user clicking the action button.

Member Function Documentation

std::string Optika::OptikaGUI::getAboutInfo ( )

Gets the information to be added to the about dialog of the GUI.

Returns
the information to be added to the about dialog of the GUI.
std::string Optika::OptikaGUI::getStyleSheet ( )

Gets the file path describing the location of the file being used as the QT Style Sheet.

Returns
The file path describing the location of the file being used as the QT Style Sheet.
std::string Optika::OptikaGUI::getWindowIcon ( )

Gets the file path describing the location of the file being used for the window icon.

Returns
The file path describing the location of the file being used for the window icon.
std::string Optika::OptikaGUI::getWindowTitle ( )

Gets the window title.

Returns
A string containing the window title.
void Optika::OptikaGUI::setAboutInfo ( const std::string &  aboutInfo)

Adds the information specified to the about dialog of the GUI.

Parameters
aboutInfoInformation to be added to the about dialog of the GUI.
void Optika::OptikaGUI::setActionButtonText ( const std::string &  text)

Sets the text in the "action" button".

Parameters
textThe text for the action button
void Optika::OptikaGUI::setCustomFunction ( void(*)(RCP< const ParameterList >)  customFunc)

Sets the custom function to be used in the GUI. When ever the user clicks the action button, this function will be run.

Parameters
Thecustom function to be run whenever the user clicks the action button.
void Optika::OptikaGUI::setStyleSheet ( const std::string &  filePath)

Sets the QT style sheet that should be used for the GUI.

Parameters
filePathFile path to the QT style sheet to be used for the GUI.
void Optika::OptikaGUI::setWindowIcon ( const std::string &  filePath)

Sets the window icon to the image specified in the filePath.

Parameters
filePathFile path to the image that should be used as the window icon.
void Optika::OptikaGUI::setWindowTitle ( const std::string &  title)

Sets the title of the GUI window that is displayed to the user.

Parameters
titleA string containing what the title of the GUI window should be.

The documentation for this class was generated from the following files: