-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilemanager.h
40 lines (34 loc) · 1.18 KB
/
filemanager.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
#ifndef FILEMANAGER_H
#define FILEMANAGER_H
#include <QObject>
#include <QFileDialog>
///////////////////////////////////////////////////////////////////////////////
namespace baadraan {
///////////////////////////////////////////////////////////////////////////////
class CustomFileDialog:public QFileDialog{
public:
CustomFileDialog();
};
class FileManager : public QObject
{
Q_OBJECT
public:
FileManager();
Q_INVOKABLE bool readFiles(const QStringList& filesPathList);
Q_INVOKABLE bool writeToFile(const QString& path, const QString data);
Q_INVOKABLE QString formatDescription(const QString& des);
Q_INVOKABLE QString openSaveDialog(QString name);
Q_INVOKABLE QString getOpenedFilePath();
void setOpenedFilePaht(const QString& filepath);
signals:
void newElement(QString acNumber, double money);
void readError(QStringList readErrors);
private:
QString m_description;
QString m_openFilePath = "";
CustomFileDialog m_saveFileDialog;
};
///////////////////////////////////////////////////////////////////////////////
} // namespace baadraan
///////////////////////////////////////////////////////////////////////////////
#endif // FILEMANAGER_H