95 lines
3.1 KiB
C
95 lines
3.1 KiB
C
|
|
#ifndef PATTERNNEEDLELAYOUTWIDGET_H
|
|||
|
|
#define PATTERNNEEDLELAYOUTWIDGET_H
|
|||
|
|
|
|||
|
|
#include <QWidget>
|
|||
|
|
#include <QPushButton>
|
|||
|
|
#include "main.h"
|
|||
|
|
#include "datafile/datafiledst.h"
|
|||
|
|
#include "datafile/datafiledsr.h"
|
|||
|
|
#include "datafile/datafilequi.h"
|
|||
|
|
#include "datafile/datafilequix.h"
|
|||
|
|
#include "sharedviews/numerinputdialog.h"
|
|||
|
|
#include "datafile/embdata.h"
|
|||
|
|
#include "sharedviews/promptdialog.h"
|
|||
|
|
|
|||
|
|
namespace Ui {
|
|||
|
|
class PatternNeedleLayoutWidget;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
class PatternNeedleLayoutWidget : public QWidget
|
|||
|
|
{
|
|||
|
|
Q_OBJECT
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
explicit PatternNeedleLayoutWidget(QWidget *parent = 0);
|
|||
|
|
~PatternNeedleLayoutWidget();
|
|||
|
|
|
|||
|
|
private slots:
|
|||
|
|
void on_pushButtonNone_clicked();
|
|||
|
|
void on_pushButtonLeft_clicked();
|
|||
|
|
void on_pushButtonRight_clicked();
|
|||
|
|
void on_buttonCircle_clicked();
|
|||
|
|
void on_buttonOk_clicked();
|
|||
|
|
void on_buttonCancel_clicked();
|
|||
|
|
void slotNeedleBtnClicked();
|
|||
|
|
void on_pushButtonLRSpace_clicked();
|
|||
|
|
void on_pushButtonNSpace_clicked();
|
|||
|
|
void on_pushButton12Space_clicked();
|
|||
|
|
void on_pushButton23Space_clicked();
|
|||
|
|
|
|||
|
|
public slots:
|
|||
|
|
void on_buttonClear_clicked();
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
Ui::PatternNeedleLayoutWidget *ui;
|
|||
|
|
QList<QPushButton*> m_NeedleBtnList;
|
|||
|
|
EmbData *m_pCurEmbData;
|
|||
|
|
QString m_filePath;
|
|||
|
|
|
|||
|
|
double m_leftRightNeedleSpace;//左右针间距,1/4英寸,6.35mm
|
|||
|
|
double m_needlesSpace;//左针与左针(或右针与右针)之间间距,1英寸,25.4mm
|
|||
|
|
double m_needleLayoutSpace12;//1、2针排间距,3英寸,76.2mm
|
|||
|
|
double m_needleLayoutSpace23;//2、3针排间距,3英寸,76.2mm
|
|||
|
|
int m_btnSelect;//1-12前排按钮选中,13-24中排按钮选中,25-36后排按钮选中
|
|||
|
|
|
|||
|
|
unsigned char m_arrayNeedle1[LAYOUTNEEDLENUM]; // 第1排排针
|
|||
|
|
unsigned char m_arrayNeedle2[LAYOUTNEEDLENUM]; // 第2排排针
|
|||
|
|
unsigned char m_arrayNeedle3[LAYOUTNEEDLENUM]; // 第3排排针
|
|||
|
|
|
|||
|
|
double m_newLRSpaceValue;
|
|||
|
|
double m_newNSpaceValue;
|
|||
|
|
double m_new12SpaceValue;
|
|||
|
|
double m_new23SpaceValue;
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
void refreshNeedleText();
|
|||
|
|
void setButtonStyleForSilverBorder(QPushButton *button);
|
|||
|
|
void selectNextBtn();//选中下一个按钮
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
void showView(QString filePath,QByteArray absAry);
|
|||
|
|
void showTempView(QByteArray &dat);
|
|||
|
|
void refreshView(s16 idx = 0);
|
|||
|
|
void refreshSpace();
|
|||
|
|
|
|||
|
|
inline int getLeftRightNeedleSpace(){return m_leftRightNeedleSpace;}
|
|||
|
|
inline int getNeedleLayoutSpace12(){return m_needleLayoutSpace12;}
|
|||
|
|
inline int getNeedleLayoutSpace23(){return m_needleLayoutSpace23;}
|
|||
|
|
inline int getNeedlesSpace(){return m_needlesSpace;}
|
|||
|
|
inline unsigned char* getarrayNeedle1(){return m_arrayNeedle1;}
|
|||
|
|
inline unsigned char* getarrayNeedle2(){return m_arrayNeedle2;}
|
|||
|
|
inline unsigned char* getarrayNeedle3(){return m_arrayNeedle3;}
|
|||
|
|
|
|||
|
|
void initResolution();
|
|||
|
|
void initControlStyle();
|
|||
|
|
void setButtonColorForSkyBlue(QPushButton *button);
|
|||
|
|
void setButtonStyle(QPushButton *button);
|
|||
|
|
void setOrangeButtonStyleSettingsIcon(QPushButton *button);
|
|||
|
|
int returnMinimumSize(QPushButton *button);
|
|||
|
|
|
|||
|
|
signals:
|
|||
|
|
void siPatternNeedlePreview();//花样排针预览后点击确定按钮
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
#endif // PATTERNNEEDLELAYOUTWIDGET_H
|