MCPcopy Create free account
hub / github.com/ChiyukiGana/Quickinput / toPack

Method toPack

source/src/macro.cpp:107–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 posScaleX = QiRange::Restricted(static_cast<float>(json.value("posScaleX").toDouble()), Macro::range_posScale);
106 posScaleY = QiRange::Restricted(static_cast<float>(json.value("posScaleY").toDouble()), Macro::range_posScale);
107
108 acRun.fromJson(json.value("actions").toArray());
109 acEnd.fromJson(json.value("actionsEnding").toArray());
110 acEnt.fromJson(json.value("actionsEntry").toArray());
111}
112
113typepack::object Macro::toPack() const
114{
115 typepack::object pack;
116 pack.set("ver", Qi::version.toStdString());
117 pack.set("name", name.toStdString());
118 pack.set("wndState", (bool)wndState);
119 pack.set("wndChild", (bool)wndInfo.child);
120 pack.set("wndName", wndInfo.name.toStdString());
121 pack.set("wndClass", wndInfo.clas.toStdString());
122 pack.set("wndProc", wndInfo.proc.toStdString());
123 pack.set("wndMatch", (bool)matchState);
124 pack.set("wndMatchName", wndMatch.name.toStdString());
125 pack.set("wndMatchClass", wndMatch.clas.toStdString());
126 pack.set("wndMatchProc", wndMatch.proc.toStdString());
127 pack.set("script", script.toStdString());
128 pack.set("state", (bool)state);
129 pack.set("keyBlock", (bool)keyBlock);
130 pack.set("curBlock", (bool)curBlock);
131 pack.set("forceStop", (bool)forceStop);
132 pack.set("hideState", (bool)hideState);
133 pack.set("key", (int)(static_cast<int>(key1) | (static_cast<int>(key2) << 16)));
134 pack.set("key1", (int)key1);
135 pack.set("key2", (int)key2);
136 pack.set("mode", (int)mode);
137 pack.set("count", (int)count);
138 pack.set("timer", (bool)timer);
139 pack.set("timerStart", (int)timerStart);
140 pack.set("timerEnd", (int)timerEnd);
141 pack.set("speed", (double)speed);
142 pack.set("moveScaleX", (double)moveScaleX);
143 pack.set("moveScaleY", (double)moveScaleY);
144 pack.set("posScaleX", (double)posScaleX);

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected