Optika GUI Toolik Version of the Day
Optika::MetaWindow Class Reference

The Main Window that contains all other widgets in the Optika GUI. For all undocumented functions please refer to the Qt API. More...

#include <Optika_metawindow.hpp>

List of all members.

Constructors/Destructor

 MetaWindow (RCP< ParameterList > validParameters, RCP< DependencySheet > dependencySheet=null, void(*customFunc)(RCP< const ParameterList >)=NULL, QString fileName=QString(), const std::string actionButtonText="submit")
 Constructs a MainWindow object.
 ~MetaWindow ()
 Deconstructer for the metawindow.

Getters and Setters

void setAboutInfo (QString aboutInfo)
 Adds the information specified to the about dialog of the GUI.
QString getAboutInfo ()
 Gets the information to be added to the about dialog of the GUI.
void setActionButtonText (QString newText)
 Sets the action button text.
QString getActionButtonText ()
 Gets the text being displayed int he action button.

Overridden from QWidget

void closeEvent (QCloseEvent *event)
 Handles any QCloseEvents for the metawindow.

Private Members

SearchWidgetsearchWidget
 Widgets comprising the MetaWindow.
QAction * resetAct
 Various actions.
QAction * loadAct
QAction * saveAct
QAction * saveAsAct
QAction * quitAct
QAction * aboutAct
QAction * searchAct
QMenu * fileMenu
 Various menus.
QMenu * recentMenu
QMenu * helpMenu
QPushButton * actionButton
 The button the user pushes that either closes the MetaWindow or runs the custom function.
QString aboutInfo
 Any additional about information that should be displayed in the about dialog.
QString currentLoadDir
 Load and save directory paths.
QString currentSaveDir
QStringList recentDocsList
 A list of recently used documents.
TreeViewview
 The TreeView being used in the metawindow.
TreeModelmodel
 The TreeModel being used to display the inputs.
Delegatedelegate
 The deleages being used to modify any input values.

Private Functions

void(* customFunc )(RCP< const ParameterList >)
 The custom function to run when the user clicks the action button.
static QString getSettingsFileName ()
 Returns the name used to store refernce the settings file.
static QString lastSaveDirSetting ()
 Gets the name of the last saved directory setting.
static QString lastLoadDirSetting ()
 Gets the name of the last load directory setting.
static QString xresSetting ()
 Gets the name of the xres setting.
static QString yresSetting ()
 Gets the name of the yres setting.
static QString xposSetting ()
 Gets the name of the xpos setting.
static QString yposSetting ()
 Gets the name of the ypos setting.
void initilization (void(*customFunc)(RCP< const ParameterList >)=0, const std::string actionButtonText="submit")
 Common initialization shared by all constructors.
void createMenus ()
 Creates all the menus for the metawindow.
void createActions ()
 Creates all necessary actions used in the menut items.
void load ()
 Loads previous parameter settings.
void loadLastSettings ()
 Loads the last state of the MetaWindow (things like window size and screen position).
void saveSettings ()
 Saves the state of the MetaWindow (things like window size and screen position).
void addRecentDocument (QString recentDocument)
 Currently under developement.
void updateRecentDocsMenu ()
 Currently under developement.

Private Slots

void resetModel ()
 Resets the treemodel to its default state.
bool saveFileAs ()
 Saves the parameter list settings to a user specified file.
void saveFile ()
 Saves the current solver to the file the user has already specified.
void loadFile ()
 Loads a solver the user was previously working on and had saved.
bool saveCurrentUnsavedFile ()
 Asks the user whether or not they would like to currently save the file they are working on. Should be used when the user has modified the file and is about to perform an action that would cause those modifiation to be lost.
void loadRecentDoc ()
 Loads a document from the set of recent documents.
void showAbout ()
 Shows information about the program.
void initiateSearch ()
 Starts a search for a parituclar Parameter or ParameterList.
void doAction ()
 What should happen when the user clicks the action button.

Detailed Description

The Main Window that contains all other widgets in the Optika GUI. For all undocumented functions please refer to the Qt API.

Definition at line 144 of file Optika_metawindow.hpp.


Constructor & Destructor Documentation

Optika::MetaWindow::MetaWindow ( RCP< ParameterList validParameters,
RCP< DependencySheet dependencySheet = null,
void(*)(RCP< const ParameterList >)  customFunc = NULL,
QString  fileName = QString(),
const std::string  actionButtonText = "submit" 
)

Constructs a MainWindow object.

Parameters:
validParametersThe Parameter List the metawindow will display and the user will edit.
dependencySheetA sheet listing any dependencies between parameters in the validParameters ParameterList.
customFuncThe function to run whenever the user clicks the action button.
fileNameThe name of a save file that may store previous values used by a user for the Parameter List specified by validParameters.

Definition at line 126 of file Optika_metawindow.cpp.

Optika::MetaWindow::~MetaWindow ( )

Deconstructer for the metawindow.

Definition at line 138 of file Optika_metawindow.cpp.


Member Function Documentation

void Optika::MetaWindow::setAboutInfo ( QString  aboutInfo)

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

Parameters:
aboutInfoInformation to be added to the about dialog of the GUI.

Definition at line 387 of file Optika_metawindow.cpp.

QString Optika::MetaWindow::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.

Definition at line 391 of file Optika_metawindow.cpp.

void Optika::MetaWindow::setActionButtonText ( QString  newText)

Sets the action button text.

Parameters:
textThe text to put in the action button.

Definition at line 395 of file Optika_metawindow.cpp.

QString Optika::MetaWindow::getActionButtonText ( )

Gets the text being displayed int he action button.

Returns:
The text being displayed in the action button.

Definition at line 399 of file Optika_metawindow.cpp.

void Optika::MetaWindow::closeEvent ( QCloseEvent *  event) [protected]

Handles any QCloseEvents for the metawindow.

Parameters:
eventThe QCloseEvent that was issued.

Definition at line 142 of file Optika_metawindow.cpp.

static QString Optika::MetaWindow::getSettingsFileName ( ) [inline, static, private]

Returns the name used to store refernce the settings file.

Definition at line 281 of file Optika_metawindow.hpp.

void Optika::MetaWindow::initilization ( void(*)(RCP< const ParameterList >)  customFunc = 0,
const std::string  actionButtonText = "submit" 
) [private]

Common initialization shared by all constructors.

Parameters:
customFuncThe function to run whenever the user clicks the action button.
actionButtonTextText to be placed in the action button.

Definition at line 158 of file Optika_metawindow.cpp.

void Optika::MetaWindow::createMenus ( ) [private]

Creates all the menus for the metawindow.

Definition at line 196 of file Optika_metawindow.cpp.

void Optika::MetaWindow::createActions ( ) [private]

Creates all necessary actions used in the menut items.

Definition at line 215 of file Optika_metawindow.cpp.

void Optika::MetaWindow::load ( ) [private]

Loads previous parameter settings.

Definition at line 247 of file Optika_metawindow.cpp.

void Optika::MetaWindow::loadLastSettings ( ) [private]

Loads the last state of the MetaWindow (things like window size and screen position).

Definition at line 256 of file Optika_metawindow.cpp.

void Optika::MetaWindow::saveSettings ( ) [private]

Saves the state of the MetaWindow (things like window size and screen position).

Definition at line 269 of file Optika_metawindow.cpp.

void Optika::MetaWindow::addRecentDocument ( QString  recentDocument) [private]

Currently under developement.

Definition at line 281 of file Optika_metawindow.cpp.

void Optika::MetaWindow::updateRecentDocsMenu ( ) [private]

Currently under developement.

Definition at line 289 of file Optika_metawindow.cpp.

static QString Optika::MetaWindow::lastSaveDirSetting ( ) [inline, static, private]

Gets the name of the last saved directory setting.

Definition at line 335 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::lastLoadDirSetting ( ) [inline, static, private]

Gets the name of the last load directory setting.

Definition at line 343 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::xresSetting ( ) [inline, static, private]

Gets the name of the xres setting.

Definition at line 351 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::yresSetting ( ) [inline, static, private]

Gets the name of the yres setting.

Definition at line 359 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::xposSetting ( ) [inline, static, private]

Gets the name of the xpos setting.

Definition at line 367 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::yposSetting ( ) [inline, static, private]

Gets the name of the ypos setting.

Definition at line 375 of file Optika_metawindow.hpp.

void Optika::MetaWindow::resetModel ( ) [private, slot]

Resets the treemodel to its default state.

Definition at line 298 of file Optika_metawindow.cpp.

bool Optika::MetaWindow::saveFileAs ( ) [private, slot]

Saves the parameter list settings to a user specified file.

Definition at line 305 of file Optika_metawindow.cpp.

void Optika::MetaWindow::saveFile ( ) [private, slot]

Saves the current solver to the file the user has already specified.

Definition at line 320 of file Optika_metawindow.cpp.

void Optika::MetaWindow::loadFile ( ) [private, slot]

Loads a solver the user was previously working on and had saved.

Definition at line 331 of file Optika_metawindow.cpp.

bool Optika::MetaWindow::saveCurrentUnsavedFile ( ) [private, slot]

Asks the user whether or not they would like to currently save the file they are working on. Should be used when the user has modified the file and is about to perform an action that would cause those modifiation to be lost.

Definition at line 338 of file Optika_metawindow.cpp.

void Optika::MetaWindow::loadRecentDoc ( ) [private, slot]

Loads a document from the set of recent documents.

Definition at line 352 of file Optika_metawindow.cpp.

void Optika::MetaWindow::showAbout ( ) [private, slot]

Shows information about the program.

Definition at line 367 of file Optika_metawindow.cpp.

void Optika::MetaWindow::initiateSearch ( ) [private, slot]

Starts a search for a parituclar Parameter or ParameterList.

Definition at line 374 of file Optika_metawindow.cpp.

void Optika::MetaWindow::doAction ( ) [private, slot]

What should happen when the user clicks the action button.

Definition at line 378 of file Optika_metawindow.cpp.


Member Data Documentation

Widgets comprising the MetaWindow.

Definition at line 226 of file Optika_metawindow.hpp.

QAction* Optika::MetaWindow::resetAct [private]

Various actions.

Definition at line 229 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::loadAct [private]

Definition at line 229 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::saveAct [private]

Definition at line 229 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::saveAsAct [private]

Definition at line 229 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::quitAct [private]

Definition at line 229 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::aboutAct [private]

Definition at line 229 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::searchAct [private]

Definition at line 229 of file Optika_metawindow.hpp.

QMenu* Optika::MetaWindow::fileMenu [private]

Various menus.

Definition at line 231 of file Optika_metawindow.hpp.

QMenu * Optika::MetaWindow::recentMenu [private]

Definition at line 231 of file Optika_metawindow.hpp.

QMenu * Optika::MetaWindow::helpMenu [private]

Definition at line 231 of file Optika_metawindow.hpp.

QPushButton* Optika::MetaWindow::actionButton [private]

The button the user pushes that either closes the MetaWindow or runs the custom function.

Definition at line 236 of file Optika_metawindow.hpp.

QString Optika::MetaWindow::aboutInfo [private]

Any additional about information that should be displayed in the about dialog.

Definition at line 241 of file Optika_metawindow.hpp.

Load and save directory paths.

Definition at line 246 of file Optika_metawindow.hpp.

Definition at line 246 of file Optika_metawindow.hpp.

QStringList Optika::MetaWindow::recentDocsList [private]

A list of recently used documents.

Definition at line 251 of file Optika_metawindow.hpp.

The TreeView being used in the metawindow.

Definition at line 256 of file Optika_metawindow.hpp.

The TreeModel being used to display the inputs.

Definition at line 261 of file Optika_metawindow.hpp.

The deleages being used to modify any input values.

Definition at line 266 of file Optika_metawindow.hpp.

void(* Optika::MetaWindow::customFunc)(RCP< const ParameterList >) [private]

The custom function to run when the user clicks the action button.

Definition at line 276 of file Optika_metawindow.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines