• Skip to content
  • Skip to link menu
KDE 4.2 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,
00045     FormFactorConstraint = 1, 
00046     LocationConstraint = 2, 
00047     ScreenConstraint = 4, 
00048     SizeConstraint = 8, 
00049     ImmutableConstraint = 16, 
00050     StartupCompletedConstraint = 32, 
00051     ContextConstraint = 64, 
00052     AllConstraints = FormFactorConstraint | LocationConstraint | ScreenConstraint |
00053     SizeConstraint | ImmutableConstraint | ContextConstraint
00054 };
00055 Q_DECLARE_FLAGS(Constraints, Constraint)
00056 
00057 
00062 enum FormFactor {
00063     Planar = 0,  
00068     MediaCenter, 
00073     Horizontal,  
00075     Vertical     
00077 };
00078 
00085 enum Direction {
00086     Down = 0, 
00087     Up,       
00088     Left,     
00089     Right     
00090 };
00091 
00095 enum ZoomDirection {
00096     ZoomIn = 0, 
00097     ZoomOut = 1 
00098 };
00099 
00104 enum Location {
00105     Floating = 0, 
00107     Desktop,      
00109     FullScreen,   
00110     TopEdge,      
00111     BottomEdge,   
00112     LeftEdge,     
00113     RightEdge     
00114 };
00115 
00120 enum Position {
00121     LeftPositioned,    
00122     RightPositioned,   
00123     TopPositioned,     
00124     BottomPositioned,  
00125     CenterPositioned   
00126 };
00127 
00133 enum PopupPlacement {
00134     FloatingPopup = 0,            
00135     TopPosedLeftAlignedPopup,     
00137     TopPosedRightAlignedPopup,    
00139     LeftPosedTopAlignedPopup,     
00141     LeftPosedBottomAlignedPopup,  
00143     BottomPosedLeftAlignedPopup,  
00145     BottomPosedRightAlignedPopup, 
00147     RightPosedTopAlignedPopup,    
00149     RightPosedBottomAlignedPopup  
00151 };
00152 
00156 enum FlipDirection {
00157     NoFlip = 0,          
00158     HorizontalFlip = 1,  
00159     VerticalFlip = 2     
00160 };
00161 Q_DECLARE_FLAGS(Flip, FlipDirection)
00162 
00163 
00166 enum ZoomLevel {
00167     DesktopZoom = 0, 
00169     GroupZoom,       
00171     OverviewZoom     
00172 };
00173 
00177 enum IntervalAlignment {
00178     NoAlignment = 0,
00179     AlignToMinute,
00180     AlignToHour
00181 };
00182 
00183 enum ItemTypes {
00184     AppletType = QGraphicsItem::UserType + 1,
00185     LineEditType = QGraphicsItem::UserType + 2
00186 };
00187 
00193 enum ImmutabilityType {
00194     Mutable = 1,        
00195     UserImmutable = 2,  
00197     SystemImmutable = 4 
00199 };
00200 
00204 enum AspectRatioMode {
00205     InvalidAspectRatioMode = -1, 
00208     IgnoreAspectRatio = 0,       
00209     KeepAspectRatio = 1,         
00210     Square = 2,                  
00211     ConstrainedSquare = 3,       
00214     FixedSize = 4                
00215 };
00216 
00221 enum ComponentType {
00222     AppletComponent = 1,      
00223     DataEngineComponent = 2,  
00224     RunnerComponent = 4,      
00225     AnimatorComponent = 8,    
00226     ContainmentComponent = 16 
00227 };
00228 Q_DECLARE_FLAGS(ComponentTypes, ComponentType)
00229 
00230 enum MarginEdge {
00231     TopMargin = 0,
00232     BottomMargin,
00233     LeftMargin,
00234     RightMargin
00235 };
00236 
00240 PLASMA_EXPORT qreal scalingFactor(ZoomLevel level);
00241 
00249 PLASMA_EXPORT Direction locationToDirection(Location location);
00250 
00257 PLASMA_EXPORT QGraphicsView *viewFor(const QGraphicsItem *item);
00258 
00259 } // Plasma namespace
00260 
00261 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Constraints)
00262 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::Flip)
00263 Q_DECLARE_OPERATORS_FOR_FLAGS(Plasma::ComponentTypes)
00264 
00265 #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
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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