@@ -86,6 +86,10 @@ class PLUGIN_EXPORT CDatabaseIcon : public CDatabase
8686 QString m_szTableName;
8787};
8888
89+ /* !
90+ * \brief The CDatabaseFile class
91+ * \note The file field is filename, don't include path.
92+ */
8993class PLUGIN_EXPORT CDatabaseFile : public CDatabase
9094{
9195 Q_OBJECT
@@ -94,15 +98,26 @@ class PLUGIN_EXPORT CDatabaseFile : public CDatabase
9498 explicit CDatabaseFile (QObject* parent = nullptr );
9599 explicit CDatabaseFile (const QString& szPrefix, QObject *parent = nullptr );
96100
101+ /* !
102+ * \brief Load
103+ * \param szFile: the file path
104+ * \note The file field in database is filename, don't include path.
105+ */
97106 QByteArray Load (const QString &szFile);
107+ /* !
108+ * \brief Save
109+ * \param szFile: the file path
110+ * \note The file field in database is filename, don't include path.
111+ */
98112 bool Save (const QString& szFile);
99113
100114 virtual bool ExportToJson (QJsonObject &obj) override ;
101115 virtual bool ImportFromJson (const QJsonObject &obj) override ;
102116
103117 static bool ExportFileToJson (const QString &szFile, QJsonObject &obj);
104118 static bool ImportFileFromJson (const QJsonObject &obj, QString &szFile);
105-
119+ bool ImportFileToDatabaseFromJson (const QJsonObject &obj, QString &szFile);
120+
106121protected:
107122 virtual bool OnInitializeSqliteDatabase () override ;
108123 virtual bool OnInitializeMySqlDatabase () override ;
0 commit comments