#include "widget.h"Widget::Widget():
BigButton("放大",this),
LittleButton("缩小",this),
LiftButton("向左",this),
RightButton("向右",this),
UpButton("向上",this),
DownButton("向下",this),
Paint(10,10,810,810),
Alloffset(0,0),
label("100%",this)
{
ratio= 1.0; //初始化图片缩放比例
action =Widget::None;
pixW= 985; //设置图片尺寸为985*740
pixH = 740;
BigButton.setGeometry(822,10,60,25);
connect(&BigButton,SIGNAL(clicked()),this,SLOT(onBigClicked()));
LittleButton.setGeometry(822,40,60,25);
connect(&LittleButton,SIGNAL(clicked()),this,SLOT(onLittleClicked()));
LiftButton.setGeometry(822,70,60,25);
connect(&LiftButton,SIGNAL(clicked()),this,SLOT(OnLiftClicked()));
RightButton.setGeometry(822,100,60,25)