24 #ifndef KLFDISPLAYLABEL_H
25 #define KLFDISPLAYLABEL_H
29 #include <QTemporaryFile>
50 Q_PROPERTY(
bool enableToolTipPreview READ enableToolTipPreview WRITE setEnableToolTipPreview) ;
52 Q_PROPERTY(
QString bigPreviewText READ bigPreviewText) ;
53 Q_PROPERTY(
bool glowEffect READ glowEffect WRITE setGlowEffect) ;
54 Q_PROPERTY(
QColor glowEffectColor READ glowEffectColor WRITE setGlowEffectColor) ;
55 Q_PROPERTY(
int glowEffectRadius READ glowEffectRadius WRITE setGlowEffectRadius) ;
56 Q_PROPERTY(
bool labelEnabled READ labelEnabled WRITE setLabelEnabled) ;
62 virtual DisplayState currentDisplayState()
const {
return pDisplayState; }
70 virtual QSize labelSize()
const {
return size(); }
72 virtual bool enableToolTipPreview()
const {
return pEnableToolTipPreview; }
74 virtual QString bigPreviewText()
const {
return _bigPreviewText; }
76 inline bool glowEffect()
const {
return pGE; }
77 inline QColor glowEffectColor()
const {
return pGEcolor; }
78 inline int glowEffectRadius()
const {
return pGEradius; }
80 inline bool labelEnabled()
const {
return pLabelEnabled; }
86 virtual void setEnableToolTipPreview(
bool enable) { pEnableToolTipPreview = enable; display_state(pDisplayState); }
88 virtual void displayClear();
89 virtual void display(
QImage displayimg,
QImage tooltipimage,
bool labelenabled =
true);
90 virtual void displayError(
bool labelenabled =
false)
91 { displayError(
QString(), labelenabled); }
92 virtual void displayError(
const QString& errorMessage,
bool labelenabled =
false);
94 void setGlowEffect(
bool on) { pGE = on; display_state(pDisplayState); }
95 void setGlowEffectColor(
const QColor& color) { pGEcolor = color; display_state(pDisplayState); }
96 void setGlowEffectRadius(
int r) { pGEradius = r; display_state(pDisplayState); }
98 void setLabelEnabled(
bool enabled) { pLabelEnabled = enabled; display_state(pDisplayState); }
113 QSize pLabelFixedSize;
114 bool pEnableToolTipPreview;
126 void set_error(
bool error_on);