-
Notifications
You must be signed in to change notification settings - Fork 0
/
mnoteshandler.h
56 lines (37 loc) · 998 Bytes
/
mnoteshandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef MNOTES_H
#define MNOTES_H
#include <QObject>
#include <QQuickTextDocument>
#include <QSyntaxHighlighter>
class MNotesHandler : public QObject
{
Q_OBJECT
public:
explicit MNotesHandler();
void highLighter(const QString &search);
// QQuickItem *target() { return m_target; }
Q_INVOKABLE QVariantList curpos() { return cur_pos; }
void getTextDocument(QString objName);
void setTextObject(QObject *obj);
private:
QObject *textObject;
QObject *App;
QTextDocument *d_mnote;
QQuickItem *m_target;
bool isFirstTime;
QString m_text;
int m_curpos = 0;
QQuickItem *sItem;
void clearHighlight();
QVariantList cur_pos;
void countMethods(QObject *obj);
signals:
Q_SIGNALS:
// void targetChanged();
// void textChanged();
void curposChanged( const char *fn, QObject* = nullptr);
public slots:
void searchSignal(const QString &str, const QString &objName);
void findNext();
};
#endif // MNOTES_H