Add thumbnails
This commit is contained in:
+12
-1
@@ -17,22 +17,29 @@ class Image : public QObject
|
||||
bool m_loading;
|
||||
bool m_released;
|
||||
bool m_current;
|
||||
int m_number;
|
||||
std::unique_ptr<RawImage> m_rawImage;
|
||||
std::unique_ptr<RawImage> m_thumbnail;
|
||||
QString m_name;
|
||||
ImageInfoData m_info;
|
||||
ImageRingList *m_ringList;
|
||||
public:
|
||||
explicit Image(const QString name, ImageRingList *ringList);
|
||||
explicit Image(const QString name, int number, ImageRingList *ringList);
|
||||
void load();
|
||||
void loadThumbnail();
|
||||
void release();
|
||||
QString name() const;
|
||||
RawImage* rawImage();
|
||||
const RawImage* thumbnail() const;
|
||||
ImageInfoData info() const;
|
||||
bool isCurrent() const;
|
||||
int number() const;
|
||||
signals:
|
||||
void pixmapLoaded(Image *ptr);
|
||||
void thumbnailLoaded(Image *ptr);
|
||||
protected slots:
|
||||
void imageLoaded(void *rawImage, ImageInfoData info);
|
||||
void thumbnailLoadFinish(void *rawImage);
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<Image> ImagePtr;
|
||||
@@ -62,6 +69,9 @@ public:
|
||||
void setFindStars(bool findStars);
|
||||
AnalyzeLevel analyzeLevel() const;
|
||||
void loadFile(int row);
|
||||
void loadThumbnails();
|
||||
void stopLoading();
|
||||
int imageCount() const;
|
||||
|
||||
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
|
||||
QModelIndex parent(const QModelIndex &child) const override;
|
||||
@@ -75,6 +85,7 @@ protected:
|
||||
QList<ImagePtr>::iterator decrement(QList<ImagePtr>::iterator iter);
|
||||
signals:
|
||||
void pixmapLoaded(Image *image);
|
||||
void thumbnailLoaded(Image *image);
|
||||
void infoLoaded(ImageInfoData info);
|
||||
void currentImageChanged(int index);
|
||||
protected slots:
|
||||
|
||||
Reference in New Issue
Block a user