22
33// Qt
44#include < QTextEdit> // Required for inheritance
5+ #include < verdigris>
56
67class QCompleter ;
78class QLineNumberArea ;
@@ -14,7 +15,7 @@ class QFramedTextAttribute;
1415 */
1516class QCodeEditor : public QTextEdit
1617{
17- Q_OBJECT
18+ W_OBJECT (QCodeEditor)
1819
1920 public:
2021 /* *
@@ -142,97 +143,110 @@ class QCodeEditor : public QTextEdit
142143 */
143144 void clearSquiggle ();
144145
145- Q_SIGNALS :
146+ public :
146147 /* *
147148 * @brief Signal, the font is changed by the wheel event.
148149 */
149- void fontChanged (const QFont &newFont);
150+ void fontChanged (const QFont &newFont) W_SIGNAL(fontChanged, newFont) ;
150151
151152 /* *
152153 * @brief Signal, like QLineEdit::editingFinished
153154 */
154- void editingFinished ();
155+ void editingFinished () W_SIGNAL(editingFinished) ;
155156
156157 /* *
157158 * @brief CTRL+Enter
158159 */
159- void livecodeTrigger ();
160-
161- public Q_SLOTS:
160+ void livecodeTrigger () W_SIGNAL(livecodeTrigger);
162161
162+ public:
163163 /* *
164164 * @brief Slot, that performs insertion of
165165 * completion info into code.
166166 * @param s Data.
167167 */
168168 void insertCompletion (const QString &s);
169+ W_SLOT (insertCompletion);
169170
170171 /* *
171172 * @brief Slot, that performs update of
172173 * internal editor viewport based on line
173174 * number area width.
174175 */
175176 void updateLineNumberAreaWidth (int );
177+ W_SLOT (updateLineNumberAreaWidth);
176178
177179 /* *
178180 * @brief Slot, that performs update of some
179181 * part of line number area.
180182 * @param rect Area that has to be updated.
181183 */
182184 void updateLineNumberArea (QRect rect);
185+ W_SLOT (updateLineNumberArea);
183186
184187 /* *
185188 * @brief Slot, that will proceed extra selection
186189 * for current cursor position.
187190 */
188191 void updateExtraSelection1 ();
192+ W_SLOT (updateExtraSelection1);
189193 void updateExtraSelection2 ();
194+ W_SLOT (updateExtraSelection2);
190195
191196 /* *
192197 * @brief Slot, that will update editor style.
193198 */
194199 void updateStyle ();
200+ W_SLOT (updateStyle);
195201
196202 /* *
197203 * @brief Slot, that indent the selected lines.
198204 */
199205 void indent ();
206+ W_SLOT (indent);
200207
201208 /* *
202209 * @brief Slot, that unindent the selected lines.
203210 */
204211 void unindent ();
212+ W_SLOT (unindent);
205213
206214 /* *
207215 * @brief Slot, that swap the selected lines up.
208216 */
209217 void swapLineUp ();
218+ W_SLOT (swapLineUp);
210219
211220 /* *
212221 * @brief Slot, that swap the selected lines down.
213222 */
214223 void swapLineDown ();
224+ W_SLOT (swapLineDown);
215225
216226 /* *
217227 * @brief Slot, that delete the selected lines.
218228 */
219229 void deleteLine ();
230+ W_SLOT (deleteLine);
220231
221232 /* *
222233 * @brief Slot, that duplicate the current line or the selection.
223234 */
224235 void duplicate ();
236+ W_SLOT (duplicate);
225237
226238 /* *
227239 * @brief Slot, that toggle single line comment of the
228240 * selected lines.
229241 */
230242 void toggleComment ();
243+ W_SLOT (toggleComment);
231244
232245 /* *
233246 * @brief Slot, that toggle block comment of the selection.
234247 */
235248 void toggleBlockComment ();
249+ W_SLOT (toggleBlockComment);
236250
237251 protected:
238252 /* *
@@ -293,11 +307,12 @@ class QCodeEditor : public QTextEdit
293307 */
294308 bool event (QEvent *e) override ;
295309
296- private Q_SLOTS :
310+ private:
297311 /* *
298312 * @brief Slot, that updates the bottom margin.
299313 */
300314 void updateBottomMargin ();
315+ W_SLOT (updateBottomMargin)
301316
302317 private:
303318 /* *
0 commit comments