X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=src%2Ffilenaming.h;h=d8183ac61021437e84fa1eb7f9f73bfbd3c0db91;hb=f64ec59e63bc8379b80393ff7c8e241e448e8234;hp=d2f094458d03d62bff583e796b4991afe726af71;hpb=8fda608e8809c2b5c1b0db2a10e6099b73759ce8;p=harmattan%2Fcameraplus diff --git a/src/filenaming.h b/src/filenaming.h index d2f0944..d8183ac 100644 --- a/src/filenaming.h +++ b/src/filenaming.h @@ -3,7 +3,7 @@ /*! * This file is part of CameraPlus. * - * Copyright (C) 2012 Mohammed Sameer + * Copyright (C) 2012-2013 Mohammed Sameer * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -28,24 +28,42 @@ class FileNaming : public QObject { Q_OBJECT - Q_PROPERTY(QString imageSuffix WRITE setImageSuffix); - Q_PROPERTY(QString videoSuffix WRITE setVideoSuffix); + Q_PROPERTY(QString imageSuffix READ imageSuffix WRITE setImageSuffix NOTIFY imageSuffixChanged); + Q_PROPERTY(QString videoSuffix READ videoSuffix WRITE setVideoSuffix NOTIFY videoSuffixChanged); + Q_PROPERTY(QString path READ path CONSTANT); public: FileNaming(QObject *parent = 0); ~FileNaming(); + QString imageSuffix() const; void setImageSuffix(const QString& suffix); + + QString videoSuffix() const; void setVideoSuffix(const QString& suffix); Q_INVOKABLE QString imageFileName(); Q_INVOKABLE QString videoFileName(); + Q_INVOKABLE QString temporaryVideoFileName(); + + QString path(); + QString temporaryPath(); + +signals: + void imageSuffixChanged(); + void videoSuffixChanged(); private: QString fileName(const QString& suffix); + QString canonicalPath(const QString& path); QString m_image; QString m_video; + QString m_path; + QString m_temp; + + QString m_date; + int m_index; }; #endif /* FILE_NAMING_H */