#include <microsettings.h>
Collaboration diagram for MicroSettings:

Public Types | |
| enum | VariableType { vt_signedInteger, vt_unsignedInteger, vt_unknown } |
Signals | |
| void | pinMappingsChanged () |
Public Member Functions | |
| MicroSettings (MicroInfo *microInfo) | |
| ~MicroSettings () | |
| MicroData | microData () const |
| void | restoreFromMicroData (const MicroData µData) |
| MicroInfo * | microInfo () const |
| void | setPinType (const QString &id, PinSettings::pin_type type) |
| void | setPinState (const QString &id, PinSettings::pin_state state) |
| PinSettings * | pinWithID (const QString &id) |
| int | portState (const QString &port) |
| void | setPortState (const QString &port, int state) |
| void | setPortType (const QString &port, int type) |
| int | portType (const QString &port) |
| void | setVariable (const QString &name, QVariant value, bool permanent=true) |
| QStringList | variableNames () |
| VariableInfo * | variableInfo (const QString &name) |
| bool | deleteVariable (const QString &name) |
| void | removeAllVariables () |
| void | setPinMappings (const PinMappingMap &pinMappings) |
| PinMapping | pinMapping (const QString &id) const |
| PinMappingMap | pinMappings () const |
This class stores PIC settings that are specific to the PIC program being devloped. This includes such things as port settings and variable settings. This is different from PIC info, which includes stuff such as PIC pin names
Definition at line 109 of file microsettings.h.
| MicroData MicroSettings::microData | ( | ) | const |
Returns microdata to describe the microsettings. This includes ports settins and variable settings
Definition at line 207 of file microsettings.cpp.
References MicroInfo::id(), MicroData::id, microInfo(), MicroData::pinMap, pinMappings(), MicroData::pinMappings, and MicroData::variableMap.
Referenced by restoreFromMicroData().
| MicroInfo* MicroSettings::microInfo | ( | ) | const [inline] |
Returns a pointer to the MicroInfo object for the PIC in use
Definition at line 130 of file microsettings.h.
Referenced by PicItem::drawShape(), FlowCode::generateMicrobe(), microData(), MicroSettings(), MicroSettingsDlg::MicroSettingsDlg(), PicItem::PicItem(), portState(), portType(), FlowCodeDocument::setPicType(), MicroSettingsDlg::slotModifyPinMap(), and FlowPart::slotUpdateFlowPartVariables().
| void MicroSettings::setPinType | ( | const QString & | id, | |
| PinSettings::pin_type | type | |||
| ) |
Set the pin with the given id to the given initial type (input/output)
Definition at line 113 of file microsettings.cpp.
References pinWithID(), and PinSettings::setType().
| void MicroSettings::setPinState | ( | const QString & | id, | |
| PinSettings::pin_state | state | |||
| ) |
Set the pin with the given id to the given initial state (on/off)
Definition at line 119 of file microsettings.cpp.
References pinWithID(), and PinSettings::setState().
| PinSettings * MicroSettings::pinWithID | ( | const QString & | id | ) |
Returns a pointer to the PinSettings for the pin with the given id, or null if no such pin exists.
Definition at line 127 of file microsettings.cpp.
Referenced by PicItem::PicItem(), restoreFromMicroData(), setPinState(), and setPinType().
| int MicroSettings::portState | ( | const QString & | port | ) |
Returns the initial port state (on/off) for the given port. Each pin state occupies one bit of the returned integer.
Definition at line 137 of file microsettings.cpp.
References microInfo().
Referenced by FlowCode::generateMicrobe(), and MicroSettingsDlg::MicroSettingsDlg().
| void MicroSettings::setPortState | ( | const QString & | port, | |
| int | state | |||
| ) |
Sets the port with the given name to the given state
Definition at line 178 of file microsettings.cpp.
Referenced by MicroSettingsDlg::savePort().
| void MicroSettings::setPortType | ( | const QString & | port, | |
| int | type | |||
| ) |
Sets the port with the given name to the given type
Definition at line 193 of file microsettings.cpp.
Referenced by MicroSettingsDlg::savePort().
| int MicroSettings::portType | ( | const QString & | port | ) |
Returns the initial port type (intput/output) for the given port. Each pin type occupies one bit of the returned integer.
Definition at line 158 of file microsettings.cpp.
References microInfo().
Referenced by FlowCode::generateMicrobe(), and MicroSettingsDlg::MicroSettingsDlg().
| void MicroSettings::setVariable | ( | const QString & | name, | |
| QVariant | value, | |||
| bool | permanent = true | |||
| ) |
Sets the variable "name" to the initial value "value. If the variable already exists, its value will be changed. Else, the variable will be created.
Definition at line 254 of file microsettings.cpp.
References VariableInfo::initAtStart, VariableInfo::permanent, and VariableInfo::setValue().
Referenced by restoreFromMicroData(), MicroSettingsDlg::saveVariable(), and FlowCodeDocument::varNameChanged().
| QStringList MicroSettings::variableNames | ( | ) |
Returns the list of initial variables as a QStringList, just the names without the values. Generated from the VariableMap m_variables.
Definition at line 275 of file microsettings.cpp.
Referenced by FlowCode::generateMicrobe(), MicroSettingsDlg::MicroSettingsDlg(), and FlowPart::updateVarNames().
| VariableInfo * MicroSettings::variableInfo | ( | const QString & | name | ) |
Returns a pointer to the variable info with the given name, or NULL if the variable is not found
Definition at line 287 of file microsettings.cpp.
Referenced by FlowCode::generateMicrobe(), MicroSettingsDlg::MicroSettingsDlg(), MicroSettingsDlg::saveVariable(), and FlowCodeDocument::varNameChanged().
| bool MicroSettings::deleteVariable | ( | const QString & | name | ) |
Deletes the variable with the given name, returns true if successul (i.e. a variable with that name existed), or false if not
Definition at line 299 of file microsettings.cpp.
Referenced by FlowCodeDocument::varNameChanged().
| void MicroSettings::removeAllVariables | ( | ) |
Removes all variables
Definition at line 313 of file microsettings.cpp.
Referenced by MicroSettingsDlg::slotSaveStuff().
| void MicroSettings::setPinMappings | ( | const PinMappingMap & | pinMappings | ) |
Sets the list of Pin Mappings to that given.
Definition at line 325 of file microsettings.cpp.
Referenced by restoreFromMicroData(), and MicroSettingsDlg::slotSaveStuff().
| PinMapping MicroSettings::pinMapping | ( | const QString & | id | ) | const |
Returns the pic pin mapping with the given id.
Definition at line 319 of file microsettings.cpp.
| PinMappingMap MicroSettings::pinMappings | ( | ) | const |
Returns the list of different Pin Mappings;
Definition at line 332 of file microsettings.cpp.
Referenced by FlowCode::generateMicrobe(), microData(), MicroSettingsDlg::MicroSettingsDlg(), and FlowPart::slotUpdateFlowPartVariables().
1.5.1