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

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 QGraphicsView;
00031 
00035 namespace Plasma
00036 {
00037 
00043 enum Constraint {
00044     NoConstraint = 0,
00046     FormFactorConstraint = 1, 
00048     LocationConstraint = 2,
00050     ScreenConstraint = 4,
00052     SizeConstraint = 8,
00054     ImmutableConstraint = 16, 
00056     StartupCompletedConstraint = 32, 
00058     ContextConstraint = 64, 
00059     AllConstraints = FormFactorConstraint | LocationConstraint | ScreenConstraint |
00060     SizeConstraint | ImmutableConstraint | ContextConstraint
00061 };
00062 Q_DECLARE_FLAGS(Constraints, Constraint)
00063 
00064 
00069 enum FormFactor {
00070     Planar = 0,  
00075     MediaCenter, 
00080     Horizontal,  
00082     Vertical     
00084 };
00085 
00092 enum Direction {
00093     Down = 0, 
00094     Up,       
00095     Left,     
00096     Right     
00097 };
00098 
00102 enum ZoomDirection {
00103     ZoomIn = 0, 
00104     ZoomOut = 1 
00105 };
00106 
00111 enum Location {
00112     Floating = 0, 
00114     Desktop,      
00116     FullScreen,   
00117     TopEdge,      
00118     BottomEdge,   
00119     LeftEdge,     
00120     RightEdge     
00121 };
00122 
00127 enum Position {
00128     LeftPositioned,    
00129     RightPositioned,   
00130     TopPositioned,     
00131     BottomPositioned,  
00132     CenterPositioned   
00133 };
00134 
00140 enum PopupPlacement {
00141     FloatingPopup = 0,            
00142     TopPosedLeftAlignedPopup,     
00144     TopPosedRightAlignedPopup,    
00146     LeftPosedTopAlignedPopup,     
00148     LeftPosedBottomAlignedPopup,  
00150     BottomPosedLeftAlignedPopup,  
00152     BottomPosedRightAlignedPopup, 
00154     RightPosedTopAlignedPopup,    
00156     RightPosedBottomAlignedPopup  
00158 };
00159 
00163 enum FlipDirection {
00164     NoFlip = 0,          
00165     HorizontalFlip = 1,  
00166     VerticalFlip = 2     
00167 };
00168 Q_DECLARE_FLAGS(Flip, FlipDirection)
00169 
00170 
00173 enum ZoomLevel {
00174     DesktopZoom = 0, 
00176     GroupZoom,       
00178     OverviewZoom     
00179 };
00180 
00184 enum IntervalAlignment {
00185     NoAlignment = 0,
00186     AlignToMinute,
00187     AlignToHour
00188 };
00189 
00190 enum ItemTypes {
00191     AppletType = QGraphicsItem::UserType + 1,
00192     LineEditType = QGraphicsItem::UserType + 2
00193 };
00194 
00200 enum ImmutabilityType {
00201     Mutable = 1,        
00202     UserImmutable = 2,  
00204     SystemImmutable = 4 
00206 };
00207 
00211 enum AspectRatioMode {
00212     InvalidAspectRatioMode = -1, 
00215     IgnoreAspectRatio = 0,       
00216     KeepAspectRatio = 1,         
00217     Square = 2,                  
00218     ConstrainedSquare = 3,       
00221     FixedSize = 4                
00222 };
00223 
00228 enum ComponentType {
00229     AppletComponent = 1,      
00230     DataEngineComponent = 2,  
00231     RunnerComponent = 4,      
00232     AnimatorComponent = 8,    
00233     ContainmentComponent = 16 
00234 };
00235 Q_DECLARE_FLAGS(ComponentTypes, ComponentType)
00236 
00237 enum MarginEdge {
00238     TopMargin = 0,
00239     BottomMargin,
00240     LeftMargin,
00241     RightMargin
00242 };
00243 
00244 enum MessageButton {
00245     ButtonNone = 0,
00246     ButtonOk = 1,
00247     ButtonYes = 2,
00248     ButtonNo = 4,
00249     ButtonCancel = 8
00250 };
00251 Q_DECLARE_FLAGS(MessageButtons, MessageButton)
00252 
00253 
00254 
00257 PLASMA_EXPORT qreal scalingFactor(ZoomLevel level);
00258 
00266 PLASMA_EXPORT Direction locationToDirection(Location location);
00267 
00275 PLASMA_EXPORT Direction locationToInverseDirection(Location location);
00276 
00283 PLASMA_EXPORT QGraphicsView *viewFor(const QGraphicsItem *item);
00284 
00285 } // Plasma namespace
00286 
00287 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Constraints)
00288 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Flip)
00289 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::ComponentTypes)
00290 
00291 #endif // multiple inclusion guard

Plasma

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal