hlp:荆州版本
This commit is contained in:
+73
-73
@@ -1,73 +1,73 @@
|
||||
/*
|
||||
* zkWidget.h
|
||||
*
|
||||
* Created on: Jul 2, 2013
|
||||
* Author: yiyu
|
||||
* QQ:1036184468
|
||||
* Descriptoin:
|
||||
|
||||
*/
|
||||
|
||||
#ifndef ZKWIDGET_H_
|
||||
#define ZKWIDGET_H_
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QBrush>
|
||||
#include <QRect>
|
||||
#include <QImage>
|
||||
#include <QMouseEvent>
|
||||
#include <QColor>
|
||||
#include <QRgb>
|
||||
#define MAX_PIC_WIDGET_HEIGHT 256
|
||||
#define MAX_PIC_WIDGET_WIDTH 256
|
||||
class zkWidget:public QWidget{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit zkWidget(QWidget *parent = 0);
|
||||
~zkWidget();
|
||||
|
||||
void resizeWidget(int w,int h);
|
||||
void initWidget(int w,int h);
|
||||
//void loadImage(QString filename,bool forceSize = true);
|
||||
void loadImage(QString filename,bool forceSize = true ,QString charStr = "",QFont *font = 0);
|
||||
void saveImage(QString filename);
|
||||
void enlargeDisplay();
|
||||
void reduceDisplay();
|
||||
void setScale(int scale);
|
||||
|
||||
void paintEvent(QPaintEvent *);
|
||||
void mousePressEvent ( QMouseEvent * event );
|
||||
|
||||
//void currPositionMove(int shiftX,int shiftY);
|
||||
void currPositionMove(int shiftX,int shiftY,bool moveAllPic,bool trimPic,bool expandPic);
|
||||
void ensureCurrPos();
|
||||
int getScaleValue();
|
||||
bool isModified();
|
||||
|
||||
|
||||
int getHeight();
|
||||
int getWidth();
|
||||
|
||||
Q_SIGNALS:
|
||||
void picWidgetModify(int w,int h);
|
||||
|
||||
private:
|
||||
unsigned char pointMap[MAX_PIC_WIDGET_HEIGHT * MAX_PIC_WIDGET_WIDTH];
|
||||
int heightPoint;
|
||||
int widthPoint;
|
||||
int scale;
|
||||
|
||||
int currXpos;
|
||||
int currYpos;
|
||||
bool modified;
|
||||
void setModified(bool m);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /* PICWIDGET_H_ */
|
||||
/*
|
||||
* zkWidget.h
|
||||
*
|
||||
* Created on: Jul 2, 2013
|
||||
* Author: yiyu
|
||||
* QQ:1036184468
|
||||
* Descriptoin:
|
||||
|
||||
*/
|
||||
|
||||
#ifndef ZKWIDGET_H_
|
||||
#define ZKWIDGET_H_
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include <QPainter>
|
||||
#include <QPen>
|
||||
#include <QBrush>
|
||||
#include <QRect>
|
||||
#include <QImage>
|
||||
#include <QMouseEvent>
|
||||
#include <QColor>
|
||||
#include <QRgb>
|
||||
#define MAX_PIC_WIDGET_HEIGHT 256
|
||||
#define MAX_PIC_WIDGET_WIDTH 256
|
||||
class zkWidget:public QWidget{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit zkWidget(QWidget *parent = 0);
|
||||
~zkWidget();
|
||||
|
||||
void resizeWidget(int w,int h);
|
||||
void initWidget(int w,int h);
|
||||
//void loadImage(QString filename,bool forceSize = true);
|
||||
void loadImage(QString filename,bool forceSize = true ,QString charStr = "",QFont *font = 0);
|
||||
void saveImage(QString filename);
|
||||
void enlargeDisplay();
|
||||
void reduceDisplay();
|
||||
void setScale(int scale);
|
||||
|
||||
void paintEvent(QPaintEvent *);
|
||||
void mousePressEvent ( QMouseEvent * event );
|
||||
|
||||
//void currPositionMove(int shiftX,int shiftY);
|
||||
void currPositionMove(int shiftX,int shiftY,bool moveAllPic,bool trimPic,bool expandPic);
|
||||
void ensureCurrPos();
|
||||
int getScaleValue();
|
||||
bool isModified();
|
||||
|
||||
|
||||
int getHeight();
|
||||
int getWidth();
|
||||
|
||||
Q_SIGNALS:
|
||||
void picWidgetModify(int w,int h);
|
||||
|
||||
private:
|
||||
unsigned char pointMap[MAX_PIC_WIDGET_HEIGHT * MAX_PIC_WIDGET_WIDTH];
|
||||
int heightPoint;
|
||||
int widthPoint;
|
||||
int scale;
|
||||
|
||||
int currXpos;
|
||||
int currYpos;
|
||||
bool modified;
|
||||
void setModified(bool m);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif /* PICWIDGET_H_ */
|
||||
|
||||
Reference in New Issue
Block a user