17 #ifndef CNTIMAGEUTILITY_H |
17 #ifndef CNTIMAGEUTILITY_H |
18 #define CNTIMAGEUTILITY_H |
18 #define CNTIMAGEUTILITY_H |
19 |
19 |
20 #include <qglobal.h> |
20 #include <qglobal.h> |
21 #include <QObject> |
21 #include <QObject> |
|
22 |
|
23 #include <f32file.h> |
|
24 |
22 #include "cntimageutilityglobal.h" |
25 #include "cntimageutilityglobal.h" |
23 |
26 |
24 class QPixmap; |
27 class QPixmap; |
25 |
28 |
26 class CNTIMAGEUTILITYLIB_EXPORT CntImageUtility : public QObject |
29 class CNTIMAGEUTILITYLIB_EXPORT CntImageUtility : public QObject |
27 { |
30 { |
28 Q_OBJECT |
31 Q_OBJECT |
29 |
32 |
30 public: |
33 public: |
|
34 enum Error { |
|
35 NoError = 0, |
|
36 NotSupportedError, |
|
37 UnspecifiedError, |
|
38 }; |
|
39 |
31 CntImageUtility(QObject *parent = 0); |
40 CntImageUtility(QObject *parent = 0); |
32 ~CntImageUtility(); |
41 ~CntImageUtility(); |
33 |
42 |
34 bool createImage(const QString& filePath, QString& imagePath, int& error); |
43 bool createImage(const QString& filePath, QString& imagePath); |
35 bool createImage(const QPixmap& pixmap, QString& imagePath, int& error); |
44 bool createImage(const QPixmap& pixmap, QString& imagePath); |
36 bool removeImage(const QString& imagePath, int& error); |
45 bool removeImage(const QString& imagePath); |
|
46 bool isImageRemovable(const QString& filePath); |
|
47 bool isMassStorageAvailable(); |
|
48 CntImageUtility::Error error(); |
37 |
49 |
38 private: |
50 private: |
39 int selectDrive(int &driveIndex); |
51 int selectDrive(int &driveIndex); |
40 void initPath(QString &path, int drive); |
52 bool initPath(QString &path, int drive); |
|
53 |
|
54 private: |
|
55 RFs m_Fs; |
|
56 CntImageUtility::Error m_error; |
41 }; |
57 }; |
42 |
58 |
43 #endif |
59 #endif |