Add marking and unmark from thumbnails view
This commit is contained in:
+7
-4
@@ -13,12 +13,15 @@
|
||||
#include <QTimer>
|
||||
#include "rawimage.h"
|
||||
#include "imageringlist.h"
|
||||
#include "database.h"
|
||||
|
||||
struct ImageThumb
|
||||
{
|
||||
QString name;
|
||||
QString path;
|
||||
QSize size;
|
||||
bool selected;
|
||||
bool dirty;
|
||||
};
|
||||
|
||||
class ImageWidget : public QOpenGLWidget
|
||||
@@ -53,14 +56,15 @@ class ImageWidget : public QOpenGLWidget
|
||||
bool m_selecting;
|
||||
int m_thumbnailCount;
|
||||
QVector<ImageThumb> m_thumnails;
|
||||
Database *m_database;
|
||||
public:
|
||||
explicit ImageWidget(QWidget *parent = nullptr);
|
||||
explicit ImageWidget(Database *database, QWidget *parent = nullptr);
|
||||
~ImageWidget() override;
|
||||
void setImage(const RawImage *image, int index);
|
||||
void setImage(const QPixmap &pixmap);
|
||||
void setScale(float scale);
|
||||
void blockRepaint(bool block);
|
||||
void allocateThumbnails(const QStringList &names);
|
||||
void allocateThumbnails(const QStringList &paths);
|
||||
public slots:
|
||||
void setMTFParams(float low, float mid, float high);
|
||||
void setOffset(int dx, int dy);
|
||||
@@ -81,7 +85,6 @@ protected:
|
||||
void thumbSelect(QMouseEvent *event);
|
||||
signals:
|
||||
void fileDropped(const QString &path);
|
||||
void thumbSelected(int index);
|
||||
};
|
||||
|
||||
class ImageScrollAreaGL : public QWidget
|
||||
@@ -96,7 +99,7 @@ class ImageScrollAreaGL : public QWidget
|
||||
bool m_bestFit;
|
||||
int m_thumbCount;
|
||||
public:
|
||||
explicit ImageScrollAreaGL(QWidget *parent = nullptr);
|
||||
explicit ImageScrollAreaGL(Database *database, QWidget *parent = nullptr);
|
||||
~ImageScrollAreaGL() override;
|
||||
void setImage(RawImage *image, int index);
|
||||
ImageWidget* imageWidget();
|
||||
|
||||
Reference in New Issue
Block a user