qt/LedOK/oescreenshot/oecommonhelper.h

129 lines
3.4 KiB
C
Raw Normal View History

2023-04-18 14:14:46 +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 COMMONHELPER_H
#define COMMONHELPER_H
#include <QString>
#include <QRect>
class QWidget;
/**
* @class : OECommonHelper
* @brief :
* @note :
*/
class OECommonHelper
{
public:
/**
* @brief : QSS文件
* @param : style
* @author:
* @date : 20170410
* @remark: qrc路径 qrc:/
**/
static void setStyle(const QString &style);
/**
* @brief :
* @param : language
* @author:
* @date : 20170410
**/
static void setLanguagePack(const QString& language);
/**
* @brief :
* @param : widget
* @param : parentRect
* @author:
* @date : 20170410
**/
static void moveCenter(QWidget* widget, QRect parentRect = {});
/**
* @brief :
* @return: float
* @author:
* @date : 20170410
**/
static const float& getWindowWidthMultiplyingPower(void);
/**
* @brief :
* @return: float
* @author:
* @date : 20170410
**/
static const float& getWindowHeightMultiplyingPower(void);
/**
* @brief :
* @param : out_rect ()
* @return: :true
* @author:
* @date : 20170410
**/
static bool getSmallestWindowFromCursor(QRect &out_rect);
/**
* @brief :
* @param : out_rect ()
* @return: :true
* @author:
* @date : 20170410
**/
static bool getCurrentWindowFromCursor(QRect &out_rect);
protected:
/**
* @brief :
* @author:
* @date : 20170410
**/
static void upWindowSizeMultiplyingPower(void);
private:
/// 窗口横向倍率
static float widthMultiplyingPower_;
/// 窗口纵向倍率
static float heightMultiplyingPower_;
};
#endif /// COMMONHELPER_H