feat: 添加ElaWidgetTool库
This commit is contained in:
38
ElaWidgetTools/private/ElaToolTipPrivate.h
Normal file
38
ElaWidgetTools/private/ElaToolTipPrivate.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef ELATOOLTIPPRIVATE_H
|
||||
#define ELATOOLTIPPRIVATE_H
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include "ElaDef.h"
|
||||
class ElaToolTip;
|
||||
class QVBoxLayout;
|
||||
class ElaText;
|
||||
class ElaToolTipPrivate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_D_CREATE(ElaToolTip)
|
||||
Q_PROPERTY_CREATE_D(int, BorderRadius)
|
||||
Q_PROPERTY_CREATE_D(int, DisplayMsec)
|
||||
Q_PROPERTY_CREATE_D(int, ShowDelayMsec)
|
||||
Q_PROPERTY_CREATE_D(int, HideDelayMsec)
|
||||
Q_PROPERTY_CREATE_D(QString, ToolTip)
|
||||
Q_PROPERTY_CREATE_D(QWidget*, CustomWidget)
|
||||
Q_PROPERTY_CREATE(qreal, Opacity)
|
||||
|
||||
public:
|
||||
explicit ElaToolTipPrivate(QObject* parent = nullptr);
|
||||
~ElaToolTipPrivate() override;
|
||||
|
||||
protected:
|
||||
virtual bool eventFilter(QObject* watched, QEvent* event);
|
||||
|
||||
private:
|
||||
ElaText* _toolTipText{nullptr};
|
||||
QVBoxLayout* _mainLayout{nullptr};
|
||||
ElaThemeType::ThemeMode _themeMode;
|
||||
int _shadowBorderWidth{6};
|
||||
void _doShowAnimation();
|
||||
void _updatePos();
|
||||
};
|
||||
|
||||
#endif // ELATOOLTIPPRIVATE_H
|
||||
Reference in New Issue
Block a user