Relacs Core Library
0.9.8
|
#include <macros.h>
Public Slots | |
void | startNextRePro (void) |
void | loadMacros (const string &file) |
void | selectMacros (void) |
void | switchMacro (QAction *action) |
void | reload (void) |
void | reloadRePro (const string &name) |
void | store (void) |
void | softBreak (void) |
void | hardBreak (void) |
void | resume (void) |
void | resumeNext (void) |
void | noMacro (RePro *repro) |
Public Member Functions | |
Macros (RELACSWidget *rw, QWidget *parent=0) | |
~Macros (void) | |
int | index (const string ¯o) const |
string | macro (void) const |
string | options (void) const |
int | size (void) const |
void | clear (bool keep=true) |
void | load (const string ¯ofile="", bool main=false) |
bool | check (void) |
void | checkOptions (void) |
bool | fatal (void) const |
void | warning (void) |
void | create (void) |
void | setMenu (QMenu *menu) |
void | startNextRePro (bool saving, bool enable=false) |
void | startMacro (int macro, int command=0, bool saving=true, bool enable=false, deque< MacroPos > *newstack=0) |
void | startUp (void) |
void | shutDown (void) |
void | fallBack (bool saving=true) |
void | startSession (void) |
void | stopSession (void) |
void | executeMacro (int newmacro, const Str ¶ms) |
void | setThisOnly (bool macro) |
virtual void | saveConfig (ofstream &str) |
void | setRePros (RePros *repros) |
void | setControls (ControlTabs *controls) |
Public Member Functions inherited from ConfigClass | |
ConfigClass (const string &ident, int group=0, int mode=0xffff, int selectmask=0) | |
ConfigClass (const ConfigClass &C) | |
virtual | ~ConfigClass (void) |
const string & | configIdent (void) const |
void | setConfigIdent (const string &ident) |
int | configGroup (void) const |
void | setConfigGroup (int group) |
int | configMode (void) const |
void | setConfigMode (int mode) |
void | addConfigMode (int mode) |
void | delConfigMode (int mode) |
int | configSelectMask (void) const |
void | setConfigSelectMask (int mask) |
void | addConfig (void) |
void | readConfig (void) |
virtual void | readConfig (StrQueue &sq) |
virtual int | configSize (void) const |
virtual void | config (void) |
virtual void | preConfig (void) |
Options (void) | |
Options (const Options &o) | |
Options (const Options &o, int flags) | |
Options (const string &name, const string &type, int flags, int style) | |
Options (const Str &opttxt, const string &assignment=":=", const string &separator=",;") | |
Options (const StrQueue &sq, const string &assignment=":=") | |
Options (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", string *line=0) | |
virtual | ~Options (void) |
Options & | operator= (const Options &o) |
Options & | assign (const Options &o) |
Options & | append (const Options &o) |
Options & | add (const Options &o) |
Options & | insert (const Options &o, const string &atname="") |
Options & | assign (const Options &o, int flags) |
Options & | copy (Options &o, int flags) |
Options & | append (const Options &o, int flags) |
Options & | add (const Options &o, int flags) |
Options & | insert (const Options &o, int flags, const string &atname="") |
Parameter * | assign (const string &name, const string &value) |
Options * | parentSection (void) |
const Options * | parentSection (void) const |
void | setParentSection (Options *parentsection) |
void | resetParents (void) |
Options * | rootSection (void) |
const Options * | rootSection (void) const |
string | name (void) const |
virtual void | setName (const string &name) |
virtual void | setName (const string &name, const string &type) |
string | type (void) const |
void | setType (const string &type) |
string | include (void) const |
void | setInclude (const string &include) |
void | setInclude (const string &url, const string &name) |
int | flag (void) const |
bool | flag (int selectflag) const |
Options & | setFlag (int flag) |
Options & | addFlag (int flag) |
Options & | delFlag (int flag) |
Options & | clearFlag (void) |
int | style (void) const |
Options & | setStyle (int style) |
Options & | addStyle (int style) |
Options & | delStyle (int style) |
Options & | clearStyle (void) |
bool | checkType (int mask) const |
Str | warning (void) const |
iterator | begin (void) |
iterator | end (void) |
const_iterator | begin (void) const |
const_iterator | end (void) const |
section_iterator | sectionsBegin (void) |
section_iterator | sectionsEnd (void) |
const_section_iterator | sectionsBegin (void) const |
const_section_iterator | sectionsEnd (void) const |
const_iterator | find (const string &pattern, int level=-1) const |
iterator | find (const string &pattern, int level=-1) |
const_iterator | rfind (const string &pattern, int level=-1) const |
iterator | rfind (const string &pattern, int level=-1) |
const_section_iterator | findSection (const string &pattern, int level=-1) const |
section_iterator | findSection (const string &pattern, int level=-1) |
const_section_iterator | rfindSection (const string &pattern, int level=-1) const |
section_iterator | rfindSection (const string &pattern, int level=-1) |
const Parameter & | operator[] (int i) const |
Parameter & | operator[] (int i) |
const Parameter & | operator[] (const string &name) const |
Parameter & | operator[] (const string &name) |
const Options & | section (int i) const |
Options & | section (int i) |
const Options & | section (const string &name) const |
Options & | section (const string &name) |
Str | request (const string &name) const |
Parameter & | setRequest (const string &name, const string &request) |
Parameter::ValueType | valueType (const string &name) const |
Parameter & | setValueType (const string &name, Parameter::ValueType type) |
int | flags (const string &name) const |
bool | flags (const string &name, int flag) const |
Parameter & | setFlags (const string &name, int flags) |
Parameter & | addFlags (const string &name, int flags) |
Parameter & | delFlags (const string &name, int flags) |
Parameter & | clearFlags (const string &name) |
bool | changed (const string &name) |
int | style (const string &name) const |
Parameter & | setStyle (const string &name, int style) |
Parameter & | addStyle (const string &name, int style) |
Parameter & | delStyle (const string &name, int style) |
Str | format (const string &name) const |
Parameter & | setFormat (const string &name, int width=0, int prec=-1, char fmt='g') |
Parameter & | setFormat (const string &name, const string &format) |
int | formatWidth (const string &name) const |
int | size (const string &name) const |
Parameter & | add (const Parameter &np) |
Parameter & | insert (const Parameter &np, const string &atname="") |
Parameter & | addText (const string &name, const string &request, const string &dflt, int flags=0, int style=0) |
Parameter & | addText (const string &name, const string &dflt="", int flags=0, int style=0) |
Parameter & | insertText (const string &name, const string &atname, const string &request, const string &dflt, int flags=0, int style=0) |
Parameter & | insertText (const string &name, const string &atname="", const string &dflt="", int flags=0, int style=0) |
Str | text (const string &name, int index, const string &dflt="", const string &format="", const string &unit="") const |
Str | text (const string &name, const string &dflt="", const string &format="", const string &unit="") const |
void | texts (const string &name, vector< string > &s, const string &format="", const string &unit="") const |
Str | allText (const string &name, const string &dflt="", const string &format="", const string &unit="", const string &separator=", ") const |
Parameter & | setText (const string &name, const string &strg) |
Parameter & | setText (const string &name, const Parameter &p) |
Parameter & | pushText (const string &name, const string &strg) |
Str | defaultText (const string &name, const string &format="", const string &unit="") const |
Parameter & | setDefaultText (const string &name, const string &dflt) |
Parameter & | addSelection (const string &name, const string &request, const string &selection, int flags=0, int style=0) |
Parameter & | addSelection (const string &name, const string &selection="", int flags=0, int style=0) |
Parameter & | insertSelection (const string &name, const string &atname, const string &request, const string &selection, int flags=0, int style=0) |
Parameter & | insertSelection (const string &name, const string &atname="", const string &selection="", int flags=0, int style=0) |
Parameter & | selectText (const string &name, const string &strg, int add=0) |
Parameter & | selectText (const string &name, int index) |
int | index (const string &name) const |
int | index (const string &name, const string &strg) const |
Parameter & | addNumber (const string &name, const string &request, double dflt, double minimum, double maximum=MAXDOUBLE, double step=1.0, const string &unit="", const string &outputunit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, double dflt, const string &unit, int flags, int style=0) |
Parameter & | addNumber (const string &name, double dflt, double error, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | addNumber (const string &name, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (const string &name, const string &atname, const string &request, double dflt, double minimum, double maximum=MAXDOUBLE, double step=1.0, const string &unit="", const string &outputunit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (const string &name, const string &atname, const string &request, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (const string &name, const string &atname, double dflt, const string &unit="", const string &format="", int flags=0, int style=0) |
Parameter & | insertNumber (const string &name, const string &atname, const string &unit="", const string &format="", int flags=0, int style=0) |
double | number (const string &name, double dflt=0.0, const string &unit="", int index=0) const |
double | number (const string &name, const string &unit, double dflt=0.0, int index=0) const |
double | number (const string &name, int index, double dflt=0.0, const string &unit="") const |
double | number (const string &name, int index, const string &unit, double dflt=0.0) const |
void | numbers (const string &name, vector< double > &n, const string &unit="") const |
double | error (const string &name, const string &unit="", int index=0) const |
double | error (const string &name, int index, const string &unit="") const |
void | errors (const string &name, vector< double > &n, const string &unit="") const |
Parameter & | setNumber (const string &name, double number, double error, const string &unit="") |
Parameter & | setNumber (const string &name, double number, const string &unit="") |
Parameter & | pushNumber (const string &name, double number, double error=-1.0, const string &unit="") |
Parameter & | pushNumber (const string &name, double number, const string &unit) |
Parameter & | setNumber (const string &name, const Parameter &p) |
double | defaultNumber (const string &name, const string &unit="") const |
Parameter & | setDefaultNumber (const string &name, double dflt, const string &unit="") |
double | minimum (const string &name, const string &unit="") const |
double | maximum (const string &name, const string &unit="") const |
double | step (const string &name, const string &unit="") const |
Parameter & | setStep (const string &name, double step, const string &unit="") |
Parameter & | setMinMax (const string &name, double minimum=-MAXDOUBLE, double maximum=MAXDOUBLE, double step=1.0, const string &unit="") |
Str | unit (const string &name) const |
Str | outUnit (const string &name) const |
Parameter & | setUnit (const string &name, const string &internunit, const string &outunit="") |
Parameter & | setOutUnit (const string &name, const string &outputunit) |
Parameter & | changeUnit (const string &name, const string &internunit) |
Parameter & | addInteger (const string &name, const string &request, long dflt, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="", const string &outputunit="", int width=0, int flags=0, int style=0) |
Parameter & | addInteger (const string &name, long dflt, const string &unit="", int width=0, int flags=0, int style=0) |
Parameter & | addInteger (const string &name, const string &unit="") |
Parameter & | insertInteger (const string &name, const string &atname, const string &request, long dflt, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="", const string &outputunit="", int width=0, int flags=0, int style=0) |
Parameter & | insertInteger (const string &name, const string &atname, long dflt, const string &unit="", int width=0, int flags=0, int style=0) |
Parameter & | insertInteger (const string &name, const string &atname, const string &unit="", int width=0, int flags=0, int style=0) |
long | integer (const string &name, const string &unit="", long dflt=0, int index=0) const |
long | integer (const string &name, int index, long dflt=0, const string &unit="") const |
long | integer (const string &name, int index, const string &unit, long dflt=0) const |
void | integers (const string &name, vector< long > &n, const string &unit="") const |
void | integers (const string &name, vector< int > &n, const string &unit="") const |
Parameter & | setInteger (const string &name, long number, long error, const string &unit="") |
Parameter & | setInteger (const string &name, long number, const string &unit="") |
Parameter & | pushInteger (const string &name, long number, long error, const string &unit="") |
Parameter & | pushInteger (const string &name, long number, const string &unit="") |
Parameter & | setInteger (const string &name, const Parameter &p) |
long | defaultInteger (const string &name, const string &unit="") const |
Parameter & | setDefaultInteger (const string &name, long dflt, const string &unit="") |
Parameter & | setMinMax (const string &name, long minimum=LONG_MIN, long maximum=LONG_MAX, long step=1, const string &unit="") |
Parameter & | setMinMax (const string &name, int minimum, int maximum, int step=1, const string &unit="") |
Parameter & | addBoolean (const string &name, const string &request, bool dflt, int flags=0, int style=0) |
Parameter & | addBoolean (const char *name, const char *request, bool dflt, int flags=0, int style=0) |
Parameter & | addBoolean (const string &name, bool dflt, int flags=0, int style=0) |
Parameter & | addBoolean (const char *name, bool dflt, int flags=0, int style=0) |
Parameter & | insertBoolean (const string &name, const string &atname="", const string &request="", bool dflt=false, int flags=0, int style=0) |
Parameter & | insertBoolean (const string &name, const string &atname, int flags=0, int style=0) |
bool | boolean (const string &name, bool dflt=false, int index=0) const |
bool | boolean (const string &name, int index, bool dflt=false) const |
void | booleans (const string &name, vector< bool > &n) const |
Parameter & | setBoolean (const string &name, bool b) |
Parameter & | setBoolean (const string &name, const Parameter &p) |
bool | defaultBoolean (const string &name) const |
Parameter & | setDefaultBoolean (const string &name, bool dflt) |
Parameter & | addDate (const string &name, const string &request, int year=0, int month=0, int day=0, int flags=0, int style=0) |
Parameter & | addDate (const string &name, int year, int month, int day, int flags=0, int style=0) |
Parameter & | addDate (const string &name, int flags=0, int style=0) |
Parameter & | insertDate (const string &name, const string &atname="", const string &request="", int year=0, int month=0, int day=0, int flags=0, int style=0) |
Parameter & | insertDate (const string &name, const string &atname, int year=0, int month=0, int day=0, int flags=0, int style=0) |
Parameter & | insertDate (const string &name, const string &atname, int flags=0, int style=0) |
const Parameter & | date (const string &name, int index, int &year, int &month, int &day) const |
Parameter & | setDate (const string &name, int year, int month, int day) |
Parameter & | setDate (const string &name, const string &date) |
Parameter & | setDate (const string &name, const struct tm &date) |
Parameter & | setDate (const string &name, const time_t &time) |
Parameter & | setCurrentDate (const string &name) |
Parameter & | setDate (const string &name, const Parameter &p) |
const Parameter & | defaultDate (const string &name, int index, int &year, int &month, int &day) const |
Parameter & | setDefaultDate (const string &name, int year, int month, int day) |
Parameter & | addTime (const string &name, const string &request, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0) |
Parameter & | addTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0, int flags=0, int style=0) |
Parameter & | addTime (const string &name, int flags=0, int style=0) |
Parameter & | insertTime (const string &name, const string &atname="", const string &request="", int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0) |
Parameter & | insertTime (const string &name, const string &atname, int hour=0, int minutes=0, int seconds=0, int milliseconds=0, int flags=0, int style=0) |
Parameter & | insertTime (const string &name, const string &atname, int flags=0, int style=0) |
const Parameter & | time (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const |
Parameter & | setTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0) |
Parameter & | setTime (const string &name, const string &time) |
Parameter & | setTime (const string &name, const struct tm &time) |
Parameter & | setTime (const string &name, const time_t &time) |
Parameter & | setCurrentTime (const string &name) |
Parameter & | setTime (const string &name, const Parameter &p) |
const Parameter & | defaultTime (const string &name, int index, int &hour, int &minutes, int &seconds, int &milliseconds) const |
Parameter & | setDefaultTime (const string &name, int hour, int minutes, int seconds, int milliseconds=0) |
Options & | newSection (int level, const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSection (int level, const string &name, int flag, int style=0) |
Options & | newSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSection (const string &name, int flag, int style=0) |
Options & | newSubSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSubSection (const string &name, int flag, int style=0) |
Options & | newSubSubSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | newSubSubSection (const string &name, int flag, int style=0) |
Options & | addSection (const string &name, const string &type="", int flag=0, int style=0) |
Options & | addSection (const string &name, int flag, int style=0) |
Options & | insertSection (const string &name, const string &atpattern, const string &type="", int flag=0, int style=0) |
Options & | insertSection (const string &name, const string &atpattern, int flag, int style=0) |
Options & | newSection (int level, const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (int level, const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (int level, const Options &opt, const string &name, int flag, int style=0) |
Options & | newSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | newSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | newSubSubSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSubSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | newSubSubSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | addSection (const Options &opt, int selectmask, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | addSection (const Options &opt, const string &name="", const string &type="", int flag=0, int style=0) |
Options & | addSection (const Options &opt, const string &name, int flag, int style=0) |
Options & | insertSection (const Options &opt, int selectmask, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0) |
Options & | insertSection (const Options &opt, const string &name, const string &atpattern, const string &type="", int flag=0, int style=0) |
Options & | insertSection (const Options &opt, const string &name, const string &atpattern, int flag, int style=0) |
Options & | newSection (Options *opt, bool newparent=false) |
Options & | addSection (Options *opt, bool newparent=false) |
Options & | insertSection (Options *opt, const string &atpattern, bool newparent=false) |
Options & | newSections (Options *opt, bool newparent=false) |
void | endSection (void) |
void | clearSections (void) |
void | setSection (Options &opt) |
void | lastSection (void) |
int | up (void) |
int | down (void) |
Parameter & | setDefault (const string &name) |
Options & | setDefaults (int flags=0) |
Parameter & | setToDefault (const string &name) |
Options & | setToDefaults (int flags=0) |
Options & | erase (iterator p) |
Options & | erase (section_iterator p) |
Options & | erase (Options *s) |
Options & | erase (const string &pattern) |
Options & | erase (int selectflag) |
Options & | pop (void) |
Options & | popSection (void) |
Options & | flatten (Options *root=0) |
Options & | clear (bool revert=true) |
int | size (void) const |
int | size (int selectflag) const |
bool | empty (void) const |
int | parameterSize (void) const |
int | parameterSize (int flags) const |
int | sectionsSize (void) const |
int | sectionsSize (int flags) const |
bool | exist (const string &pattern) const |
bool | existSection (const string &pattern) const |
Options & | setFlags (int flags, int selectflag=0) |
Options & | addFlags (int flags, int selectflag=0) |
Options & | delFlags (int flags, int selectflag=0) |
Options & | setValueTypeFlags (int flags, int typemask) |
Options & | addValueTypeFlags (int flags, int typemask) |
Options & | delValueTypeFlags (int flags, int typemask) |
Options & | setStyles (int style, int selectflag=0) |
Options & | addStyles (int style, int selectflag=0) |
Options & | delStyles (int style, int selectflag=0) |
int | styleSize (int style) const |
Options & | setValueTypeStyles (int style, int typemask) |
Options & | addValueTypeStyles (int style, int typemask) |
Options & | delValueTypeStyles (int style, int typemask) |
int | nameWidth (int selectmask=0, bool detailed=false, bool escape=false) const |
string | save (int selectmask=0, int flags=0) const |
ostream & | save (ostream &str, const string &start="", int selectmask=0, int flags=0, int width=-1) const |
ostream & | save (ostream &str, const string &textformat, const string &numberformat, const string &boolformat="%i=%b", const string &dateformat="%i=%04Y-%02m-%02d", const string &timeformat="%i=%02H:%02M:%02S", const string §ionformat="%i", int selectmask=0, const string &start="") const |
ostream & | saveXML (ostream &str, int selectmask=0, int flags=0, int level=0, int indent=4) const |
Options & | read (const string &opttxt, int flag, const string &assignment=":=", const string &separator=",;", int *indent=0) |
Options & | read (const string &opttxt, const string &assignment=":=", const string &separator=",;") |
istream & | read (istream &str, int flag, const string &assignment=":=", const string &comment="#", const string &stop="", Str *line=0) |
istream & | read (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", Str *line=0) |
Options & | read (const StrQueue &sq, int flag=0, const string &assignment=":=") |
bool | read (const Parameter &p, int flag=0) |
Options & | read (const Options &o, int flags=0, int flag=0) |
bool | readAppend (const Parameter &p) |
Options & | readAppend (const Options &o, int flags=0) |
Options & | load (const Str &opttxt, const string &assignment=":=", const string &separator=",;", int *indent=0, int *indentspacing=0, int *level=0) |
istream & | load (istream &str, const string &assignment=":=", const string &comment="#", const string &stop="", string *line=0) |
Options & | load (const StrQueue &sq, const string &assignment=":=") |
virtual void | notify (void) |
void | callNotifies (void) |
bool | setNotify (bool notify=true) |
bool | unsetNotify (void) |
bool | notifying (void) const |
Public Attributes | |
RELACSWidget * | RW |
RePros * | RPs |
ControlTabs * | CTs |
Static Public Attributes | |
static const int | MenuWidth = 50 |
Static Public Attributes inherited from ConfigClass | |
static const int | NonDefault |
static const long | TabSection |
Friends | |
ostream & | operator<< (ostream &str, const Macros ¯os) |
Additional Inherited Members | |
Public Types inherited from ConfigClass | |
enum | Action |
enum | SaveFlags |
typedef deque< Parameter > ::iterator | iterator |
typedef deque< Parameter > ::const_iterator | const_iterator |
typedef deque< Options * > ::iterator | section_iterator |
typedef deque< Options * > ::const_iterator | const_section_iterator |
Static Public Member Functions inherited from ConfigClass | |
static void | setConfigureClasses (ConfigureClasses *cfg) |
static double | floorLog10 (double v) |
static double | floor10 (double v, double scale=1.0) |
static double | ceil10 (double v, double scale=1.0) |
Container handling Macros.
RePro setOptions() / checking options
change Button layout in resize event
load defaultrepro if it is requested in macros.cfg
This class provides the macro buttons and the macros-menu.
Macros | ( | RELACSWidget * | rw, |
QWidget * | parent = 0 |
||
) |
Constructs the Macros.
References ConfigClass::addBoolean(), ConfigClass::addText(), Macro::createIcons(), and MacroCommand::createIcons().
~Macros | ( | void | ) |
Destructs the Macros.
References Macros::clear(), Macro::destroyIcons(), and MacroCommand::destroyIcons().
int index | ( | const string & | macro | ) | const |
The index of the macro with name macro.
References Str::lower(), and Macros::macro().
Referenced by MacroCommand::check(), and Macro::setMacroIndices().
string macro | ( | void | ) | const |
The name of the current Macro.
Referenced by Macros::index().
string options | ( | void | ) | const |
Returns the options of the current RePro.
int size | ( | void | ) | const |
The number of macros.
Referenced by Macros::executeMacro(), and Macros::startNextRePro().
void clear | ( | bool | keep = true | ) |
Clear macros list. Keep macros marked with "keep" if keep is true (default).
Referenced by Macros::load(), and Macros::~Macros().
void load | ( | const string & | macrofile = "" , |
bool | main = false |
||
) |
Load Macro definitions from file. If macrofile is empty or main is true
and no mainfile property is defined, use the file property of the Macros.
[in] | macrofile | the path of a file containing macro definitions |
[in] | main | if true ignore macrofile and use the main macrofile (the mainfile property of the Macros). |
References Macros::clear(), Str::empty(), Str::erase(), relacs::line(), Str::strip(), ConfigClass::text(), and Str::WhiteSpace.
Referenced by Macros::loadMacros(), and RELACSWidget::RELACSWidget().
bool check | ( | void | ) |
Check macros and initialize repros. Returns true, if no macro or no fallback RePro is specified.
References ConfigClass::begin(), Str::empty(), Macro::FallBack, Str::name(), ConfigDialog::name(), RePros::repro(), RELACSPlugin::repro(), Macros::RPs, ConfigClass::setDefaults(), Macro::ShutDown, RePros::size(), Macro::StartSession, Macro::StartUp, and Macro::StopSession.
Referenced by Macros::loadMacros(), and RELACSWidget::RELACSWidget().
void checkOptions | ( | void | ) |
Check repro Options. Returns true, if no macro or no fallback RePro is valid.
Referenced by Macros::loadMacros(), RELACSWidget::startFirstAcquisition(), and RELACSWidget::startIdle().
bool fatal | ( | void | ) | const |
Returns true if check detected no macro or no fallback RePro.
Referenced by RELACSWidget::init().
void warning | ( | void | ) |
Displays warning messages from load and check if there are any.
References Str::empty(), Str::eraseMarkup(), Str::find(), RELACSWidget::printlog(), Macros::RW, and MessageBox::warning().
Referenced by RELACSWidget::init(), Macros::loadMacros(), RELACSWidget::startFirstAcquisition(), and RELACSWidget::startIdle().
void create | ( | void | ) |
Create the button aray and the menu for the macros.
References Macros::reload(), Macros::resume(), Macros::resumeNext(), Macros::selectMacros(), Macros::softBreak(), Macros::startNextRePro(), Macros::switchMacro(), and ConfigClass::text().
Referenced by Macros::loadMacros(), and RELACSWidget::RELACSWidget().
void setMenu | ( | QMenu * | menu | ) |
The menu starting and configuring Macros should be added to menu.
Referenced by RELACSWidget::RELACSWidget().
void startNextRePro | ( | bool | saving, |
bool | enable = false |
||
) |
Stops the currently running repro. Then executes commands of the current macro until the next repro. Finally starts that repro. saving toggles whether saving to files via SaveFiles is enabled. enable overrides disbaled macro commands.
References RELACSWidget::idle(), ConfigClass::name(), Macros::RW, Macros::size(), RELACSWidget::startedMacro(), and RELACSWidget::stopRePro().
Referenced by RELACSWidget::customEvent().
void startMacro | ( | int | macro, |
int | command = 0 , |
||
bool | saving = true , |
||
bool | enable = false , |
||
deque< MacroPos > * | newstack = 0 |
||
) |
Initializes macro number macro for command number command and calls startNextRePro().
[in] | macro | the index of the macro |
[in] | command | the index of the macro's command to be executed |
[in] | saving | toggles whether saving to files via SaveFiles is enabled. |
[in] | enable | if true also runs disabled commands |
[in] | newstack | if not 0 set the current stack to newstack. |
References ConfigClass::name(), Macros::RW, RELACSWidget::startedMacro(), and Macros::startNextRePro().
Referenced by Macro::dialogAction(), MacroCommand::dialogAction(), Macros::fallBack(), Macro::launch(), Macros::resume(), Macros::resumeNext(), MacroCommand::run(), Macros::shutDown(), MacroCommand::start(), Macros::startSession(), Macros::startUp(), and Macros::stopSession().
void startUp | ( | void | ) |
Starts the startup Macro (only in case there is one).
References Macros::startMacro().
Referenced by RELACSWidget::startFirstAcquisition().
void shutDown | ( | void | ) |
Starts the shutdown Macro (only in case there is one).
References Macros::startMacro().
Referenced by RELACSWidget::doStopActivity().
void fallBack | ( | bool | saving = true | ) |
Starts the fallback Macro (only in case there is one).
References Macros::startMacro().
Referenced by Macros::hardBreak(), Macros::loadMacros(), and RELACSWidget::preStopSession().
void startSession | ( | void | ) |
Starts the startsession Macro (only in case there is one).
References Macros::startMacro().
Referenced by RELACSWidget::startSession().
void stopSession | ( | void | ) |
Starts the stopsession Macro (only in case there is one).
References Macros::startMacro().
Referenced by RELACSWidget::stopSession().
void executeMacro | ( | int | newmacro, |
const Str & | params | ||
) |
Execute next macro command. Called by MacroCommand::execute().
References Macros::size().
Referenced by MacroCommand::execute().
void setThisOnly | ( | bool | macro | ) |
Set ThisMacroOnly true
if macro is true
, otherwise set ThisCommandOnly true
.
Referenced by MacroCommand::run().
|
virtual |
Update the default macro file and save all options to the config file.
Reimplemented from ConfigClass.
References ConfigClass::saveConfig(), ConfigClass::setText(), ConfigClass::setToDefault(), and ConfigClass::text().
void setRePros | ( | RePros * | repros | ) |
Set the pointer to the RePros to repros.
References Macros::RPs.
Referenced by RELACSWidget::RELACSWidget().
void setControls | ( | ControlTabs * | controls | ) |
Set the pointer to the Controls to controls.
References Macros::CTs.
Referenced by RELACSWidget::RELACSWidget().
|
slot |
Stops the currently running repro. Then executes commands of the current macro until the next repro. Finally starts that repro with svaing set to true
.
Referenced by Macros::create(), and Macros::startMacro().
|
slot |
Load macros from file, check them and create buttons and menu.
References Macros::check(), Macros::checkOptions(), Macros::create(), Macros::fallBack(), Macros::load(), and Macros::warning().
Referenced by MacroCommand::execute(), Macros::reload(), Macros::selectMacros(), and Macros::switchMacro().
|
slot |
Open file dialog and load macros from selected file, check them and create buttons and menu.
References Macros::loadMacros().
Referenced by Macros::create().
|
slot |
Load macros from file associated with action, check them and create buttons and menu.
References Macros::loadMacros(), and ConfigClass::text().
Referenced by Macros::create().
|
slot |
Reload the macros from the current macro file.
References Macros::loadMacros().
Referenced by Macros::create().
|
slot |
Updates the macros if the repro name was reloaded.
References RePros::nameRepro(), RELACSWidget::printlog(), Macros::RPs, and Macros::RW.
|
slot |
Memorizes the currently running repro and macro.
Referenced by Macros::hardBreak(), Macro::launch(), and Macros::softBreak().
|
slot |
Memorizes the currently running repro and macro and starts the fallback macro after the current repro is finished. The currently running repro gets a request to stop ( RePro::setSoftStop() ).
References RELACSWidget::idle(), Macros::RW, and Macros::store().
Referenced by Macros::create().
|
slot |
Memorizes the currently running repro and macro and starts the fallback macro immediately.
References Macros::fallBack(), and Macros::store().
|
slot |
Starts the previously memorized macro at the memorized repro.
References RELACSWidget::idle(), Macros::RW, and Macros::startMacro().
Referenced by Macros::create().
|
slot |
Starts the previously memorized macro at the repro following the memorized repro.
References RELACSWidget::idle(), Macros::RW, and Macros::startMacro().
Referenced by Macros::create().
|
slot |
Inform macros that a repro is started that is not part of a macro.
References Macros::RW, and RELACSWidget::startedMacro().
|
friend |
Write information of the Macros to str.
|
static |
Maximum number of characters for menu entry.
Referenced by Macro::menuStr().
RELACSWidget* RW |
Pointer to RELACSWidget.
Referenced by MacroCommand::check(), MacroCommand::execute(), Macro::expandParameter(), Macros::noMacro(), Macros::reloadRePro(), Macros::resume(), Macros::resumeNext(), Macro::run(), Macros::softBreak(), Macros::startMacro(), Macros::startNextRePro(), and Macros::warning().
RePros* RPs |
Pointer to all RePros.
Referenced by Macros::check(), MacroCommand::check(), MacroCommand::dialog(), MacroCommand::help(), MacroCommand::reload(), Macros::reloadRePro(), Macros::setRePros(), and MacroCommand::view().
ControlTabs* CTs |
Pointer to all Controls.
Referenced by MacroCommand::check(), and Macros::setControls().