2023-05-24 02:58:44 +00:00
|
|
|
|
#ifndef CUTPAPERTOOL_H
|
|
|
|
|
#define CUTPAPERTOOL_H
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
#include "cutdialog.h"
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class CutPaperTool;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class CutPaperTool : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2023-07-10 06:18:54 +00:00
|
|
|
|
explicit CutPaperTool(int d, const QString& t, int w, int unit, QWidget *parent = nullptr);
|
2023-05-24 02:58:44 +00:00
|
|
|
|
~CutPaperTool();
|
|
|
|
|
QRectF getCutRectPixel();
|
2023-07-10 06:18:54 +00:00
|
|
|
|
void setCutRectPixel(QRectF& rect);
|
2023-05-24 02:58:44 +00:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void paintEvent(QPaintEvent *);
|
|
|
|
|
void setSizeLabel();
|
2023-07-10 06:18:54 +00:00
|
|
|
|
void setSizeInit();
|
2023-05-24 02:58:44 +00:00
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
void cutRectXSlot(double x);
|
|
|
|
|
void cutRectYSlot(double y);
|
|
|
|
|
void cutRectWidthSlot(double w);
|
|
|
|
|
void cutRectHeightSlot(double h);
|
|
|
|
|
void lineEditEnableSlot(bool b);
|
|
|
|
|
|
|
|
|
|
void on_startXEdt_textEdited(QString arg1);
|
|
|
|
|
|
|
|
|
|
void on_startYEdt_textEdited(QString arg1);
|
|
|
|
|
|
|
|
|
|
void on_rectWidth_textEdited(QString arg1);
|
|
|
|
|
|
|
|
|
|
void on_rectHeight_textEdited(QString arg1);
|
|
|
|
|
|
|
|
|
|
void on_comboBox_2_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
|
|
void on_buttonBox_accepted();
|
|
|
|
|
|
|
|
|
|
void on_buttonBox_rejected();
|
|
|
|
|
|
|
|
|
|
void on_pbtn_init_clicked();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Ui::CutPaperTool *ui;
|
|
|
|
|
SIZETYPE type;
|
|
|
|
|
int dpi;
|
|
|
|
|
QString paperType;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // CUTPAPERTOOL_H
|