Optika GUI Toolik  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members
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>

Inherits QMainWindow.

Constructors/Destructor

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

Getters and Setters

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

Overridden from QWidget

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

Private Members

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

Private Functions

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

Private Slots

void resetModel ()
 Resets the treemodel to its default state. More...
 
bool saveFileAs ()
 Saves the parameter list settings to a user specified file. More...
 
void saveFile ()
 Saves the current solver to the file the user has already specified. More...
 
void loadFile ()
 Loads a solver the user was previously working on and had saved. More...
 
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. More...
 
void loadRecentDoc ()
 Loads a document from the set of recent documents. More...
 
void showAbout ()
 Shows information about the program. More...
 
void initiateSearch ()
 Starts a search for a parituclar Parameter or ParameterList. More...
 
void doAction ()
 What should happen when the user clicks the action button. More...
 
void doActionNoSave ()
 What should happen when the user clicks the actionNoSave button. More...
 

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 157 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",
const std::string  actionNoSaveButtonText = "" 
)

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 139 of file Optika_metawindow.cpp.

Optika::MetaWindow::~MetaWindow ( )

Deconstructer for the metawindow.

Definition at line 152 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 417 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 421 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 425 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 429 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 156 of file Optika_metawindow.cpp.

static QString Optika::MetaWindow::getSettingsFileName ( )
inlinestaticprivate

Returns the name used to store refernce the settings file.

Definition at line 299 of file Optika_metawindow.hpp.

void Optika::MetaWindow::initilization ( void(*)(RCP< const ParameterList >)  customFunc = 0,
const std::string  actionButtonText = "submit",
const std::string  actionNoSaveButtonText = "" 
)
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 172 of file Optika_metawindow.cpp.

void Optika::MetaWindow::createMenus ( )
private

Creates all the menus for the metawindow.

Definition at line 221 of file Optika_metawindow.cpp.

void Optika::MetaWindow::createActions ( )
private

Creates all necessary actions used in the menut items.

Definition at line 240 of file Optika_metawindow.cpp.

void Optika::MetaWindow::load ( )
private

Loads previous parameter settings.

Definition at line 272 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 281 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 294 of file Optika_metawindow.cpp.

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

Currently under developement.

Definition at line 306 of file Optika_metawindow.cpp.

void Optika::MetaWindow::updateRecentDocsMenu ( )
private

Currently under developement.

Definition at line 314 of file Optika_metawindow.cpp.

static QString Optika::MetaWindow::lastSaveDirSetting ( )
inlinestaticprivate

Gets the name of the last saved directory setting.

Definition at line 354 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::lastLoadDirSetting ( )
inlinestaticprivate

Gets the name of the last load directory setting.

Definition at line 362 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::xresSetting ( )
inlinestaticprivate

Gets the name of the xres setting.

Definition at line 370 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::yresSetting ( )
inlinestaticprivate

Gets the name of the yres setting.

Definition at line 378 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::xposSetting ( )
inlinestaticprivate

Gets the name of the xpos setting.

Definition at line 386 of file Optika_metawindow.hpp.

static QString Optika::MetaWindow::yposSetting ( )
inlinestaticprivate

Gets the name of the ypos setting.

Definition at line 394 of file Optika_metawindow.hpp.

void Optika::MetaWindow::resetModel ( )
privateslot

Resets the treemodel to its default state.

Definition at line 323 of file Optika_metawindow.cpp.

bool Optika::MetaWindow::saveFileAs ( )
privateslot

Saves the parameter list settings to a user specified file.

Definition at line 330 of file Optika_metawindow.cpp.

void Optika::MetaWindow::saveFile ( )
privateslot

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

Definition at line 345 of file Optika_metawindow.cpp.

void Optika::MetaWindow::loadFile ( )
privateslot

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

Definition at line 356 of file Optika_metawindow.cpp.

bool Optika::MetaWindow::saveCurrentUnsavedFile ( )
privateslot

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 363 of file Optika_metawindow.cpp.

void Optika::MetaWindow::loadRecentDoc ( )
privateslot

Loads a document from the set of recent documents.

Definition at line 377 of file Optika_metawindow.cpp.

void Optika::MetaWindow::showAbout ( )
privateslot

Shows information about the program.

Definition at line 392 of file Optika_metawindow.cpp.

void Optika::MetaWindow::initiateSearch ( )
privateslot

Starts a search for a parituclar Parameter or ParameterList.

Definition at line 399 of file Optika_metawindow.cpp.

void Optika::MetaWindow::doAction ( )
privateslot

What should happen when the user clicks the action button.

Definition at line 403 of file Optika_metawindow.cpp.

void Optika::MetaWindow::doActionNoSave ( )
privateslot

What should happen when the user clicks the actionNoSave button.

Definition at line 412 of file Optika_metawindow.cpp.

Member Data Documentation

SearchWidget* Optika::MetaWindow::searchWidget
private

Widgets comprising the MetaWindow.

Definition at line 240 of file Optika_metawindow.hpp.

QAction* Optika::MetaWindow::resetAct
private

Various actions.

Definition at line 243 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::loadAct
private

Definition at line 243 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::saveAct
private

Definition at line 243 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::saveAsAct
private

Definition at line 243 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::quitAct
private

Definition at line 243 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::aboutAct
private

Definition at line 243 of file Optika_metawindow.hpp.

QAction * Optika::MetaWindow::searchAct
private

Definition at line 243 of file Optika_metawindow.hpp.

QMenu* Optika::MetaWindow::fileMenu
private

Various menus.

Definition at line 245 of file Optika_metawindow.hpp.

QMenu * Optika::MetaWindow::recentMenu
private

Definition at line 245 of file Optika_metawindow.hpp.

QMenu * Optika::MetaWindow::helpMenu
private

Definition at line 245 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 250 of file Optika_metawindow.hpp.

QPushButton* Optika::MetaWindow::actionNoSaveButton
private

The button the user pushes that does the does not save.

Definition at line 254 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 259 of file Optika_metawindow.hpp.

QString Optika::MetaWindow::currentLoadDir
private

Load and save directory paths.

Definition at line 264 of file Optika_metawindow.hpp.

QString Optika::MetaWindow::currentSaveDir
private

Definition at line 264 of file Optika_metawindow.hpp.

QStringList Optika::MetaWindow::recentDocsList
private

A list of recently used documents.

Definition at line 269 of file Optika_metawindow.hpp.

TreeView* Optika::MetaWindow::view
private

The TreeView being used in the metawindow.

Definition at line 274 of file Optika_metawindow.hpp.

TreeModel* Optika::MetaWindow::model
private

The TreeModel being used to display the inputs.

Definition at line 279 of file Optika_metawindow.hpp.

Delegate* Optika::MetaWindow::delegate
private

The deleages being used to modify any input values.

Definition at line 284 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 294 of file Optika_metawindow.hpp.


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