• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.2 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  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
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sun Apr 28 2013 14:25:03 by doxygen 1.8.1.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.10.2 API Reference

Skip menu "kdelibs-4.10.2 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