mirror of
https://github.com/seiichiro0185/sailotp.git
synced 2024-11-14 05:16:42 +00:00
Stefan Brand
8725b13639
Added URL-decoding for OTP-titles when scanning QR-codes. Fixes github issue #4
35 lines
683 B
C++
35 lines
683 B
C++
#ifndef FILEIO_H
|
|
#define FILEIO_H
|
|
|
|
#include <QObject>
|
|
|
|
class FileIO : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Q_PROPERTY(QString source
|
|
READ source
|
|
WRITE setSource
|
|
NOTIFY sourceChanged)
|
|
explicit FileIO(QObject *parent = 0);
|
|
|
|
Q_INVOKABLE QString read();
|
|
Q_INVOKABLE bool write(const QString& data);
|
|
Q_INVOKABLE bool exists();
|
|
Q_INVOKABLE bool exists(const QString& filename);
|
|
|
|
QString source() { return mSource; };
|
|
|
|
public slots:
|
|
void setSource(const QString& source) { mSource = source; };
|
|
|
|
signals:
|
|
void sourceChanged(const QString& source);
|
|
void error(const QString& msg);
|
|
|
|
private:
|
|
QString mSource;
|
|
};
|
|
|
|
#endif // FILEIO_H
|