Window class for main window. More...
Window class for main window.
MainWindow::MainWindow | ( | QWidget * | parent = 0 |
) |
Constructor for MainWindow
parent | Parent Widget |
MainWindow::~MainWindow | ( | ) |
Destructor, calles function to save widget values before closing window
void MainWindow::addPluginComboBoxItems | ( | ) | [private] |
Populates the friction model selection comboboxes with frition calculation models and the calculation method comboboxes with calculation methods
void MainWindow::addPredefinesComboBoxItems | ( | flowtype_t | flowType, | |
bool | newItem = false , |
|||
QString | focusComboBoxName = "" | |||
) | [private] |
Populates the predefined gas and liquid ComboBoxes for,
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) |
void MainWindow::addRegimeCheckBoxes | ( | ) | [private] |
Populates the CheckBox list over regime transition types
void MainWindow::addRemoveOldItemsSimulationList | ( | simulationtype_t | simulationType | ) | [private] |
Add/remove old simulations from flow simulations list
void MainWindow::changeEvent | ( | QEvent * | e | ) | [protected] |
void MainWindow::enableDisableSimulationListButtons | ( | simulationtype_t | simulationType | ) | [private] |
Enable and disable buttons based on selection changes in simulations list
void MainWindow::firstRunSetup | ( | ) | [private] |
Command that does the neccecery tasks for the application to run properly first time around
regimetype_t MainWindow::getRegimeType | ( | ) | [private] |
Returns a regimetype_t value indicating the regime type to simulate
scale_t MainWindow::getScaleType | ( | ) | [private] |
Returns a scale_t value indicating the scaling of x values
CalculateFunctions * MainWindow::getSelectedCalculatePlugins | ( | std::vector< CalculateRegimeInterface * > | calculatePlugins | ) | [private] |
Populates the friction model selection comboboxes with frition calculation models
calculatePlugins | Vector of pointers pointing to all the loaded calculate plugins |
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
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 |
void MainWindow::getWidgetValues | ( | Data * | data | ) | [private] |
Sets values in data for variables inputed
data | Pointer to where Data instance to which values should be written |
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
void MainWindow::loadSimulationListParameters | ( | simulationtype_t | simulationType | ) | [private] |
Load parameters of currently selected simulation
void MainWindow::loadWidgetValues | ( | ) | [private] |
Loads values saved in settings into widgets, values that were saved when closing window previously
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
void MainWindow::on_checkBoxIncludeOldSimulationsRegime_clicked | ( | ) | [private, slot] |
Add/remove old simulations from flow simulations list
void MainWindow::on_checkBoxRegimeUseMinimumHoldup_clicked | ( | ) | [private, slot] |
void MainWindow::on_flowSimulation_finished | ( | ) | [private, slot] |
Simulation finished, plot and store results
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
percent | Integer value from 0 to 100 indicating the level of completion of the simulation |
void MainWindow::on_flowSimulation_terminated | ( | ) | [private, slot] |
Simulation has been terminated, enable/disable correct buttons
void MainWindow::on_pushButtonClearSelectionFlow_clicked | ( | ) | [private, slot] |
Clear selection of simulation list
void MainWindow::on_pushButtonClearSelectionRegime_clicked | ( | ) | [private, slot] |
Clear selection of regime simulationlist
void MainWindow::on_pushButtonDeleteGasPredefines_clicked | ( | ) | [private, slot] |
Delete Gas Predefines button clicked, delete currently selected gas
void MainWindow::on_pushButtonDeleteLiquidPredefines_clicked | ( | ) | [private, slot] |
Delete Liquid Predefines button clicked, delete currently selected liquid
void MainWindow::on_pushButtonFlowMoreInfo_clicked | ( | ) | [private, slot] |
Show a dialog with more information on currently selected items in simulation list
void MainWindow::on_pushButtonLoadGasPredefines_clicked | ( | ) | [private, slot] |
Load Gas Predefines button clicked, load currently selected gas
void MainWindow::on_pushButtonLoadLiquidPredefines_clicked | ( | ) | [private, slot] |
Load Liquid Predefines button clicked, load currently selected liquid
void MainWindow::on_pushButtonLoadSimulationParametersFlow_clicked | ( | ) | [private, slot] |
Load parameters of currently selected simulation
void MainWindow::on_pushButtonLoadSimulationParametersRegime_clicked | ( | ) | [private, slot] |
Load parameters of currently selected simulation
void MainWindow::on_pushButtonPlotSimulations_clicked | ( | ) | [private, slot] |
void MainWindow::on_pushButtonPlotSimulationsRegime_clicked | ( | ) | [private, slot] |
void MainWindow::on_pushButtonRegimeMoreInfo_clicked | ( | ) | [private, slot] |
Show a dialog with more information on currently selected items in simulation list
void MainWindow::on_pushButtonRemoveSelectedFlow_clicked | ( | ) | [private, slot] |
Remove currently selected items from simulations list, also delete their sourcefiles
void MainWindow::on_pushButtonRemoveSelectedRegime_clicked | ( | ) | [private, slot] |
Remove currently selected items from simulations list, also delete their sourcefiles
void MainWindow::on_pushButtonSaveGasPredefine_clicked | ( | ) | [private, slot] |
Save Gas Predefines button clicked, open dialog asking for name of definition
void MainWindow::on_pushButtonSaveLiquidPredefine_clicked | ( | ) | [private, slot] |
Save Liquid Predefines button clicked, open dialog asking for name of definition
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
void MainWindow::on_regimeSimulation_finished | ( | ) | [private, slot] |
Simulation finished, if all CalculateManagers are finished, plot results
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
asdf | Since regime transition has multiple CalculateManager we can't use this value directly but have to call each CalculateManager to retrieve current progress |
void MainWindow::on_regimeSimulation_terminated | ( | ) | [private, slot] |
Simulation has been terminated, enable/disable correct buttons
void MainWindow::on_simulationError | ( | QString | errorMsg | ) | [private, slot] |
Show error message sent from calculation thread
void MainWindow::on_simulationFlowItemSelectionModel_selectionChanged | ( | QItemSelection | selected, | |
QItemSelection | deselected | |||
) | [private, slot] |
Enable and disable buttons based on selection changes in simulations list
void MainWindow::on_simulationRegimeItemSelectionModel_selectionChanged | ( | QItemSelection | selected, | |
QItemSelection | deselected | |||
) | [private, slot] |
Enable and disable buttons based on selection changes in simulations list
void MainWindow::plotSelectedSimulations | ( | simulationtype_t | simulationType | ) | [private] |
Some items in the history list view have been selected and should be plotted
simulationType | Specifies if function applies to flow or regime transition |
void MainWindow::removeSelectedItemsFromList | ( | simulationtype_t | simulationType | ) | [private] |
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
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
definitionName | Name of new definition |
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
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
definitionName | Name of new definition |
void MainWindow::saveWidgetValues | ( | ) | [private] |
Saves current values of widgets, this allows the program to keep the variables for when the program is restarted
void MainWindow::setWidgetValues | ( | const Data * | data | ) | [private] |
Set the value of widgets based on the values of the supplied argument
data | Pointer to Data instance with values |
void MainWindow::showSimulationListInformation | ( | simulationtype_t | simulationType | ) | [private] |
Show a dialog with more information on currently selected items in simulation list
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<CalculateManager *> MainWindow::_regimeCalculationManagers [private] |
std::vector<QCheckBox *> MainWindow::_regimeCheckBoxes [private] |
QStringList MainWindow::_settingDefaultsLineEdits [private] |
QStringList MainWindow::_settingDefaultsLineEditsAll [private] |
QStringList MainWindow::_settingDefaultsLineEditsMax [private] |
QStringList MainWindow::_settingDefaultsLineEditsMin [private] |
QStringList MainWindow::_settingNamesLineEdits [private] |
QStringList MainWindow::_settingNamesLineEditsAll [private] |
QStringList MainWindow::_settingNamesLineEditsMax [private] |
QStringList MainWindow::_settingNamesLineEditsMin [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] |
XYPlotArea* MainWindow::alphaPlot [private] |
std::vector<CalculateRegimeInterface *> MainWindow::calculateInterfacePlugins [private] |
CalculateManager* MainWindow::cm [private] |
XYPlotArea* MainWindow::diameterPlot [private] |
QErrorMessage* MainWindow::errorMessage [private] |
QSplitter* MainWindow::flowSplitter [private] |
std::vector<FrictionInterface *> MainWindow::frictionInterfacePlugins [private] |
XYPlotArea* MainWindow::holdupPlot [private] |
std::vector<InterfaceFrictionInterface*> MainWindow::interfaceFrictionInterfacePlugins [private] |
XYPlotArea* MainWindow::pressurePlot [private] |
std::vector<RegimeTransitionInterface *> MainWindow::regimeInterfacePlugins [private] |
XYPlotArea* MainWindow::regimePlot [private] |
QSplitter* MainWindow::regimeSplitter [private] |
QItemSelectionModel* MainWindow::simulationFlowItemSelectionModel [private] |
QItemSelectionModel* MainWindow::simulationRegimeItemSelectionModel [private] |
QStandardItemModel* MainWindow::simulationsFlowModel [private] |
QStandardItemModel* MainWindow::simulationsRegimeModel [private] |
std::vector<SlipRelationInterface*> MainWindow::slipRelationInterfacePlugins [private] |
QTabWidget* MainWindow::tabWidgetFlow [private] |
Ui::MainWindow* MainWindow::ui [private] |
Ui::ListFrame* MainWindow::uiFlowListFrame [private] |
Ui::ListFrame* MainWindow::uiRegimeListFrame [private] |