• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Plasma

  • sources
  • kde-4.12
  • kdelibs
  • plasma
plasma.h
Go to the documentation of this file.
1 /*
2  * Copyright 2005 by Aaron Seigo <aseigo@kde.org>
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 <QtGui/QGraphicsItem>
26 #include <QtGui/QPainterPath>
27 
28 #include <plasma/plasma_export.h>
29 
30 class QAction;
31 class QGraphicsView;
32 
36 namespace Plasma
37 {
38 
44 enum Constraint {
45  NoConstraint = 0,
46  FormFactorConstraint = 1,
47  LocationConstraint = 2,
48  ScreenConstraint = 4,
49  SizeConstraint = 8,
50  ImmutableConstraint = 16,
51  StartupCompletedConstraint = 32,
52  ContextConstraint = 64,
53  PopupConstraint = 128,
54  AllConstraints = FormFactorConstraint | LocationConstraint | ScreenConstraint |
55  SizeConstraint | ImmutableConstraint | ContextConstraint | PopupConstraint
56 };
57 Q_DECLARE_FLAGS(Constraints, Constraint)
58 
59 
64 enum FormFactor {
65  Planar = 0,
70  MediaCenter,
75  Horizontal,
77  Vertical,
79  Application
81 };
82 
89 enum Direction {
90  Down = 0,
91  Up,
92  Left,
93  Right
94 };
95 
99 enum ZoomDirection {
100  ZoomIn = 0,
101  ZoomOut = 1
102 };
103 
108 enum Location {
109  Floating = 0,
111  Desktop,
113  FullScreen,
114  TopEdge,
115  BottomEdge,
116  LeftEdge,
117  RightEdge
118 };
119 
124 enum Position {
125  LeftPositioned,
126  RightPositioned,
127  TopPositioned,
128  BottomPositioned,
129  CenterPositioned
130 };
131 
137 enum PopupPlacement {
138  FloatingPopup = 0,
139  TopPosedLeftAlignedPopup,
141  TopPosedRightAlignedPopup,
143  LeftPosedTopAlignedPopup,
145  LeftPosedBottomAlignedPopup,
147  BottomPosedLeftAlignedPopup,
149  BottomPosedRightAlignedPopup,
151  RightPosedTopAlignedPopup,
153  RightPosedBottomAlignedPopup
155 };
156 
160 enum FlipDirection {
161  NoFlip = 0,
162  HorizontalFlip = 1,
163  VerticalFlip = 2
164 };
165 Q_DECLARE_FLAGS(Flip, FlipDirection)
166 
167 
170 enum ZoomLevel {
171  DesktopZoom = 0,
173  GroupZoom,
175  OverviewZoom
176 };
177 
181 enum IntervalAlignment {
182  NoAlignment = 0,
183  AlignToMinute,
184  AlignToHour
185 };
186 
187 enum ItemTypes {
188  AppletType = QGraphicsItem::UserType + 1,
189  LineEditType = QGraphicsItem::UserType + 2
190 };
191 
197 enum ImmutabilityType {
198  Mutable = 1,
199  UserImmutable = 2,
201  SystemImmutable = 4
203 };
204 
208 enum AspectRatioMode {
209  InvalidAspectRatioMode = -1,
212  IgnoreAspectRatio = 0,
213  KeepAspectRatio = 1,
214  Square = 2,
215  ConstrainedSquare = 3,
218  FixedSize = 4
219 };
220 
225 enum ComponentType {
226  AppletComponent = 1,
227  DataEngineComponent = 2,
228  RunnerComponent = 4,
229  AnimatorComponent = 8,
230  ContainmentComponent = 16,
231  WallpaperComponent = 32,
232  GenericComponent = 64
233 };
234 Q_DECLARE_FLAGS(ComponentTypes, ComponentType)
235 
236 enum MarginEdge {
237  TopMargin = 0,
238  BottomMargin,
239  LeftMargin,
240  RightMargin
241 };
242 
243 enum MessageButton {
244  ButtonNone = 0,
245  ButtonOk = 1,
246  ButtonYes = 2,
247  ButtonNo = 4,
248  ButtonCancel = 8
249 };
250 Q_DECLARE_FLAGS(MessageButtons, MessageButton)
251 
252 
256 enum ItemStatus {
257  UnknownStatus = 0,
258  PassiveStatus = 1,
259  ActiveStatus = 2,
260  NeedsAttentionStatus = 3,
261  AcceptingInputStatus = 4
262 };
263 Q_ENUMS(ItemStatus)
264 
265 enum AnnouncementMethod {
266  NoAnnouncement = 0,
267  ZeroconfAnnouncement = 1
268 };
269 Q_DECLARE_FLAGS(AnnouncementMethods, AnnouncementMethod)
270 
271 enum TrustLevel {
272  InvalidCredentials = 0,
273  UnknownCredentials = 1,
274  ValidCredentials = 2,
275  TrustedCredentials = 3,
276  UltimateCredentials = 4
277 };
278 Q_ENUMS(TrustLevel)
279 
280 
283 PLASMA_EXPORT qreal scalingFactor(ZoomLevel level);
284 
292 PLASMA_EXPORT Direction locationToDirection(Location location);
293 
301 PLASMA_EXPORT Direction locationToInverseDirection(Location location);
302 
309 PLASMA_EXPORT QGraphicsView *viewFor(const QGraphicsItem *item);
310 
322 PLASMA_EXPORT QList<QAction*> actionsFromMenu(QMenu *menu,
323  const QString &prefix = QString(),
324  QObject *parent = 0);
325 
326 } // Plasma namespace
327 
328 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Constraints)
329 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Flip)
330 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::ComponentTypes)
331 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::MessageButtons)
332 
333 
334 #endif // multiple inclusion guard
Plasma::SizeConstraint
the size of the applet was changed
Definition: plasma.h:49
Plasma::Up
Display upwards.
Definition: plasma.h:91
Plasma::ZoomIn
Zoom in one step.
Definition: plasma.h:100
Plasma::ContainmentComponent
Plasma::Containment based plugins.
Definition: plasma.h:230
Plasma::TopPositioned
Positioned top.
Definition: plasma.h:127
Plasma::Vertical
The applet is constrained horizontally, but can expand vertically.
Definition: plasma.h:77
Plasma::InvalidCredentials
The credentials are invalid.
Definition: plasma.h:272
Plasma::WallpaperComponent
Plasma::Wallpaper based plugins.
Definition: plasma.h:231
Plasma::scalingFactor
qreal scalingFactor(ZoomLevel level)
Definition: plasma.cpp:33
Plasma::RightPositioned
Positioned right.
Definition: plasma.h:126
Plasma::LeftPositioned
Positioned left.
Definition: plasma.h:125
Plasma::StartupCompletedConstraint
application startup has completed
Definition: plasma.h:51
Plasma::UnknownStatus
The status is unknown.
Definition: plasma.h:257
Plasma::IgnoreAspectRatio
The applet can be freely resized.
Definition: plasma.h:212
Plasma::ImmutabilityType
ImmutabilityType
Defines the immutability of items like applets, corona and containments they can be free to modify...
Definition: plasma.h:197
Plasma::NeedsAttentionStatus
The Item needs attention.
Definition: plasma.h:260
Plasma::actionsFromMenu
QList< QAction * > actionsFromMenu(QMenu *menu, const QString &prefix, QObject *parent)
Returns a list of all actions in the given QMenu This method flattens the hierarchy of the menu by pr...
Definition: plasma.cpp:112
Plasma::ButtonCancel
Cancel Button.
Definition: plasma.h:248
Plasma::ComponentType
ComponentType
The ComonentType enumeration refers to the various types of components, or plugins, supported by plasma.
Definition: plasma.h:225
Plasma::CenterPositioned
Positioned in the center.
Definition: plasma.h:129
Plasma::SystemImmutable
the item is locked down by the system, the user can't unlock it
Definition: plasma.h:201
Plasma::MarginEdge
MarginEdge
Definition: plasma.h:236
Plasma::ButtonOk
OK Button.
Definition: plasma.h:245
Plasma::FlipDirection
FlipDirection
Flip enumeration.
Definition: plasma.h:160
Plasma::ConstrainedSquare
The applet is no wider (in horizontal formfactors) or no higher (in vertical ones) than a square...
Definition: plasma.h:215
Plasma::FullScreen
Full screen.
Definition: plasma.h:113
Plasma::Desktop
On the planar desktop layer, extending across the full screen from edge to edge.
Definition: plasma.h:111
Plasma::LeftPosedBottomAlignedPopup
Popup positioned on the left, aligned to the bottom of the widget.
Definition: plasma.h:145
Plasma::MessageButton
MessageButton
Definition: plasma.h:243
Plasma::ImmutableConstraint
the immutability (locked) nature of the applet changed
Definition: plasma.h:50
QObject
Plasma::AnnouncementMethod
AnnouncementMethod
Definition: plasma.h:265
Plasma::Square
The applet is always a square.
Definition: plasma.h:214
Plasma::BottomPosedLeftAlignedPopup
Popup positioned on the bottom, aligned to the left of the wigdet.
Definition: plasma.h:147
Plasma::Application
The Applet lives in a plane and should be optimized to look as a full application, for the desktop or the particular device.
Definition: plasma.h:79
Plasma::MediaCenter
As with Planar, the applet lives in a plane but the interface should be optimized for medium-to-high ...
Definition: plasma.h:70
Plasma::Horizontal
The applet is constrained vertically, but can expand horizontally.
Definition: plasma.h:75
Plasma::Mutable
The item can be modified in any way.
Definition: plasma.h:198
Plasma::LeftPosedTopAlignedPopup
Popup positioned on the left, aligned to the right of the wigdet.
Definition: plasma.h:143
Plasma::RightPosedBottomAlignedPopup
Popup positioned on the right, aligned to the bottom of the widget.
Definition: plasma.h:153
Plasma::RightPosedTopAlignedPopup
Popup positioned on the right, aligned to the top of the wigdet.
Definition: plasma.h:151
Plasma::GenericComponent
Definition: plasma.h:232
Plasma::BottomMargin
The bottom margin.
Definition: plasma.h:238
Plasma::ZoomDirection
ZoomDirection
The direction of a zoom action.
Definition: plasma.h:99
Plasma::PopupPlacement
PopupPlacement
The popup position enumeration relatively to his attached widget.
Definition: plasma.h:137
Plasma::PopupConstraint
the position of the popup needs to be recalculated
Definition: plasma.h:53
Plasma::Position
Position
The position enumeration.
Definition: plasma.h:124
Plasma::TrustLevel
TrustLevel
Definition: plasma.h:271
Plasma::ContextConstraint
the context (e.g.
Definition: plasma.h:52
Plasma::Location
Location
The Location enumeration describes where on screen an element, such as an Applet or its managing cont...
Definition: plasma.h:108
Plasma::Constraint
Constraint
The Constraint enumeration lists the various constraints that Plasma objects have managed for them an...
Definition: plasma.h:44
Plasma::ButtonYes
Yes Button.
Definition: plasma.h:246
Plasma::NoAnnouncement
No announcements.
Definition: plasma.h:266
Plasma::AlignToHour
Align to the hour.
Definition: plasma.h:184
Plasma::UltimateCredentials
The ultimate trust level applies to the credentials.
Definition: plasma.h:276
Plasma::NoFlip
Do not flip.
Definition: plasma.h:161
Plasma::HorizontalFlip
Flip horizontally.
Definition: plasma.h:162
Plasma::UserImmutable
The user has requested a lock down, and can undo the lock down at any time.
Definition: plasma.h:199
Plasma::IntervalAlignment
IntervalAlignment
Possible timing alignments.
Definition: plasma.h:181
Plasma::ZoomLevel
ZoomLevel
Zoom levels that Plasma is aware of...
Definition: plasma.h:170
Plasma::AllConstraints
Definition: plasma.h:54
Plasma::BottomPosedRightAlignedPopup
Popup positioned on the bottom, aligned to the right of the widget.
Definition: plasma.h:149
Plasma::FormFactor
FormFactor
The FormFactor enumeration describes how a Plasma::Applet should arrange itself.
Definition: plasma.h:64
Plasma::KeepAspectRatio
The applet keeps a fixed aspect ratio.
Definition: plasma.h:213
Plasma::ActiveStatus
The Item is active.
Definition: plasma.h:259
Plasma::locationToDirection
Direction locationToDirection(Location location)
Converts a location to a direction.
Definition: plasma.cpp:51
Plasma::AlignToMinute
Align to the minute.
Definition: plasma.h:183
Plasma::GroupZoom
Plasmoids are shown as icons in visual groups; drag and drop and limited context menu interaction onl...
Definition: plasma.h:173
Plasma::TopEdge
Along the top of the screen.
Definition: plasma.h:114
Plasma::ButtonNo
No Button.
Definition: plasma.h:247
Plasma::FormFactorConstraint
The FormFactor for an object.
Definition: plasma.h:46
Plasma::FloatingPopup
Free floating, non attached popup.
Definition: plasma.h:138
Plasma::locationToInverseDirection
Direction locationToInverseDirection(Location location)
Converts a location to the direction facing it.
Definition: plasma.cpp:72
Plasma::TopPosedRightAlignedPopup
Popup positioned on the top, aligned to the right of the widget.
Definition: plasma.h:141
Plasma::RunnerComponent
Plasma::AbstractRunner based plugsin.
Definition: plasma.h:228
Plasma::TopMargin
The top margin.
Definition: plasma.h:237
Plasma::RightMargin
The right margin.
Definition: plasma.h:240
Plasma::Floating
Free floating.
Definition: plasma.h:109
Plasma::ValidCredentials
The credentials are valid.
Definition: plasma.h:274
Plasma::TopPosedLeftAlignedPopup
Popup positioned on the top, aligned to the left of the wigdet.
Definition: plasma.h:139
Plasma::ZoomOut
Zoom out one step.
Definition: plasma.h:101
Plasma::Down
Display downards.
Definition: plasma.h:90
Plasma::BottomEdge
Along the bottom of the screen.
Definition: plasma.h:115
Plasma::Planar
The applet lives in a plane and has two degrees of freedom to grow.
Definition: plasma.h:65
Plasma::ScreenConstraint
Which screen an object is on.
Definition: plasma.h:48
Plasma::AppletComponent
Plasma::Applet based plugins.
Definition: plasma.h:226
Plasma::OverviewZoom
Groups become icons themselves.
Definition: plasma.h:175
Plasma::TrustedCredentials
The credentials are trusted.
Definition: plasma.h:275
Plasma::DataEngineComponent
Plasma::DataEngine based plugins.
Definition: plasma.h:227
Plasma::LocationConstraint
The Location of an object.
Definition: plasma.h:47
Plasma::PassiveStatus
The Item is passive.
Definition: plasma.h:258
Plasma::BottomPositioned
Positioned bottom.
Definition: plasma.h:128
Plasma::InvalidAspectRatioMode
Unset mode used for dev convenience when there is a need to store the aspectRatioMode somewhere...
Definition: plasma.h:209
QGraphicsView
Plasma::ZeroconfAnnouncement
Announcements via ZeroConf.
Definition: plasma.h:267
Plasma::LineEditType
Definition: plasma.h:189
Plasma::DesktopZoom
Normal desktop usage, plasmoids are painted normally and have full interaction.
Definition: plasma.h:171
Plasma::ItemStatus
ItemStatus
Status of an applet.
Definition: plasma.h:256
Plasma::RightEdge
Along the right side of the screen.
Definition: plasma.h:117
Plasma::Direction
Direction
The Direction enumeration describes in which direction, relative to the Applet (and its managing cont...
Definition: plasma.h:89
Plasma::VerticalFlip
Flip vertically.
Definition: plasma.h:163
Plasma::Right
Display to the right.
Definition: plasma.h:93
Plasma::AppletType
Definition: plasma.h:188
Plasma::LeftEdge
Along the left side of the screen.
Definition: plasma.h:116
Plasma::UnknownCredentials
The credentials are unknown.
Definition: plasma.h:273
Plasma::NoAlignment
No alignment.
Definition: plasma.h:182
Plasma::NoConstraint
No constraint; never passed in to Applet::constraintsEvent on its own.
Definition: plasma.h:45
Plasma::ItemTypes
ItemTypes
Definition: plasma.h:187
Plasma::AnimatorComponent
Plasma::Animator based plugins.
Definition: plasma.h:229
Plasma::Left
Display to the left.
Definition: plasma.h:92
Plasma::FixedSize
Definition: plasma.h:218
plasma_export.h
Plasma::ButtonNone
None.
Definition: plasma.h:244
Plasma::AcceptingInputStatus
The Item is accepting input.
Definition: plasma.h:261
Plasma::viewFor
QGraphicsView * viewFor(const QGraphicsItem *item)
Returns the most appropriate QGraphicsView for the item.
Definition: plasma.cpp:93
Plasma::LeftMargin
The left margin.
Definition: plasma.h:239
Plasma::AspectRatioMode
AspectRatioMode
Defines the aspect ratio used when scaling an applet.
Definition: plasma.h:208
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:33 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal