/usr/include/libdtk-2.0.7/DWidget/dblureffectwidget.h is in libdtkwidget-dev 2.0.7.2-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | /*
* Copyright (C) 2017 ~ 2017 Deepin Technology Co., Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DBLUREFFECTWIDGET_H
#define DBLUREFFECTWIDGET_H
#include "dtkwidget_global.h"
#include "dobject.h"
#include <QWidget>
DWIDGET_BEGIN_NAMESPACE
class DBlurEffectWidgetPrivate;
class LIBDTKWIDGETSHARED_EXPORT DBlurEffectWidget : public QWidget, public DTK_CORE_NAMESPACE::DObject
{
Q_OBJECT
// The "radius" property is only support for InWindowBlend. See property "blendMode"
Q_PROPERTY(int radius READ radius WRITE setRadius NOTIFY radiusChanged)
Q_PROPERTY(BlurMode mode READ mode WRITE setMode NOTIFY modeChanged)
Q_PROPERTY(BlendMode blendMode READ blendMode WRITE setBlendMode NOTIFY blendModeChanged)
Q_PROPERTY(int blurRectXRadius READ blurRectXRadius WRITE setBlurRectXRadius NOTIFY blurRectXRadiusChanged)
Q_PROPERTY(int blurRectYRadius READ blurRectYRadius WRITE setBlurRectYRadius NOTIFY blurRectYRadiusChanged)
// ###(zccrs): The alpha channel of the color is fixed.
// The alpha channel is 102 if the DPlatformWindowHandle::hasBlurWindow() is true, otherwise is 204).
Q_PROPERTY(QColor maskColor READ maskColor WRITE setMaskColor NOTIFY maskColorChanged)
public:
// TODO: To support MeanBlur, MedianBlur, BilateralFilter
/*!
* \brief The BlurMode enum determines which blur algorithm will be used.
*/
enum BlurMode {
GaussianBlur /*!< gaussian blur */
};
Q_ENUMS(BlurMode)
/*!
* \brief The BlendMode enum controls with which part the widget will be blended with.
*/
enum BlendMode {
InWindowBlend, /*!< blend with the widgets between the window and this widget */
BehindWindowBlend /*!< blend with the pixels behind the window */
};
Q_ENUMS(BlendMode)
/*!
* \brief The MaskColorType enum contains the possible color used as the background.
*/
enum MaskColorType {
DarkColor, /*!< dark style, predefined dark color is used */
LightColor, /*!< light style, predefined light color is used */
CustomColor /*!< custom color, custom color is used */
};
Q_ENUMS(MaskColorType)
explicit DBlurEffectWidget(QWidget *parent = 0);
~DBlurEffectWidget();
int radius() const;
BlurMode mode() const;
BlendMode blendMode() const;
int blurRectXRadius() const;
int blurRectYRadius() const;
QColor maskColor() const;
void setMaskPath(const QPainterPath &path);
public Q_SLOTS:
void setRadius(int radius);
void setMode(BlurMode mode);
void setBlendMode(BlendMode blendMode);
void setBlurRectXRadius(int blurRectXRadius);
void setBlurRectYRadius(int blurRectYRadius);
void setMaskColor(QColor maskColor);
void setMaskColor(MaskColorType type);
Q_SIGNALS:
void radiusChanged(int radius);
void modeChanged(BlurMode mode);
void blendModeChanged(BlendMode blendMode);
void blurRectXRadiusChanged(int blurRectXRadius);
void blurRectYRadiusChanged(int blurRectYRadius);
void maskColorChanged(QColor maskColor);
protected:
DBlurEffectWidget(DBlurEffectWidgetPrivate &dd, QWidget *parent = 0);
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
void moveEvent(QMoveEvent *event) Q_DECL_OVERRIDE;
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
void hideEvent(QHideEvent *event) Q_DECL_OVERRIDE;
void changeEvent(QEvent *event) Q_DECL_OVERRIDE;
private:
D_DECLARE_PRIVATE(DBlurEffectWidget)
};
DWIDGET_END_NAMESPACE
#endif // DBLUREFFECTWIDGET_H
|