1 #ifndef VYMMODELWRAPPER_H
2 #define VYMMODELWRAPPER_H
7 #include <QScriptContext>
8 #include <QScriptValue>
15 class VymModelWrapper : public VymScriptContext {
18 VymModelWrapper(VymModel *m);
20 QString setResult( QString r );
21 bool setResult( bool r );
22 int setResult( int r );
26 BranchItem *getSelectedBranch();
27 QVariant getParameter(bool &ok, const QString &key,
28 const QStringList ¶meters);
32 void addBranchBefore();
33 void addMapCenter(qreal x, qreal y);
34 void addMapInsert(QString filename, int pos, int contentFilter);
35 void addMapInsert(const QString &filename, int pos);
36 void addMapInsert(const QString &filename);
37 void addMapReplace(QString filename);
39 void addXLink(const QString &begin, const QString &end, int width,
40 const QString &color, const QString &penstyle);
43 void centerOnID(const QString &id); // tested: ok
45 void colorBranch(const QString &color);
46 void colorSubtree(const QString &color);
53 QString getDestPath();
55 QString getFileName();
56 QString getFrameType();
57 QString getHeadingPlainText();
58 QString getHeadingXML();
59 QString getMapAuthor();
60 QString getMapComment();
61 QString getMapTitle();
62 QString getNotePlainText();
64 QString getSelectionString();
65 int getTaskPriorityDelta();
66 QString getTaskSleep();
67 int getTaskSleepDays();
70 QString getXLinkColor();
72 QString getXLinkPenStyle();
73 QString getXLinkStyleBegin();
74 QString getXLinkStyleEnd();
75 bool hasActiveFlag(const QString &flag);
77 bool hasRichTextNote();
79 void importDir(const QString &path);
80 bool initIterator(const QString &iname, bool deepLevelsFirst = false);
82 void loadImage(const QString &filename);
83 void loadNote(const QString &filename);
84 void move(qreal x, qreal y);
85 void moveRel(qreal x, qreal y);
88 void moveSlideDown(int n);
90 void moveSlideUp(int n);
92 bool nextIterator(const QString &iname);
95 bool parseVymText(const QString &text);
98 bool relinkTo(const QString &parent, int num, qreal x, qreal y);
99 bool relinkTo(const QString &parent, int num);
100 bool relinkTo(const QString &parent);
102 void removeChildren();
103 void removeKeepChildren();
104 void removeSlide(int n);
105 QVariant repeatLastCommand();
106 void saveImage(const QString &filename);
107 void saveNote(const QString &filename);
109 bool select(const QString &s);
110 bool selectID(const QString &s);
111 bool selectFirstBranch();
112 bool selectFirstChildBranch();
113 bool selectLastBranch();
114 bool selectLastChildBranch();
115 bool selectLastImage();
117 bool selectLatestAdded();
118 bool selectToggle(const QString &selectString);
119 void setFlagByName(const QString &s);
120 void setHeadingConfluencePageName();
121 void setHeadingPlainText(const QString &s);
122 void setHideExport(bool b);
123 void setHideLinkUnselected(bool b);
124 void setIncludeImagesHorizontally(bool b);
125 void setIncludeImagesVertically(bool b);
126 void setMapAnimCurve(int n);
127 void setMapAnimDuration(int n);
128 void setMapAuthor(const QString &s);
129 void setMapBackgroundColor(const QString &color);
130 void setMapComment(const QString &s);
131 void setMapDefLinkColor(const QString &color);
132 void setMapLinkStyle(const QString &style);
133 void setMapRotation(float a); // tested: ok
134 void setMapTitle(const QString &s);
135 void setMapZoom(float z); // tested: ok
136 void setNotePlainText(const QString &s);
137 void setFrameBorderWidth(int border);
138 void setFrameBrushColor(const QString &color);
139 void setFrameIncludeChildren(bool b);
140 void setFramePadding(int padding);
141 void setFramePenColor(const QString &color);
142 void setFrameType(const QString &type);
143 void setScaleFactor(qreal f);
144 void setSelectionBrushColor(const QString &color);
145 void setSelectionPenColor(const QString &color);
146 void setSelectionPenWidth(const qreal &);
147 void setTaskPriorityDelta(const int &n);
148 bool setTaskSleep(const QString &s);
149 void setURL(const QString &s);
150 void setVymLink(const QString &s);
151 void setXLinkColor(const QString &color);
152 void setXLinkStyle(const QString &style);
153 void setXLinkStyleBegin(const QString &style);
154 void setXLinkStyleEnd(const QString &style);
155 void setXLinkWidth(int w);
157 void sortChildren(bool b);
159 void toggleFlagByUid(const QString &s);
160 void toggleFlagByName(const QString &s);
161 void toggleFrameIncludeChildren();
167 void unscrollChildren();
169 void unsetFlagByName(const QString &s);