Selecting thumbnails
This commit is contained in:
+13
-9
@@ -14,14 +14,12 @@
|
||||
#include "rawimage.h"
|
||||
#include "imageringlist.h"
|
||||
|
||||
typedef enum
|
||||
struct ImageThumb
|
||||
{
|
||||
Linear,
|
||||
Log,
|
||||
Sqrt,
|
||||
Power,
|
||||
Asinh,
|
||||
}StretchFunc;
|
||||
QString name;
|
||||
QSize size;
|
||||
bool selected;
|
||||
};
|
||||
|
||||
class ImageWidget : public QOpenGLWidget
|
||||
{
|
||||
@@ -52,8 +50,9 @@ class ImageWidget : public QOpenGLWidget
|
||||
bool m_invert;
|
||||
bool m_superpixel;
|
||||
bool m_showThumbnails;
|
||||
bool m_selecting;
|
||||
int m_thumbnailCount;
|
||||
QStringList m_Names;
|
||||
QVector<ImageThumb> m_thumnails;
|
||||
public:
|
||||
explicit ImageWidget(QWidget *parent = nullptr);
|
||||
~ImageWidget();
|
||||
@@ -61,7 +60,7 @@ public:
|
||||
void setImage(const QPixmap &pixmap);
|
||||
void setScale(float scale);
|
||||
void blockRepaint(bool block);
|
||||
void allocateThumbnails(const QStringList &&names);
|
||||
void allocateThumbnails(const QStringList &names);
|
||||
public slots:
|
||||
void setMTFParams(float low, float mid, float high);
|
||||
void setOffset(int dx, int dy);
|
||||
@@ -76,8 +75,13 @@ protected:
|
||||
void initializeGL();
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
void dropEvent(QDropEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void thumbSelect(QMouseEvent *event);
|
||||
signals:
|
||||
void fileDropped(const QString &path);
|
||||
void thumbSelected(int index);
|
||||
};
|
||||
|
||||
class ImageScrollAreaGL : public QWidget
|
||||
|
||||
Reference in New Issue
Block a user