MainWindow Class Reference

Window class for main window. More...

List of all members.

Public Member Functions

 MainWindow (QWidget *parent=0)
 ~MainWindow ()

Protected Member Functions

void changeEvent (QEvent *e)

Private Slots

void on_checkBoxRegimeUseMinimumHoldup_clicked ()
void on_actionSource_code_documentation_triggered ()
void on_actionAbout_MultiPhasePlot_triggered ()
void on_actionExit_triggered ()
void on_actionWhats_this_triggered ()
void on_pushButtonRemoveSelectedFlow_clicked ()
void on_pushButtonRemoveSelectedRegime_clicked ()
void on_pushButtonFlowMoreInfo_clicked ()
void on_pushButtonRegimeMoreInfo_clicked ()
void on_pushButtonLoadSimulationParametersFlow_clicked ()
void on_pushButtonLoadSimulationParametersRegime_clicked ()
void on_simulationFlowItemSelectionModel_selectionChanged (QItemSelection, QItemSelection)
void on_simulationRegimeItemSelectionModel_selectionChanged (QItemSelection, QItemSelection)
void on_checkBoxIncludeOldSimulationsFlow_clicked ()
void on_checkBoxIncludeOldSimulationsRegime_clicked ()
void on_pushButtonPlotSimulations_clicked ()
void on_pushButtonPlotSimulationsRegime_clicked ()
void on_pushButtonSimulateFlow_clicked ()
void on_radioButtonVariable_clicked ()
void on_flowSimulation_progressed (int percent)
void on_flowSimulation_finished ()
void on_pushButtonStopSimulationFlow_clicked ()
void on_flowSimulation_terminated ()
void on_pushButtonSimulateRegime_clicked ()
void on_pushButtonClearSelectionFlow_clicked ()
void on_pushButtonClearSelectionRegime_clicked ()
void on_pushButtonDeleteLiquidPredefines_clicked ()
void on_pushButtonDeleteGasPredefines_clicked ()
void on_pushButtonLoadLiquidPredefines_clicked ()
void on_pushButtonSaveLiquidPredefine_clicked ()
void on_pushButtonLoadGasPredefines_clicked ()
void on_pushButtonSaveGasPredefine_clicked ()
void on_regimeSimulation_finished ()
void on_regimeSimulation_progressed (int asdf)
void on_pushButtonStopSimulationRegime_clicked ()
void on_regimeSimulation_terminated ()
void on_simulationError (QString)

Private Member Functions

void addPluginComboBoxItems ()
void addPredefinesComboBoxItems (flowtype_t flowType, bool newItem=false, QString focusComboBoxName="")
void addRegimeCheckBoxes ()
void loadWidgetValues ()
void saveWidgetValues ()
void saveGasDefinition (QString definitionName)
void saveLiquidDefinition (QString definitionName)
void enableDisableSimulationListButtons (simulationtype_t simulationType)
void plotSelectedSimulations (simulationtype_t simulationType)
void showSimulationListInformation (simulationtype_t simulationType)
void removeSelectedItemsFromList (simulationtype_t simulationType)
void loadSimulationListParameters (simulationtype_t simulationType)
void addRemoveOldItemsSimulationList (simulationtype_t simulationType)
void getWidgetValues (Data *data)
void setWidgetValues (const Data *data)
void saveGasDefinition (QString name, QString density, QString viscosity, QString temperature, QString pressure, QString densityMin="", QString viscosityMin="", QString temperatureMin="", QString pressureMin="", QString densityMax="", QString viscosityMax="", QString temperatureMax="", QString pressureMax="")
void saveLiquidDefinition (QString name, QString density, QString viscosity, QString densityMin="", QString viscosityMin="", QString densityMax="", QString viscosityMax="")
bool isInputValid (simulationtype_t simulationType)
void firstRunSetup ()
regimetype_t getRegimeType ()
scale_t getScaleType ()
FrictionFunctionsgetSelectedFrictionPlugins (std::vector< FrictionInterface * > frictionPlugins, std::vector< InterfaceFrictionInterface * > interfaceFrictionPlugins, std::vector< SlipRelationInterface * > slipRelationFrictionPlugins)
CalculateFunctionsgetSelectedCalculatePlugins (std::vector< CalculateRegimeInterface * > calculatePlugins)

Private Attributes

Ui::MainWindow * ui
Ui::ListFrame * uiRegimeListFrame
Ui::ListFrame * uiFlowListFrame
CalculateManagercm
QErrorMessage * errorMessage
QSplitter * regimeSplitter
QSplitter * flowSplitter
QTabWidget * tabWidgetFlow
XYPlotArearegimePlot
XYPlotAreaholdupPlot
XYPlotAreapressurePlot
XYPlotAreaalphaPlot
XYPlotAreadiameterPlot
QStandardItemModel * simulationsFlowModel
QStandardItemModel * simulationsRegimeModel
QItemSelectionModel * simulationFlowItemSelectionModel
QItemSelectionModel * simulationRegimeItemSelectionModel
std::vector< FrictionInterface * > frictionInterfacePlugins
std::vector
< InterfaceFrictionInterface * > 
interfaceFrictionInterfacePlugins
std::vector
< SlipRelationInterface * > 
slipRelationInterfacePlugins
std::vector
< RegimeTransitionInterface * > 
regimeInterfacePlugins
std::vector
< CalculateRegimeInterface * > 
calculateInterfacePlugins
std::vector< QRadioButton * > _radioButtonsVariable
std::vector< double > _variableScaler
std::vector< QLineEdit * > _lineEdits
std::vector< QLineEdit * > _lineEditsMin
std::vector< QLineEdit * > _lineEditsMax
std::vector< QLineEdit * > _lineEditsAll
std::vector< QCheckBox * > _regimeCheckBoxes
std::vector< CalculateManager * > _regimeCalculationManagers
QStringList _settingNamesLineEdits
QStringList _settingNamesLineEditsMin
QStringList _settingNamesLineEditsMax
QStringList _settingNamesLineEditsAll
QStringList _settingDefaultsLineEdits
QStringList _settingDefaultsLineEditsMin
QStringList _settingDefaultsLineEditsMax
QStringList _settingDefaultsLineEditsAll
QStringList _settingNamesRadioBoxes
std::vector< QRadioButton * > _radioButtonsRegime
std::vector< XYPlotArea * > _XYPlotAreas
unsigned int _simID
unsigned int _firstNewSimID
unsigned int _simRegimeID
unsigned int _firstNewSimRegimeID

Detailed Description

Window class for main window.


Constructor & Destructor Documentation

MainWindow::MainWindow ( QWidget *  parent = 0  ) 

Constructor for MainWindow

Parameters:
parent Parent Widget
MainWindow::~MainWindow (  ) 

Destructor, calles function to save widget values before closing window


Member Function Documentation

void MainWindow::addPluginComboBoxItems (  )  [private]

Populates the friction model selection comboboxes with frition calculation models and the calculation method comboboxes with calculation methods

Here is the caller graph for this function:

void MainWindow::addPredefinesComboBoxItems ( flowtype_t  flowType,
bool  newItem = false,
QString  focusComboBoxName = "" 
) [private]

Populates the predefined gas and liquid ComboBoxes for,

Parameters:
flowType Specifies which comboBox to populate, M_LIQUID, M_GAS or M_BOTH, M_BOTH ignores newItem-arguments
newItem Was a new item added? If so this item will be selected
focusComboBoxName Name of combobox item to select (if newItem == true)

Here is the caller graph for this function:

void MainWindow::addRegimeCheckBoxes (  )  [private]

Populates the CheckBox list over regime transition types

Here is the caller graph for this function:

void MainWindow::addRemoveOldItemsSimulationList ( simulationtype_t  simulationType  )  [private]

Add/remove old simulations from flow simulations list

Here is the caller graph for this function:

void MainWindow::changeEvent ( QEvent *  e  )  [protected]
void MainWindow::enableDisableSimulationListButtons ( simulationtype_t  simulationType  )  [private]

Enable and disable buttons based on selection changes in simulations list

Here is the caller graph for this function:

void MainWindow::firstRunSetup (  )  [private]

Command that does the neccecery tasks for the application to run properly first time around

Here is the caller graph for this function:

regimetype_t MainWindow::getRegimeType (  )  [private]

Returns a regimetype_t value indicating the regime type to simulate

Here is the caller graph for this function:

scale_t MainWindow::getScaleType (  )  [private]

Returns a scale_t value indicating the scaling of x values

Here is the caller graph for this function:

CalculateFunctions * MainWindow::getSelectedCalculatePlugins ( std::vector< CalculateRegimeInterface * >  calculatePlugins  )  [private]

Populates the friction model selection comboboxes with frition calculation models

Parameters:
calculatePlugins Vector of pointers pointing to all the loaded calculate plugins

Here is the caller graph for this function:

FrictionFunctions * MainWindow::getSelectedFrictionPlugins ( std::vector< FrictionInterface * >  frictionPlugins,
std::vector< InterfaceFrictionInterface * >  interfaceFrictionPlugins,
std::vector< SlipRelationInterface * >  slipRelationFrictionPlugins 
) [private]

Returns pointer to FrictionFunctions class of friction functions for currently selected friction plugins

Parameters:
frictionPlugins Vector of pointers pointing to all the loaded normal friction plugins
interfaceFrictionPlugins Vector of pointers pointing to all the loaded interface friction plugins
slipRelationFrictionPlugins Vector of pointers pointing to all the loaded slip relation plugins

Here is the caller graph for this function:

void MainWindow::getWidgetValues ( Data data  )  [private]

Sets values in data for variables inputed

Parameters:
data Pointer to where Data instance to which values should be written
See also:
setWidgetValues()

Here is the caller graph for this function:

bool MainWindow::isInputValid ( simulationtype_t  simulationType  )  [private]

Returns true if the LineEdit and DropdownMenu values are valid and usable in flow simulation calculations If something is wrong, it will focus that item

Here is the caller graph for this function:

void MainWindow::loadSimulationListParameters ( simulationtype_t  simulationType  )  [private]

Load parameters of currently selected simulation

Here is the caller graph for this function:

void MainWindow::loadWidgetValues (  )  [private]

Loads values saved in settings into widgets, values that were saved when closing window previously

Here is the caller graph for this function:

void MainWindow::on_actionAbout_MultiPhasePlot_triggered (  )  [private, slot]

Show about information on MultiPhasePlot

void MainWindow::on_actionExit_triggered (  )  [private, slot]

Exit called form menu, exit program

void MainWindow::on_actionSource_code_documentation_triggered (  )  [private, slot]

Open default system browser with source documentation

void MainWindow::on_actionWhats_this_triggered (  )  [private, slot]

Enter What's this mode

void MainWindow::on_checkBoxIncludeOldSimulationsFlow_clicked (  )  [private, slot]

Add/remove old simulations from flow simulations list

Here is the caller graph for this function:

void MainWindow::on_checkBoxIncludeOldSimulationsRegime_clicked (  )  [private, slot]

Add/remove old simulations from flow simulations list

Here is the caller graph for this function:

void MainWindow::on_checkBoxRegimeUseMinimumHoldup_clicked (  )  [private, slot]

Here is the caller graph for this function:

void MainWindow::on_flowSimulation_finished (  )  [private, slot]

Simulation finished, plot and store results

Here is the caller graph for this function:

void MainWindow::on_flowSimulation_progressed ( int  percent  )  [private, slot]

Slot which updates the progressBar to reflect the simulation progression based on feedback from CalculateManager through progressed() signal

Parameters:
percent Integer value from 0 to 100 indicating the level of completion of the simulation

Here is the caller graph for this function:

void MainWindow::on_flowSimulation_terminated (  )  [private, slot]

Simulation has been terminated, enable/disable correct buttons

Here is the caller graph for this function:

void MainWindow::on_pushButtonClearSelectionFlow_clicked (  )  [private, slot]

Clear selection of simulation list

Here is the caller graph for this function:

void MainWindow::on_pushButtonClearSelectionRegime_clicked (  )  [private, slot]

Clear selection of regime simulationlist

Here is the caller graph for this function:

void MainWindow::on_pushButtonDeleteGasPredefines_clicked (  )  [private, slot]

Delete Gas Predefines button clicked, delete currently selected gas

See also:
on_pushButtonDeleteLiquidPredefines_clicked()
void MainWindow::on_pushButtonDeleteLiquidPredefines_clicked (  )  [private, slot]

Delete Liquid Predefines button clicked, delete currently selected liquid

See also:
on_pushButtonDeleteGasPredefines_clicked()
void MainWindow::on_pushButtonFlowMoreInfo_clicked (  )  [private, slot]

Show a dialog with more information on currently selected items in simulation list

Here is the caller graph for this function:

void MainWindow::on_pushButtonLoadGasPredefines_clicked (  )  [private, slot]

Load Gas Predefines button clicked, load currently selected gas

See also:
on_pushButtonLoadLiquidPredefines_clicked()
void MainWindow::on_pushButtonLoadLiquidPredefines_clicked (  )  [private, slot]

Load Liquid Predefines button clicked, load currently selected liquid

See also:
on_pushButtonLoadGasPredefines_clicked()
void MainWindow::on_pushButtonLoadSimulationParametersFlow_clicked (  )  [private, slot]

Load parameters of currently selected simulation

Here is the caller graph for this function:

void MainWindow::on_pushButtonLoadSimulationParametersRegime_clicked (  )  [private, slot]

Load parameters of currently selected simulation

Here is the caller graph for this function:

void MainWindow::on_pushButtonPlotSimulations_clicked (  )  [private, slot]

Here is the caller graph for this function:

void MainWindow::on_pushButtonPlotSimulationsRegime_clicked (  )  [private, slot]

Here is the caller graph for this function:

void MainWindow::on_pushButtonRegimeMoreInfo_clicked (  )  [private, slot]

Show a dialog with more information on currently selected items in simulation list

Here is the caller graph for this function:

void MainWindow::on_pushButtonRemoveSelectedFlow_clicked (  )  [private, slot]

Remove currently selected items from simulations list, also delete their sourcefiles

Here is the caller graph for this function:

void MainWindow::on_pushButtonRemoveSelectedRegime_clicked (  )  [private, slot]

Remove currently selected items from simulations list, also delete their sourcefiles

Here is the caller graph for this function:

void MainWindow::on_pushButtonSaveGasPredefine_clicked (  )  [private, slot]

Save Gas Predefines button clicked, open dialog asking for name of definition

See also:
on_pushButtonSaveLiquidPredefine_clicked()
void MainWindow::on_pushButtonSaveLiquidPredefine_clicked (  )  [private, slot]

Save Liquid Predefines button clicked, open dialog asking for name of definition

See also:
on_pushButtonSaveGasPredefine_clicked()
void MainWindow::on_pushButtonSimulateFlow_clicked (  )  [private, slot]

Simulation button has been clicked, start simulation

void MainWindow::on_pushButtonSimulateRegime_clicked (  )  [private, slot]

Simulation button has been clicked, start simulation

void MainWindow::on_pushButtonStopSimulationFlow_clicked (  )  [private, slot]

Tell calculationmanagers to quit

void MainWindow::on_pushButtonStopSimulationRegime_clicked (  )  [private, slot]

Tell all CalculateManagers to quit

void MainWindow::on_radioButtonVariable_clicked (  )  [private, slot]

Radio button selecting simulation variable clicked, enable appropriate LineEdits

Here is the caller graph for this function:

void MainWindow::on_regimeSimulation_finished (  )  [private, slot]

Simulation finished, if all CalculateManagers are finished, plot results

Here is the caller graph for this function:

void MainWindow::on_regimeSimulation_progressed ( int  asdf  )  [private, slot]

Slot which updates the progressBar to reflect the simulation progression based on feedback from CalculateManager through progressed() signal

Parameters:
asdf Since regime transition has multiple CalculateManager we can't use this value directly but have to call each CalculateManager to retrieve current progress

Here is the caller graph for this function:

void MainWindow::on_regimeSimulation_terminated (  )  [private, slot]

Simulation has been terminated, enable/disable correct buttons

Here is the caller graph for this function:

void MainWindow::on_simulationError ( QString  errorMsg  )  [private, slot]

Show error message sent from calculation thread

Here is the caller graph for this function:

void MainWindow::on_simulationFlowItemSelectionModel_selectionChanged ( QItemSelection  selected,
QItemSelection  deselected 
) [private, slot]

Enable and disable buttons based on selection changes in simulations list

Here is the caller graph for this function:

void MainWindow::on_simulationRegimeItemSelectionModel_selectionChanged ( QItemSelection  selected,
QItemSelection  deselected 
) [private, slot]

Enable and disable buttons based on selection changes in simulations list

Here is the caller graph for this function:

void MainWindow::plotSelectedSimulations ( simulationtype_t  simulationType  )  [private]

Some items in the history list view have been selected and should be plotted

Parameters:
simulationType Specifies if function applies to flow or regime transition

Here is the caller graph for this function:

void MainWindow::removeSelectedItemsFromList ( simulationtype_t  simulationType  )  [private]

Here is the caller graph for this function:

void MainWindow::saveGasDefinition ( QString  name,
QString  density,
QString  viscosity,
QString  temperature,
QString  pressure,
QString  densityMin = "",
QString  viscosityMin = "",
QString  temperatureMin = "",
QString  pressureMin = "",
QString  densityMax = "",
QString  viscosityMax = "",
QString  temperatureMax = "",
QString  pressureMax = "" 
) [private]

Saves gas variables as a new definition

Parameters:
name Name of definition
density Density of gas
viscosity Viscosity of gas
temperature Temperature of gas
pressure Pressure of gas
densityMin Minimum density of gas
viscosityMin Minimum viscosity of gas
temperatureMin Minimum temperature of gas
pressureMin Minimum density of gas
densityMax Maximum density of gas
viscosityMax Maximum viscosity of gas
temperatureMax Maximum temperature of gas
pressureMax Maximum density of gas
void MainWindow::saveGasDefinition ( QString  definitionName  )  [private]

Saves current gas parameters as a new definition

Parameters:
definitionName Name of new definition

Here is the caller graph for this function:

void MainWindow::saveLiquidDefinition ( QString  name,
QString  density,
QString  viscosity,
QString  densityMin = "",
QString  viscosityMin = "",
QString  densityMax = "",
QString  viscosityMax = "" 
) [private]

Saves liquid variables as a new definition

Parameters:
name Name of definition
density Density of liquid
viscosity Viscosity of liquid
densityMin Minimum density of liquid
viscosityMin Minimum viscosity of liquid
densityMax Maximum density of liquid
viscosityMax Maximum viscosity of liquid
void MainWindow::saveLiquidDefinition ( QString  definitionName  )  [private]

Saves current liquid parameters as a new definition

Parameters:
definitionName Name of new definition

Here is the caller graph for this function:

void MainWindow::saveWidgetValues (  )  [private]

Saves current values of widgets, this allows the program to keep the variables for when the program is restarted

Here is the caller graph for this function:

void MainWindow::setWidgetValues ( const Data data  )  [private]

Set the value of widgets based on the values of the supplied argument

Parameters:
data Pointer to Data instance with values
See also:
getWidgetValues()

Here is the caller graph for this function:

void MainWindow::showSimulationListInformation ( simulationtype_t  simulationType  )  [private]

Show a dialog with more information on currently selected items in simulation list

Here is the caller graph for this function:


Member Data Documentation

unsigned int MainWindow::_firstNewSimID [private]
unsigned int MainWindow::_firstNewSimRegimeID [private]
std::vector<QLineEdit *> MainWindow::_lineEdits [private]
std::vector<QLineEdit *> MainWindow::_lineEditsAll [private]
std::vector<QLineEdit *> MainWindow::_lineEditsMax [private]
std::vector<QLineEdit *> MainWindow::_lineEditsMin [private]
std::vector<QRadioButton *> MainWindow::_radioButtonsRegime [private]
std::vector<QRadioButton *> MainWindow::_radioButtonsVariable [private]
std::vector<QCheckBox *> MainWindow::_regimeCheckBoxes [private]
QStringList MainWindow::_settingNamesLineEdits [private]
QStringList MainWindow::_settingNamesRadioBoxes [private]
unsigned int MainWindow::_simID [private]
unsigned int MainWindow::_simRegimeID [private]
std::vector<double> MainWindow::_variableScaler [private]
std::vector<XYPlotArea *> MainWindow::_XYPlotAreas [private]
QErrorMessage* MainWindow::errorMessage [private]
QSplitter* MainWindow::flowSplitter [private]
QSplitter* MainWindow::regimeSplitter [private]
QItemSelectionModel* MainWindow::simulationFlowItemSelectionModel [private]
QItemSelectionModel* MainWindow::simulationRegimeItemSelectionModel [private]
QStandardItemModel* MainWindow::simulationsFlowModel [private]
QStandardItemModel* MainWindow::simulationsRegimeModel [private]
QTabWidget* MainWindow::tabWidgetFlow [private]
Ui::MainWindow* MainWindow::ui [private]
Ui::ListFrame* MainWindow::uiFlowListFrame [private]
Ui::ListFrame* MainWindow::uiRegimeListFrame [private]
 All Classes Functions Variables

Generated by  doxygen 1.6.2