#include <engine_editor.h>
Public Slots | |
| void | applyChanges () |
| Apply the changes to the selected engine. | |
| void | deleteEngine () |
| Delete the current engine. | |
| void | changeImage () |
| Open a fileDialog to select an image for the engine. | |
| void | changeEngine () |
| Called if a new engine was selected in the GUI. | |
| void | setEngine (Engine *engine) |
Signals | |
| void | engineChanged () |
| Emitted if the user changed an engine. | |
Public Member Functions | |
| EngineEditor (QWidget *parent=0) | |
Private Slots | |
| void | setImage (const QString &imagePath) |
| bool | maybeApplyChanges () |
| void | setDirty (bool dirty=TRUE) |
Private Attributes | |
| Engine * | _engine |
| The current selected engine. | |
| QLineEdit * | _nameEdit |
| Store the new name. | |
| QString | _imagePath |
| Store the new image path. | |
| QLabel * | _image |
| QSpinBox * | _addressBox |
| Store the new address. | |
| QComboBox * | _decoderBox |
| Store the decoder. | |
| QPushButton * | _apply |
| QPushButton * | _delete |
Definition at line 20 of file engine_editor.h.
| EngineEditor::EngineEditor | ( | QWidget * | parent = 0 |
) |
Create the editor with the different settings available for the engines
Definition at line 4 of file engine_editor.cpp.
References _addressBox, _apply, _decoderBox, _delete, _engine, _image, _imagePath, _nameEdit, applyChanges(), changeImage(), deleteEngine(), and setDirty().
| void EngineEditor::applyChanges | ( | ) | [slot] |
Apply the changes to the selected engine.
Definition at line 105 of file engine_editor.cpp.
References _addressBox, _decoderBox, _engine, _imagePath, _nameEdit, engineChanged(), Engine::setAddress(), Engine::setDecoder(), setDirty(), Engine::setImage(), and Engine::setName().
Referenced by EngineEditor(), and maybeApplyChanges().
| void EngineEditor::deleteEngine | ( | ) | [slot] |
Delete the current engine.
Definition at line 116 of file engine_editor.cpp.
References _engine, and Engine::name().
Referenced by EngineEditor().
| void EngineEditor::changeImage | ( | ) | [slot] |
Open a fileDialog to select an image for the engine.
Definition at line 82 of file engine_editor.cpp.
References setImage().
Referenced by EngineEditor().
| void EngineEditor::changeEngine | ( | ) | [slot] |
Called if a new engine was selected in the GUI.
Definition at line 173 of file engine_editor.cpp.
References _delete, maybeApplyChanges(), and setEngine().
| void EngineEditor::setEngine | ( | Engine * | engine | ) | [slot] |
Set the engine as the edited engine
| engine | The engine to edit |
Definition at line 186 of file engine_editor.cpp.
References _addressBox, _decoderBox, _engine, _nameEdit, Engine::address(), Engine::decoder(), Engine::imagePath(), maybeApplyChanges(), Engine::name(), setDirty(), and setImage().
Referenced by Win::addEngine(), and changeEngine().
| void EngineEditor::setImage | ( | const QString & | imagePath | ) | [private, slot] |
Set the new image and store the image path
| imagePath | The path to the image file |
Definition at line 92 of file engine_editor.cpp.
References _image, _imagePath, and setDirty().
Referenced by changeImage(), and setEngine().
| bool EngineEditor::maybeApplyChanges | ( | ) | [private, slot] |
Definition at line 144 of file engine_editor.cpp.
References applyChanges(), and setDirty().
Referenced by changeEngine(), and setEngine().
| void EngineEditor::setDirty | ( | bool | dirty = TRUE |
) | [private, slot] |
Set the dirty flag to true, called after a change from the user
| dirty | The dirty state to set |
Definition at line 138 of file engine_editor.cpp.
References _apply.
Referenced by applyChanges(), EngineEditor(), maybeApplyChanges(), setEngine(), and setImage().
| void EngineEditor::engineChanged | ( | ) | [signal] |
Engine* EngineEditor::_engine [private] |
The current selected engine.
Definition at line 70 of file engine_editor.h.
Referenced by applyChanges(), deleteEngine(), EngineEditor(), and setEngine().
QLineEdit* EngineEditor::_nameEdit [private] |
Store the new name.
Definition at line 73 of file engine_editor.h.
Referenced by applyChanges(), EngineEditor(), and setEngine().
QString EngineEditor::_imagePath [private] |
Store the new image path.
Definition at line 76 of file engine_editor.h.
Referenced by applyChanges(), EngineEditor(), and setImage().
QLabel* EngineEditor::_image [private] |
QSpinBox* EngineEditor::_addressBox [private] |
Store the new address.
Definition at line 80 of file engine_editor.h.
Referenced by applyChanges(), EngineEditor(), and setEngine().
QComboBox* EngineEditor::_decoderBox [private] |
Store the decoder.
Definition at line 83 of file engine_editor.h.
Referenced by applyChanges(), EngineEditor(), and setEngine().
QPushButton* EngineEditor::_apply [private] |
QPushButton * EngineEditor::_delete [private] |
1.5.6