Presenter for a CamiTK extension file model. More...
#include <CamiTKExtensionModelPresenter.h>
Inheritance diagram for CamiTKExtensionModelPresenter:
Collaboration diagram for CamiTKExtensionModelPresenter:Public Slots | |
| void | modelUpdated () |
| called when the model has changed, the GUI/JSON is to be updated | |
| void | plusButtonClicked () |
| called when the user clicks on the "+" button to add an action tab | |
| void | tabCloseRequest (int index) |
| called when a tab is closed (only action tabs are closable) | |
Signals | |
| void | dataModelUpdated () |
| emitted when the data model was updated by the user | |
| void | showMessage (const QString &message, int durationMilliseconds=2000, bool warning=false) |
| emitted when a message has to be displayed to the user | |
Public Member Functions | |
| CamiTKExtensionModelPresenter (const QString &camitkFilePath, const QString &newExtensionName, const QString &language=QString(), const QString &cppGenerationType=QString(), QWidget *parent=nullptr) | |
| constructor If the camitkFilePath does not have a valid model, this will create a new one | |
| void | emitShowMessage (const QString &message, int durationMilliseconds=2000, bool warning=false) |
| make the presenter emit the show message signal | |
| QString | getExtensionName () |
| get current extension name | |
| bool | isHotPlug () |
| is the current model a hot plug extension | |
| bool | isModified () |
| is the current model modified (unsaved) | |
| bool | isPython () |
| is the current model a python extension | |
| void | saveExtensionFile (const QFile &file) |
| save the data model | |
| ~CamiTKExtensionModelPresenter () | |
| destructor | |
Presenter for a CamiTK extension file model.
This creates
| CamiTKExtensionModelPresenter::CamiTKExtensionModelPresenter | ( | const QString & | camitkFilePath, |
| const QString & | newExtensionName, | ||
| const QString & | language = QString(), |
||
| const QString & | cppGenerationType = QString(), |
||
| QWidget * | parent = nullptr |
||
| ) |
constructor If the camitkFilePath does not have a valid model, this will create a new one
| camitkFilePath | path to the CamiTK extension file to edit |
| newExtensionName | the extension name ("action", "component", or "viewer"), needed for creating of a new extension |
| parent | (optional) |
References CamiTKExtensionModel::clear(), CamiTKExtensionModel::getModel(), isPython(), VariantDataModel::isValid(), CamiTKExtensionModel::load(), plusButtonClicked(), CamiTKExtensionModel::resetModel(), VariantDataModel::size(), tabCloseRequest(), and CamiTKExtensionModel::toJSON().
Here is the call graph for this function:| CamiTKExtensionModelPresenter::~CamiTKExtensionModelPresenter | ( | ) |
destructor
|
signal |
emitted when the data model was updated by the user
Referenced by CamiTKExtensionEditor::CamiTKExtensionEditor(), and modelUpdated().
Here is the caller graph for this function:| void CamiTKExtensionModelPresenter::emitShowMessage | ( | const QString & | message, |
| int | durationMilliseconds = 2000, |
||
| bool | warning = false |
||
| ) |
make the presenter emit the show message signal
References showMessage().
Referenced by FieldEditor::deleteButtonClicked(), and QtPropertyFieldEditor::valueChangedInPropertyField().
Here is the call graph for this function:
Here is the caller graph for this function:| QString CamiTKExtensionModelPresenter::getExtensionName | ( | ) |
get current extension name
References CamiTKExtensionModel::getModel().
Referenced by CamiTKExtensionEditor::saveClicked().
Here is the call graph for this function:
Here is the caller graph for this function:| bool CamiTKExtensionModelPresenter::isHotPlug | ( | ) |
is the current model a hot plug extension
References CamiTKExtensionModel::getModel(), VariantDataModel::isValid(), and VariantDataModel::toString().
Referenced by CppExtensionTabPresenter::CppExtensionTabPresenter().
Here is the call graph for this function:
Here is the caller graph for this function:| bool CamiTKExtensionModelPresenter::isModified | ( | ) |
is the current model modified (unsaved)
References CamiTKExtensionModel::isModified().
Here is the call graph for this function:| bool CamiTKExtensionModelPresenter::isPython | ( | ) |
is the current model a python extension
References CamiTKExtensionModel::getModel(), VariantDataModel::isValid(), and VariantDataModel::toString().
Referenced by CamiTKExtensionModelPresenter(), and plusButtonClicked().
Here is the call graph for this function:
Here is the caller graph for this function:
|
slot |
called when the model has changed, the GUI/JSON is to be updated
References dataModelUpdated(), and CamiTKExtensionModel::toJSON().
Referenced by FieldEditor::deleteButtonClicked(), QtPropertyFieldEditor::editTextChanged(), plusButtonClicked(), CamiTKPropertyListFieldEditor::plusButtonClicked(), tabCloseRequest(), ListFieldEditor::updateModel(), QtPropertyFieldEditor::valueChangedInPropertyField(), and TextFieldEditor::valueChangedInTextEdit().
Here is the call graph for this function:
Here is the caller graph for this function:
|
slot |
called when the user clicks on the "+" button to add an action tab
References VariantDataModel::append(), CustomInputDialog::getInput(), CamiTKExtensionModel::getModel(), isPython(), VariantDataModel::last(), modelUpdated(), showMessage(), and VariantDataModel::size().
Referenced by CamiTKExtensionModelPresenter().
Here is the call graph for this function:
Here is the caller graph for this function:| void CamiTKExtensionModelPresenter::saveExtensionFile | ( | const QFile & | file | ) |
save the data model
References CamiTKExtensionModel::save().
Referenced by CamiTKExtensionEditor::saveClicked().
Here is the call graph for this function:
Here is the caller graph for this function:
|
signal |
emitted when a message has to be displayed to the user
Referenced by CamiTKExtensionEditor::CamiTKExtensionEditor(), emitShowMessage(), plusButtonClicked(), and tabCloseRequest().
Here is the caller graph for this function:
|
slot |
called when a tab is closed (only action tabs are closable)
References ExtensionTypeTabPresenter::getDataModel(), ExtensionTypeTabPresenter::getExtensionType(), VariantDataModel::isValid(), modelUpdated(), VariantDataModel::remove(), and showMessage().
Referenced by CamiTKExtensionModelPresenter().
Here is the call graph for this function:
Here is the caller graph for this function: