49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#ifndef FILEITEM_H
|
|
#define FILEITEM_H
|
|
|
|
#include <QObject>
|
|
#include <QImage>
|
|
#include <QString>
|
|
|
|
// 文件条目项
|
|
class FileItem : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit FileItem(QObject *parent = NULL);
|
|
FileItem(const FileItem & item);
|
|
~FileItem();
|
|
public:
|
|
FileItem &operator=(const FileItem & item);
|
|
|
|
public:
|
|
void clear();
|
|
private:
|
|
void copyData(const FileItem & item);
|
|
|
|
public:
|
|
#if (1)
|
|
void setFileInfo(QString & path, QString & show, QImage & previewImg);
|
|
#else
|
|
void setFileInfo(QString path, QString show, QImage previewImg);
|
|
#endif
|
|
void setFileInfo(QString path, QString show, QString imagePath);
|
|
|
|
public:
|
|
inline const QString & getFilePath() const {return m_filePathName;} // 文件路径
|
|
inline const QString & getShowInfo() const {return m_showInfo;} // 显示信息
|
|
inline const QString & getImagePath() const {return m_imagePath;} // 图片路径
|
|
inline const QImage & getPreviewImage() const {return m_previewImage;} // 图形预览
|
|
private:
|
|
QImage m_previewImage; // 图形预览
|
|
QString m_filePathName; // 文件路径名称
|
|
QString m_imagePath; // 图片路径
|
|
QString m_showInfo; // 显示信息(文件名称)
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
};
|
|
|
|
#endif // FILEITEM_H
|