qt/LedOK/oescreenshot/oeamplifier.h

94 lines
2.2 KiB
C
Raw Normal View History

2022-01-04 18:11:48 +08:00
/**
* @author :
* @date : 201704
* @version: 1.0
* @note : Apache 2.0 ;
* 使
* @remarks:
* http://www.apache.org/licenses/LICENSE-2.0
*
*
*
*
*
*
* https://git.oschina.net/Mr_ChenLuYong/screenshot
*
*
*
*
*
*
* http://blog.csdn.net/csnd_ayo
*
* http://blog.csdn.net/csnd_ayo/article/details/70197915
*
* BugIssues
*
*/
#ifndef OEAMPLIFIER_H
#define OEAMPLIFIER_H
#include <memory>
#include <QWidget>
/**
* @class : OEAmplifier
* @brief :
* @note :
*/
class OEAmplifier : public QWidget
{
Q_OBJECT
public:
explicit OEAmplifier(std::shared_ptr<QPixmap> originPainting, QWidget *parent = 0);
signals:
public slots:
/**
* @brief :
* @param : w
* @param : h
* @date : 2017429
*/
void onSizeChange(int w, int h);
/**
* @brief :
* @param : w
* @param : h
* @date : 2017429
*/
void onPostionChange(int x, int y);
protected:
/**
* @brief :
* @date : 2017429
*/
virtual void paintEvent(QPaintEvent *);
private:
/// 外部组件的大小信息
QSize screenSize_;
/// 鼠标的位置
QPoint cursorPoint_;
/// 取色放大器的边长
int sideLength_;
/// 放大区的高度
int imageHeight_;
/// 屏幕原画
std::shared_ptr<QPixmap> originPainting_;
};
#endif /// OEAMPLIFIER_H