00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef PLASMA_DEFS_H
00021 #define PLASMA_DEFS_H
00022
00023 #include <QtGui/QGraphicsItem>
00024 #include <QtGui/QPainterPath>
00025
00026 #include <plasma/plasma_export.h>
00027
00031 namespace Plasma
00032 {
00033
00039 enum Constraint { NoConstraint = 0,
00040 FormFactorConstraint = 1 ,
00041 LocationConstraint = 2 ,
00042 ScreenConstraint = 4 ,
00043 SizeConstraint = 8 ,
00044 ImmutableConstraint = 16 ,
00045 StartupCompletedConstraint = 32 ,
00046 AllConstraints = FormFactorConstraint | LocationConstraint | ScreenConstraint | SizeConstraint | ImmutableConstraint
00047 };
00048 Q_DECLARE_FLAGS(Constraints, Constraint)
00049
00050
00055 enum FormFactor { Planar = 0 ,
00060 MediaCenter ,
00065 Horizontal ,
00067 Vertical
00069 };
00070
00077 enum Direction { Down = 0 ,
00078 Up ,
00079 Left ,
00080 Right
00081 };
00082
00086 enum ZoomDirection { ZoomIn = 0 ,
00087 ZoomOut = 1
00088 };
00089
00094 enum Location { Floating = 0 ,
00096 Desktop ,
00098 FullScreen ,
00099 TopEdge ,
00100 BottomEdge ,
00101 LeftEdge ,
00102 RightEdge
00103 };
00104
00109 enum Position { LeftPositioned ,
00110 RightPositioned ,
00111 TopPositioned ,
00112 BottomPositioned ,
00113 CenterPositioned
00114 };
00115
00119 enum FlipDirection { NoFlip = 0 ,
00120 HorizontalFlip = 1 ,
00121 VerticalFlip = 2
00122 };
00123 Q_DECLARE_FLAGS(Flip, FlipDirection)
00124
00125
00128 enum ZoomLevel { DesktopZoom = 0 ,
00129 GroupZoom ,
00130 OverviewZoom
00131 };
00132
00136 enum IntervalAlignment { NoAlignment = 0,
00137 AlignToMinute,
00138 AlignToHour };
00139
00140
00141 enum ItemTypes { AppletType = QGraphicsItem::UserType + 1,
00142 LineEditType = QGraphicsItem::UserType + 2
00143 };
00144
00149 enum ImmutabilityType { Mutable = 1 ,
00150 UserImmutable = 2 ,
00151 SystemImmutable = 4
00153 };
00154
00158 enum AspectRatioMode { IgnoreAspectRatio = 0 ,
00159 KeepAspectRatio = 1 ,
00160 Square = 2 ,
00161 ConstrainedSquare = 3
00162 };
00163
00168 enum ComponentType { AppletComponent = 1 ,
00169 DataEngineComponent = 2 ,
00170 RunnerComponent = 4 ,
00171 AnimatorComponent = 8 ,
00172 ContainmentComponent = 16
00173 };
00174 Q_DECLARE_FLAGS(ComponentTypes, ComponentType)
00175
00176 enum MarginEdge { TopMargin = 0,
00177 BottomMargin,
00178 LeftMargin,
00179 RightMargin
00180 };
00181
00185 PLASMA_EXPORT qreal scalingFactor(ZoomLevel level);
00186
00194 PLASMA_EXPORT Direction locationToDirection(Location location);
00195
00196 }
00197
00198 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Constraints)
00199 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Flip)
00200 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::ComponentTypes)
00201
00202 #endif // multiple inclusion guard