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

Plasma

  • 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 };
80 
87 enum Direction {
88  Down = 0,
89  Up,
90  Left,
91  Right
92 };
93 
97 enum ZoomDirection {
98  ZoomIn = 0,
99  ZoomOut = 1
100 };
101 
106 enum Location {
107  Floating = 0,
109  Desktop,
111  FullScreen,
112  TopEdge,
113  BottomEdge,
114  LeftEdge,
115  RightEdge
116 };
117 
122 enum Position {
123  LeftPositioned,
124  RightPositioned,
125  TopPositioned,
126  BottomPositioned,
127  CenterPositioned
128 };
129 
135 enum PopupPlacement {
136  FloatingPopup = 0,
137  TopPosedLeftAlignedPopup,
139  TopPosedRightAlignedPopup,
141  LeftPosedTopAlignedPopup,
143  LeftPosedBottomAlignedPopup,
145  BottomPosedLeftAlignedPopup,
147  BottomPosedRightAlignedPopup,
149  RightPosedTopAlignedPopup,
151  RightPosedBottomAlignedPopup
153 };
154 
158 enum FlipDirection {
159  NoFlip = 0,
160  HorizontalFlip = 1,
161  VerticalFlip = 2
162 };
163 Q_DECLARE_FLAGS(Flip, FlipDirection)
164 
165 
168 enum ZoomLevel {
169  DesktopZoom = 0,
171  GroupZoom,
173  OverviewZoom
174 };
175 
179 enum IntervalAlignment {
180  NoAlignment = 0,
181  AlignToMinute,
182  AlignToHour
183 };
184 
185 enum ItemTypes {
186  AppletType = QGraphicsItem::UserType + 1,
187  LineEditType = QGraphicsItem::UserType + 2
188 };
189 
195 enum ImmutabilityType {
196  Mutable = 1,
197  UserImmutable = 2,
199  SystemImmutable = 4
201 };
202 
206 enum AspectRatioMode {
207  InvalidAspectRatioMode = -1,
210  IgnoreAspectRatio = 0,
211  KeepAspectRatio = 1,
212  Square = 2,
213  ConstrainedSquare = 3,
216  FixedSize = 4
217 };
218 
223 enum ComponentType {
224  AppletComponent = 1,
225  DataEngineComponent = 2,
226  RunnerComponent = 4,
227  AnimatorComponent = 8,
228  ContainmentComponent = 16,
229  WallpaperComponent = 32,
230  GenericComponent = 64
231 };
232 Q_DECLARE_FLAGS(ComponentTypes, ComponentType)
233 
234 enum MarginEdge {
235  TopMargin = 0,
236  BottomMargin,
237  LeftMargin,
238  RightMargin
239 };
240 
241 enum MessageButton {
242  ButtonNone = 0,
243  ButtonOk = 1,
244  ButtonYes = 2,
245  ButtonNo = 4,
246  ButtonCancel = 8
247 };
248 Q_DECLARE_FLAGS(MessageButtons, MessageButton)
249 
250 
254 enum ItemStatus {
255  UnknownStatus = 0,
256  PassiveStatus = 1,
257  ActiveStatus = 2,
258  NeedsAttentionStatus = 3,
259  AcceptingInputStatus = 4
260 };
261 Q_ENUMS(ItemStatus)
262 
263 enum AnnouncementMethod {
264  NoAnnouncement = 0,
265  ZeroconfAnnouncement = 1
266 };
267 Q_DECLARE_FLAGS(AnnouncementMethods, AnnouncementMethod)
268 
269 enum TrustLevel {
270  InvalidCredentials = 0,
271  UnknownCredentials = 1,
272  ValidCredentials = 2,
273  TrustedCredentials = 3,
274  UltimateCredentials = 4
275 };
276 Q_ENUMS(TrustLevel)
277 
278 
281 PLASMA_EXPORT qreal scalingFactor(ZoomLevel level);
282 
290 PLASMA_EXPORT Direction locationToDirection(Location location);
291 
299 PLASMA_EXPORT Direction locationToInverseDirection(Location location);
300 
307 PLASMA_EXPORT QGraphicsView *viewFor(const QGraphicsItem *item);
308 
320 PLASMA_EXPORT QList<QAction*> actionsFromMenu(QMenu *menu,
321  const QString &prefix = QString(),
322  QObject *parent = 0);
323 
324 } // Plasma namespace
325 
326 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Constraints)
327 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Flip)
328 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::ComponentTypes)
329 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::MessageButtons)
330 
331 
332 #endif // multiple inclusion guard
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Fri Dec 7 2012 16:02:04 by doxygen 1.8.1 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-4.8.5 API Reference

Skip menu "kdelibs-4.8.5 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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