From e3c64fa01a8e15b57116cf922436dadc1295cb97 Mon Sep 17 00:00:00 2001 From: royqh1979 Date: Thu, 21 Oct 2021 08:19:15 +0800 Subject: [PATCH] work save: bookmark model --- RedPandaIDE/RedPandaIDE.pro | 2 ++ RedPandaIDE/todoparser.cpp | 2 +- RedPandaIDE/widgets/bookmarkmodel.cpp | 6 ++++++ RedPandaIDE/widgets/bookmarkmodel.h | 13 +++++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 RedPandaIDE/widgets/bookmarkmodel.cpp create mode 100644 RedPandaIDE/widgets/bookmarkmodel.h diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index c0df9c68..48df120f 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -68,6 +68,7 @@ SOURCES += \ todoparser.cpp \ toolsmanager.cpp \ widgets/aboutdialog.cpp \ + widgets/bookmarkmodel.cpp \ widgets/classbrowser.cpp \ widgets/codecompletionlistview.cpp \ widgets/codecompletionpopup.cpp \ @@ -180,6 +181,7 @@ HEADERS += \ todoparser.h \ toolsmanager.h \ widgets/aboutdialog.h \ + widgets/bookmarkmodel.h \ widgets/classbrowser.h \ widgets/codecompletionlistview.h \ widgets/codecompletionpopup.h \ diff --git a/RedPandaIDE/todoparser.cpp b/RedPandaIDE/todoparser.cpp index 8d36cd1b..3298fe24 100644 --- a/RedPandaIDE/todoparser.cpp +++ b/RedPandaIDE/todoparser.cpp @@ -47,7 +47,7 @@ TodoThread::TodoThread(const QString& filename, QObject *parent): QThread(parent void TodoThread::run() { PSynHighlighter highlighter = highlighterManager.getCppHighlighter(); - emit parseStarted(); + emit parseStarted(mFilename); auto action = finally([this]{ emit parseFinished(); }); diff --git a/RedPandaIDE/widgets/bookmarkmodel.cpp b/RedPandaIDE/widgets/bookmarkmodel.cpp new file mode 100644 index 00000000..0c8462e8 --- /dev/null +++ b/RedPandaIDE/widgets/bookmarkmodel.cpp @@ -0,0 +1,6 @@ +#include "bookmarkmodel.h" + +BookmarkModel::BookmarkModel(QObject* parent):QAbstractItemModel(parent) +{ + +} diff --git a/RedPandaIDE/widgets/bookmarkmodel.h b/RedPandaIDE/widgets/bookmarkmodel.h new file mode 100644 index 00000000..00831659 --- /dev/null +++ b/RedPandaIDE/widgets/bookmarkmodel.h @@ -0,0 +1,13 @@ +#ifndef BOOKMARKMODEL_H +#define BOOKMARKMODEL_H + +#include + +class BookmarkModel : public QAbstractItemModel +{ + Q_OBJECT +public: + BookmarkModel(QObject* parent=nullptr); +}; + +#endif // BOOKMARKMODEL_H