|
The ModifSpec class provides the specification about how Modif objects are represented. More...
Header: | #include <ModifSpec.hpp> |
ModifSpec() | |
virtual | ~ModifSpec() |
int | action() |
const QString & | name() |
const QString & | raster() |
void | setAction(int action) |
void | setName(const QString &name) |
void | setRaster(const QString &raster) |
void | setSound(const QString &sound) |
void | setVector(const QString &vector) |
const QString & | sound() |
const QString & | vector() |
bool | parseFile(QString &file_path, QList<ModifSpec *> *modif_spec_list) |
The ModifSpec class specifies how a Modif object is represented graphically, mainly by connecting its modif name to a graphics SVG file that is located in the Polymer chemistry definition directory. That connection is performed in the "modification_dictionary" dictionary file itself also located in the polymer chemistry definition directory. Its contents look like this:
Phosphorylation%T%phospho.svg Sulphation%T%sulpho.svg AmidationAsp%O%asparagine.svg Acetylation%T%acetyl.svg AmidationGlu%O%glutamine.svg Oxidation%T%oxidation.svg SulfideBond%T%sulfbond.svg ProtonLoss%T%protonloss.svg
The Phosphorylation%T%phospho.svg
line indicates that, when a Monomer object modified by a Modif object by name "Phosphorylation" is to be rendered graphically, the corresponding vignette to be used is in the file named "phospho.svg" in the polymer chemistry definition directory. The 'T' and 'O' special directives, indicate the way the modification is to be represented graphically in the sequence editor. When a monomer is modified, the modification event can be shown by overlaying onto the monomer's vignette a transparent vignette or by replacing it totally with a new one. These two behaviours are documented above with the letters 'T' (transparent overlay) or 'O' (opaque overwrite).
Constructs a ModifSpec instance.
[virtual noexcept]
ModifSpec::~ModifSpec()Destructs this ModifSpec instance.
Returns the action.
See also setAction().
Returns the monomer name.
See also setName().
[static]
bool ModifSpec::parseFile(QString &file_path, QList<ModifSpec *> *modif_spec_list)Parses the file_path dictionary containing the Modif specifications.
At the moment the file has this format:
Phosphorylation%T%phospho.svg Sulphation%T%sulpho.svg AmidationAsp%O%asparagine.svg Acetylation%T%acetyl.svg AmidationGlu%O%glutamine.svg Oxidation%T%oxidation.svg
Upon parsing, the modif_spec_list of ModifSpec instances will be filled with instances created on the basis of each parsed line in the file.
Returns true if the parsing was successful, false otherwise.
Returns the raster image file name.
See also setRaster().
Sets the action.
The action is the way the Modif's vignette applies itself on top of the Monomer's vignette: either in an Opaque manner, thus overwriting the initial vignette, or in a Transparent manner, thus only partially overlaying the initial vignette.
See also action().
Sets the monomer name.
See also name().
Sets the raster image file name to raster.
See also raster().
Sets the file name of the Modif's sound file.
See also sound().
Sets the vector image file name to vector.
See also vector().
Returns the file name of the Modif's sound file.
See also setSound().
Returns the vector image file name.
See also setVector().