VHISTlib
1.84.0.3018
|
00001 /* $HEADERS 00002 $Id: wsfile.h 2179 2011-06-24 09:03:24Z ahuesgen $ 00003 */ 00004 00005 #ifndef FILE_INCLUDED 00006 #define FILE_INCLUDED 00007 00008 #include "../shared/misc_defines.h" 00009 00010 #include <QString> 00011 #include <QDir> 00012 #include <QList> 00013 #include <QHash> 00014 00015 00016 namespace vhist 00017 { 00018 00023 class VHIST_EXTERN WSFile 00024 { 00025 public: 00029 enum FilePurpose 00030 { 00032 INPUT_FILE, 00034 OUTPUT_FILE 00035 }; 00036 00037 public: // construction and destruction 00038 WSFile(); 00039 WSFile(const WSFile& rhs); 00040 00041 public: // comparison 00042 bool operator==(const WSFile& rhs); 00043 bool operator!=(const WSFile& rhs); 00044 00045 public: // main functionality 00046 QString toCommandline(bool supportVariables = true); 00047 00048 public: // getter/setter 00049 QString filetype() const; 00050 void setFiletype(const QString& filetype); 00051 00052 QString filename() const; 00053 void setFilename(const QString& filename); 00054 00055 QString filepath() const; 00056 void setFilepath(const QString& filepath); 00057 00058 void setFilenameAndPath (const QString& file); 00059 00060 bool optional() const; 00061 void setOptional(bool optional); 00062 00063 bool compress() const; 00064 void setCompress(bool compress); 00065 00066 bool inputFile() const; 00067 void setInputFile(bool isInputFile); 00068 00069 FilePurpose filePurpose() const; 00070 void setFilePurpose(const FilePurpose& purpose); 00071 00072 QString description() const; 00073 void setDescription(const QString& description); 00074 00075 QString comment() const; 00076 void setComment(const QString& comment); 00077 00078 bool embed() const; 00079 void setEmbed(bool embed); 00080 00081 bool autoMD5() const; 00082 void setAutoMD5(bool compress); 00083 00084 QString md5File() const; 00085 void setMD5File(const QString& file); 00086 00087 bool previewWS() const; 00088 void setPreviewWS(bool previewWS); 00089 00090 bool preview() const; 00091 void setPreview(bool preview); 00092 00093 bool thumbnail() const; 00094 void setThumbnail(bool thumbnail); 00095 00096 bool thumbnailOnly() const; 00097 void setThumbnailOnly(bool thumbnailOnly); 00098 00099 void clearUserAttributes(); 00100 void addUserAttribute(const QString& key, const QString& value); 00101 QStringList userAttributeKeys() const; 00102 QString userAttribute(const QString& key) const; 00103 00104 private: 00105 QString m_filetype; 00106 QString m_filename; 00107 QString m_filepath; 00108 QString m_md5File; 00109 00110 bool m_md5; 00111 bool m_embed; 00112 bool m_optional; 00113 bool m_compress; 00114 bool m_previewws; 00115 bool m_preview; 00116 bool m_thumbnail; 00117 bool m_thumbnailOnly; 00118 00119 FilePurpose m_filePurpose; 00120 QString m_description; 00121 QString m_comment; 00122 QHash<QString, QString> m_userAttributes; 00123 QStringList m_userAttributesOrder; 00124 }; 00125 00126 } 00127 00128 #endif // FILE_INCLUDED 00129