Plasma

plasma.h
1 /*
2  * Copyright 2005 by Aaron Seigo <[email protected]>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Library General Public License as
6  * published by the Free Software Foundation; either version 2, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 #ifndef PLASMA_DEFS_H
21 #define PLASMA_DEFS_H
22 
25 #include <QObject>
26 
27 #include <plasma/plasma_export.h>
28 
29 class QAction;
30 
34 namespace Plasma
35 {
41 class PLASMA_EXPORT Types : public QObject
42 {
43  Q_OBJECT
44 
45 public:
46  ~Types();
52  enum Constraint {
53  NoConstraint = 0,
54  FormFactorConstraint = 1,
55  LocationConstraint = 2,
56  ScreenConstraint = 4,
57  ImmutableConstraint = 8,
58  StartupCompletedConstraint = 16,
59  ContextConstraint = 32,
60  UiReadyConstraint = 64, // (FIXME: merged with StartupCompletedConstraint?)
61  AllConstraints = FormFactorConstraint | LocationConstraint | ScreenConstraint |
62  ImmutableConstraint
63  };
64  Q_ENUM(Constraint)
65  Q_DECLARE_FLAGS(Constraints, Constraint)
66 
72  enum FormFactor {
73  Planar = 0,
78  MediaCenter,
83  Horizontal,
85  Vertical,
89  };
90  Q_ENUM(FormFactor)
91 
92 
98  NoContainmentType = -1,
99  DesktopContainment = 0,
101  CustomContainment = 127,
103  CustomPanelContainment = 128,
104  CustomEmbeddedContainment = 129
105  };
106  Q_ENUM(ContainmentType)
107 
108 
111  enum ActionType {
112  AddAction = 0,
113  ConfigureAction = 100,
114  ControlAction = 200,
115  MiscAction = 300,
116  DestructiveAction = 400,
117  UserAction = DestructiveAction + 1000
118  };
119  Q_ENUM(ActionType)
120 
121 
127  enum Direction {
128  Down = 0,
129  Up,
131  Right
132  };
133  Q_ENUM(Direction)
134 
135 
139  enum Location {
140  Floating = 0,
142  Desktop,
148  RightEdge
149  };
150  Q_ENUM(Location)
151 
152 
156  enum Position {
161  CenterPositioned
162  };
163  Q_ENUM(Position)
164 
165 
170  FloatingPopup = 0,
171  TopPosedLeftAlignedPopup,
173  TopPosedRightAlignedPopup,
175  LeftPosedTopAlignedPopup,
177  LeftPosedBottomAlignedPopup,
179  BottomPosedLeftAlignedPopup,
181  BottomPosedRightAlignedPopup,
183  RightPosedTopAlignedPopup,
185  RightPosedBottomAlignedPopup
187  };
188  Q_ENUM(PopupPlacement)
189 
190 
194  NoFlip = 0,
195  HorizontalFlip = 1,
196  VerticalFlip = 2
197  };
198  Q_ENUM(FlipDirection)
199  Q_DECLARE_FLAGS(Flip, FlipDirection)
200 
205  NoAlignment = 0,
207  AlignToHour
208  };
209  Q_ENUM(IntervalAlignment)
210 
211 
217  Mutable = 1,
218  UserImmutable = 2,
220  SystemImmutable = 4
222  };
223  Q_ENUM(ImmutabilityType)
224 
225 
230  AppletComponent = 1,
231  DataEngineComponent = 2,
232  ContainmentComponent = 4,
233  WallpaperComponent = 8,
234  GenericComponent = 16
235  };
236  Q_ENUM(ComponentType)
237  Q_DECLARE_FLAGS(ComponentTypes, ComponentType)
238 
239  enum MarginEdge {
240  TopMargin = 0,
243  RightMargin
244  };
245  Q_ENUM(MarginEdge)
246 
247 
251  enum ItemStatus {
252  UnknownStatus = 0,
253  PassiveStatus = 1,
254  ActiveStatus = 2,
255  NeedsAttentionStatus = 3,
256  RequiresAttentionStatus = 4,
257  AcceptingInputStatus = 5,
258  //FIXME KF6: this should be the smallest status
259  HiddenStatus = 6
260  };
261  Q_ENUM(ItemStatus)
262 
263  enum TrustLevel {
264  UnverifiableTrust = 0,
268  UserTrusted,
272  UltimatelyTrusted
273  };
274  Q_ENUM(TrustLevel)
275 
276 
280  NoBackground = 0,
281  StandardBackground = 1,
282  TranslucentBackground = 2,
283  ShadowBackground = 4,
284  ConfigurableBackground = 8,
285  DefaultBackground = StandardBackground
286  };
287  Q_ENUM(BackgroundHints)
288  //TODO KF6: BackgroundHint and BackgroundHints
289  Q_DECLARE_FLAGS(BackgroundFlags, BackgroundHints)
290 
291 private:
292  Types(QObject *parent = nullptr);
293 };
294 
302 PLASMA_EXPORT Types::Direction locationToDirection(Types::Location location);
303 
311 PLASMA_EXPORT Types::Direction locationToInverseDirection(Types::Location location);
312 
313 } // Plasma namespace
314 
315 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Types::Constraints)
316 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Types::Flip)
317 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Types::ComponentTypes)
318 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Types::BackgroundFlags)
319 #endif // multiple inclusion guard
Along the top of the screen.
Definition: plasma.h:145
Positioned right.
Definition: plasma.h:158
The signature is valid and made with one of the user&#39;s own keys.
Definition: plasma.h:270
Enums and constants used in Plasma.
Definition: plasma.h:41
Positioned bottom.
Definition: plasma.h:160
The signature is broken/expired/false.
Definition: plasma.h:266
Types::Direction locationToInverseDirection(Types::Location location)
Converts a location to the direction facing it.
Definition: plasma.cpp:60
Direction
The Direction enumeration describes in which direction, relative to the Applet (and its managing cont...
Definition: plasma.h:127
Align to the minute.
Definition: plasma.h:206
ItemStatus
Status of an applet.
Definition: plasma.h:251
Positioned left.
Definition: plasma.h:157
ComponentType
The ComonentType enumeration refers to the various types of components, or plugins, supported by plasma.
Definition: plasma.h:229
Namespace for everything in libplasma.
Definition: datamodel.cpp:27
FlipDirection
Flip enumeration.
Definition: plasma.h:193
BackgroundHints
Description on how draw a background for the applet.
Definition: plasma.h:279
Along the bottom of the screen.
Definition: plasma.h:146
Position
The position enumeration.
Definition: plasma.h:156
Along the left side of the screen.
Definition: plasma.h:147
The signature is valid, but the key is unknown.
Definition: plasma.h:267
Display upwards.
Definition: plasma.h:129
ActionType
A descriptive type for QActions, to help categorizing them when presented to the user.
Definition: plasma.h:111
Class which handles an application execution.
Definition: application.h:39
ContainmentType
This enumeration describes the type of the Containment.
Definition: plasma.h:97
The bottom margin.
Definition: plasma.h:241
IntervalAlignment
Possible timing alignments.
Definition: plasma.h:204
The signature is valid and made with a key signed by the vendor&#39;s key.
Definition: plasma.h:271
A desktop panel.
Definition: plasma.h:100
PopupPlacement
The popup position enumeration relatively to his attached widget.
Definition: plasma.h:169
Constraint
The Constraint enumeration lists the various constraints that Plasma objects have managed for them an...
Definition: plasma.h:52
The left margin.
Definition: plasma.h:242
Location
The Location enumeration describes where on screen an element, such as an Applet or its managing cont...
Definition: plasma.h:139
Display to the left.
Definition: plasma.h:130
Positioned top.
Definition: plasma.h:159
Types::Direction locationToDirection(Types::Location location)
Converts a location to a direction.
Definition: plasma.cpp:39
ImmutabilityType
Defines the immutability of items like applets, corona and containments they can be free to modify...
Definition: plasma.h:216
Full screen.
Definition: plasma.h:144
FormFactor
The FormFactor enumeration describes how a Plasma::Applet should arrange itself.
Definition: plasma.h:72
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun May 31 2020 23:10:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.