61 lines
1.1 KiB
C++
Executable File
61 lines
1.1 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QMainWindow>
|
|
|
|
namespace Ui
|
|
{
|
|
class PictureEditing;
|
|
}
|
|
|
|
namespace LtsWidgets{
|
|
class LtsPictureView;
|
|
}
|
|
|
|
|
|
class LtsPictureEditing : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit LtsPictureEditing(QWidget *parent = nullptr);
|
|
~LtsPictureEditing();
|
|
|
|
private:
|
|
QImage m_grayImage;
|
|
QImage m_image;
|
|
|
|
LtsWidgets::LtsPictureView *m_gvPicture;
|
|
|
|
Ui::PictureEditing *m_ui;
|
|
|
|
private:
|
|
void setSpinboxLimits(const QSize &picSize, bool setValues = true);
|
|
void clear();
|
|
void addViewToFrame();
|
|
void initRatio();
|
|
|
|
private slots:
|
|
void onOpenImage();
|
|
void onSetSize();
|
|
void setSpinboxValues(const QRect &picRect);
|
|
void onRatioChanged();
|
|
void onRatioClicked();
|
|
void onSavePicture();
|
|
void onLeftChanged(int left);
|
|
void onRightChanged(int right);
|
|
void onTopChanged(int top);
|
|
void onBottomChanged(int bottom);
|
|
|
|
signals:
|
|
void setPicture(const QImage &, const QPoint &, const bool flag);
|
|
void setAspectRatio(double ratio);
|
|
void ratioClicked(bool enabled);
|
|
int leftChanged(int left);
|
|
int rightChanged(int right);
|
|
int topChanged(int top);
|
|
int bottomChanged(int bottom);
|
|
};
|