Changeset View
Changeset View
Standalone View
Standalone View
outline.h
Show All 36 Lines | |||||
37 | * | 37 | * | ||
38 | * The class renders an outline by using four windows. One for each border of | 38 | * The class renders an outline by using four windows. One for each border of | ||
39 | * the geometry. It is possible to replace the outline with an effect. If an | 39 | * the geometry. It is possible to replace the outline with an effect. If an | ||
40 | * effect is available the effect will be used, otherwise the outline will be | 40 | * effect is available the effect will be used, otherwise the outline will be | ||
41 | * rendered by using the X implementation. | 41 | * rendered by using the X implementation. | ||
42 | * | 42 | * | ||
43 | * @author Arthur Arlt | 43 | * @author Arthur Arlt | ||
44 | * @since 4.7 | 44 | * @since 4.7 | ||
45 | */ | 45 | **/ | ||
46 | class Outline : public QObject { | 46 | class Outline : public QObject { | ||
47 | Q_OBJECT | 47 | Q_OBJECT | ||
48 | Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged) | 48 | Q_PROPERTY(QRect geometry READ geometry NOTIFY geometryChanged) | ||
49 | Q_PROPERTY(QRect visualParentGeometry READ visualParentGeometry NOTIFY visualParentGeometryChanged) | 49 | Q_PROPERTY(QRect visualParentGeometry READ visualParentGeometry NOTIFY visualParentGeometryChanged) | ||
50 | Q_PROPERTY(QRect unifiedGeometry READ unifiedGeometry NOTIFY unifiedGeometryChanged) | 50 | Q_PROPERTY(QRect unifiedGeometry READ unifiedGeometry NOTIFY unifiedGeometryChanged) | ||
51 | Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) | 51 | Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) | ||
52 | public: | 52 | public: | ||
53 | ~Outline(); | 53 | ~Outline(); | ||
54 | 54 | | |||
55 | /** | 55 | /** | ||
56 | * Set the outline geometry. | 56 | * Set the outline geometry. | ||
57 | * To show the outline use showOutline. | 57 | * To show the outline use showOutline. | ||
58 | * @param outlineGeometry The geometry of the outline to be shown | 58 | * @param outlineGeometry The geometry of the outline to be shown | ||
59 | * @see showOutline | 59 | * @see showOutline | ||
60 | */ | 60 | **/ | ||
61 | void setGeometry(const QRect &outlineGeometry); | 61 | void setGeometry(const QRect &outlineGeometry); | ||
62 | 62 | | |||
63 | /** | 63 | /** | ||
64 | * Set the visual parent geometry. | 64 | * Set the visual parent geometry. | ||
65 | * This is the geometry from which the will emerge. | 65 | * This is the geometry from which the will emerge. | ||
66 | * @param visualParentGeometry The visual geometry of the visual parent | 66 | * @param visualParentGeometry The visual geometry of the visual parent | ||
67 | * @see showOutline | 67 | * @see showOutline | ||
68 | */ | 68 | **/ | ||
69 | void setVisualParentGeometry(const QRect &visualParentGeometry); | 69 | void setVisualParentGeometry(const QRect &visualParentGeometry); | ||
70 | 70 | | |||
71 | /** | 71 | /** | ||
72 | * Shows the outline of a window using either an effect or the X implementation. | 72 | * Shows the outline of a window using either an effect or the X implementation. | ||
73 | * To stop the outline process use hideOutline. | 73 | * To stop the outline process use hideOutline. | ||
74 | * @see hideOutline | 74 | * @see hideOutline | ||
75 | */ | 75 | **/ | ||
76 | void show(); | 76 | void show(); | ||
77 | 77 | | |||
78 | /** | 78 | /** | ||
79 | * Shows the outline for the given @p outlineGeometry. | 79 | * Shows the outline for the given @p outlineGeometry. | ||
80 | * This is the same as setOutlineGeometry followed by showOutline directly. | 80 | * This is the same as setOutlineGeometry followed by showOutline directly. | ||
81 | * To stop the outline process use hideOutline. | 81 | * To stop the outline process use hideOutline. | ||
82 | * @param outlineGeometry The geometry of the outline to be shown | 82 | * @param outlineGeometry The geometry of the outline to be shown | ||
83 | * @see hideOutline | 83 | * @see hideOutline | ||
84 | */ | 84 | **/ | ||
85 | void show(const QRect &outlineGeometry); | 85 | void show(const QRect &outlineGeometry); | ||
86 | 86 | | |||
87 | /** | 87 | /** | ||
88 | * Shows the outline for the given @p outlineGeometry animated from @p visualParentGeometry. | 88 | * Shows the outline for the given @p outlineGeometry animated from @p visualParentGeometry. | ||
89 | * This is the same as setOutlineGeometry followed by setVisualParentGeometry | 89 | * This is the same as setOutlineGeometry followed by setVisualParentGeometry | ||
90 | * and then showOutline. | 90 | * and then showOutline. | ||
91 | * To stop the outline process use hideOutline. | 91 | * To stop the outline process use hideOutline. | ||
92 | * @param outlineGeometry The geometry of the outline to be shown | 92 | * @param outlineGeometry The geometry of the outline to be shown | ||
93 | * @param visualParentGeometry The geometry from where the outline should emerge | 93 | * @param visualParentGeometry The geometry from where the outline should emerge | ||
94 | * @see hideOutline | 94 | * @see hideOutline | ||
95 | * @since 5.10 | 95 | * @since 5.10 | ||
96 | */ | 96 | **/ | ||
97 | void show(const QRect &outlineGeometry, const QRect &visualParentGeometry); | 97 | void show(const QRect &outlineGeometry, const QRect &visualParentGeometry); | ||
98 | 98 | | |||
99 | /** | 99 | /** | ||
100 | * Hides shown outline. | 100 | * Hides shown outline. | ||
101 | * @see showOutline | 101 | * @see showOutline | ||
102 | */ | 102 | **/ | ||
103 | void hide(); | 103 | void hide(); | ||
104 | 104 | | |||
105 | const QRect &geometry() const; | 105 | const QRect &geometry() const; | ||
106 | const QRect &visualParentGeometry() const; | 106 | const QRect &visualParentGeometry() const; | ||
107 | QRect unifiedGeometry() const; | 107 | QRect unifiedGeometry() const; | ||
108 | 108 | | |||
109 | bool isActive() const; | 109 | bool isActive() const; | ||
110 | 110 | | |||
▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines |