Plasma
plasma.h
Go to the documentation of this file.
00001 /* 00002 * Copyright 2005 by Aaron Seigo <aseigo@kde.org> 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU Library General Public License as 00006 * published by the Free Software Foundation; either version 2, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details 00013 * 00014 * You should have received a copy of the GNU Library General Public 00015 * License along with this program; if not, write to the 00016 * Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef PLASMA_DEFS_H 00021 #define PLASMA_DEFS_H 00022 00025 #include <QtGui/QGraphicsItem> 00026 #include <QtGui/QPainterPath> 00027 00028 #include <plasma/plasma_export.h> 00029 00030 class QAction; 00031 class QGraphicsView; 00032 00036 namespace Plasma 00037 { 00038 00044 enum Constraint { 00045 NoConstraint = 0, 00046 FormFactorConstraint = 1, 00047 LocationConstraint = 2, 00048 ScreenConstraint = 4, 00049 SizeConstraint = 8, 00050 ImmutableConstraint = 16, 00051 StartupCompletedConstraint = 32, 00052 ContextConstraint = 64, 00053 PopupConstraint = 128, 00054 AllConstraints = FormFactorConstraint | LocationConstraint | ScreenConstraint | 00055 SizeConstraint | ImmutableConstraint | ContextConstraint | PopupConstraint 00056 }; 00057 Q_DECLARE_FLAGS(Constraints, Constraint) 00058 00059 00064 enum FormFactor { 00065 Planar = 0, 00070 MediaCenter, 00075 Horizontal, 00077 Vertical 00079 }; 00080 00087 enum Direction { 00088 Down = 0, 00089 Up, 00090 Left, 00091 Right 00092 }; 00093 00097 enum ZoomDirection { 00098 ZoomIn = 0, 00099 ZoomOut = 1 00100 }; 00101 00106 enum Location { 00107 Floating = 0, 00109 Desktop, 00111 FullScreen, 00112 TopEdge, 00113 BottomEdge, 00114 LeftEdge, 00115 RightEdge 00116 }; 00117 00122 enum Position { 00123 LeftPositioned, 00124 RightPositioned, 00125 TopPositioned, 00126 BottomPositioned, 00127 CenterPositioned 00128 }; 00129 00135 enum PopupPlacement { 00136 FloatingPopup = 0, 00137 TopPosedLeftAlignedPopup, 00139 TopPosedRightAlignedPopup, 00141 LeftPosedTopAlignedPopup, 00143 LeftPosedBottomAlignedPopup, 00145 BottomPosedLeftAlignedPopup, 00147 BottomPosedRightAlignedPopup, 00149 RightPosedTopAlignedPopup, 00151 RightPosedBottomAlignedPopup 00153 }; 00154 00158 enum FlipDirection { 00159 NoFlip = 0, 00160 HorizontalFlip = 1, 00161 VerticalFlip = 2 00162 }; 00163 Q_DECLARE_FLAGS(Flip, FlipDirection) 00164 00165 00168 enum ZoomLevel { 00169 DesktopZoom = 0, 00171 GroupZoom, 00173 OverviewZoom 00174 }; 00175 00179 enum IntervalAlignment { 00180 NoAlignment = 0, 00181 AlignToMinute, 00182 AlignToHour 00183 }; 00184 00185 enum ItemTypes { 00186 AppletType = QGraphicsItem::UserType + 1, 00187 LineEditType = QGraphicsItem::UserType + 2 00188 }; 00189 00195 enum ImmutabilityType { 00196 Mutable = 1, 00197 UserImmutable = 2, 00199 SystemImmutable = 4 00201 }; 00202 00206 enum AspectRatioMode { 00207 InvalidAspectRatioMode = -1, 00210 IgnoreAspectRatio = 0, 00211 KeepAspectRatio = 1, 00212 Square = 2, 00213 ConstrainedSquare = 3, 00216 FixedSize = 4 00217 }; 00218 00223 enum ComponentType { 00224 AppletComponent = 1, 00225 DataEngineComponent = 2, 00226 RunnerComponent = 4, 00227 AnimatorComponent = 8, 00228 ContainmentComponent = 16, 00229 WallpaperComponent = 32, 00230 GenericComponent = 64 00231 }; 00232 Q_DECLARE_FLAGS(ComponentTypes, ComponentType) 00233 00234 enum MarginEdge { 00235 TopMargin = 0, 00236 BottomMargin, 00237 LeftMargin, 00238 RightMargin 00239 }; 00240 00241 enum MessageButton { 00242 ButtonNone = 0, 00243 ButtonOk = 1, 00244 ButtonYes = 2, 00245 ButtonNo = 4, 00246 ButtonCancel = 8 00247 }; 00248 Q_DECLARE_FLAGS(MessageButtons, MessageButton) 00249 00250 00254 enum ItemStatus { 00255 UnknownStatus = 0, 00256 PassiveStatus = 1, 00257 ActiveStatus = 2, 00258 NeedsAttentionStatus = 3, 00259 AcceptingInputStatus = 4 00260 }; 00261 Q_ENUMS(ItemStatus) 00262 00263 enum AnnouncementMethod { 00264 NoAnnouncement = 0, 00265 ZeroconfAnnouncement = 1 00266 }; 00267 Q_DECLARE_FLAGS(AnnouncementMethods, AnnouncementMethod) 00268 00269 enum TrustLevel { 00270 InvalidCredentials = 0, 00271 UnknownCredentials = 1, 00272 ValidCredentials = 2, 00273 TrustedCredentials = 3, 00274 UltimateCredentials = 4 00275 }; 00276 Q_ENUMS(TrustLevel) 00277 00278 00281 PLASMA_EXPORT qreal scalingFactor(ZoomLevel level); 00282 00290 PLASMA_EXPORT Direction locationToDirection(Location location); 00291 00299 PLASMA_EXPORT Direction locationToInverseDirection(Location location); 00300 00307 PLASMA_EXPORT QGraphicsView *viewFor(const QGraphicsItem *item); 00308 00320 PLASMA_EXPORT QList<QAction*> actionsFromMenu(QMenu *menu, 00321 const QString &prefix = QString(), 00322 QObject *parent = 0); 00323 00324 } // Plasma namespace 00325 00326 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Constraints) 00327 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Flip) 00328 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::ComponentTypes) 00329 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::MessageButtons) 00330 00331 00332 #endif // multiple inclusion guard
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 17:36:13 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Wed May 2 2012 17:36:13 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.