initial commit
This commit is contained in:
34
client/gui/dialogs/ImageCropDialog.h
Normal file
34
client/gui/dialogs/ImageCropDialog.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <QDialog>
|
||||
#include <QImage>
|
||||
#include <QRect>
|
||||
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
|
||||
class ImageCropDialog final : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ImageCropDialog(const QString& imagePath, QWidget* parent = nullptr);
|
||||
|
||||
bool hasValidSelection() const;
|
||||
QRect selectedRectInImagePixels() const;
|
||||
|
||||
private slots:
|
||||
void onReset();
|
||||
void onOk();
|
||||
|
||||
private:
|
||||
void loadImageOrClose();
|
||||
void rebuildUi();
|
||||
|
||||
private:
|
||||
class CropView;
|
||||
CropView* m_view = nullptr;
|
||||
QPushButton* m_okButton = nullptr;
|
||||
|
||||
QString m_imagePath;
|
||||
QImage m_image;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user