Index: sources/view/settings/VSDCardFilesModel.h =================================================================== diff -u -ra53bdf104b52cae3a49705a4cc8bd886530084c9 -r61f87c52ccba9ce140fd8039915e025b6c790575 --- sources/view/settings/VSDCardFilesModel.h (.../VSDCardFilesModel.h) (revision a53bdf104b52cae3a49705a4cc8bd886530084c9) +++ sources/view/settings/VSDCardFilesModel.h (.../VSDCardFilesModel.h) (revision 61f87c52ccba9ce140fd8039915e025b6c790575) @@ -17,6 +17,7 @@ // Qt #include #include +#include // Project #include "main.h" @@ -36,15 +37,13 @@ * References: https://doc.qt.io/qt-5.12/qtquick-modelviewsdata-cppmodels.html * */ + +// TODO need to rename to a more generic and derive for USB case too class VSDCardFilesModel : public QAbstractListModel { Q_OBJECT int _interval = 1000; - - PROPERTY(QString , fileName , "") - PROPERTY(qint64 , fileSize , 0) - public: // Note: VIEW_DEC_CLASS(VSDCardFilesModel) requires QObject as the parent, so it's necessary to define it here // Otherwise a VIEW_DEC_CLASS macro could allow specifying the parent class with QObject as the default @@ -54,6 +53,8 @@ FilePathRole = Qt::UserRole + 1 , FileNameRole , FileSizeRole , + FileLogTypeRole , + FileModificationDateTimeRole , }; void addSDCardFile (const SDCardFileData &vFileData); @@ -68,12 +69,13 @@ private: void initConnections(); - void clearSelectedNetwork(); + void populateLogModel(); + void resetModel(); QList _sdCardFiles; private slots: - void onAddSDCardFile(const SDCardFileData &vFileData); -// void updateList(const QString &vPathChanged); + void onWatchDirectoryChange(const QString &vDirectory); + void onTotalModelRefresh(bool vIsStrillProcessing); }; }