F:/KPlato/koffice/libs/kofficeui/KoBrush.h

Aller à la documentation de ce fichier.
00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 2005-2006 Thorsten Zachmann <zachmann@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KOBRUSH_H
00022 #define KOBRUSH_H
00023 
00024 #include <QBrush>
00025 
00026 #include "koffice_export.h"
00027 
00028 class KoGenStyle;
00029 class KoGenStyles;
00030 class KoOasisContext;
00031 class QDomElement;
00032 
00033 
00034 enum BCType {
00035     BCT_PLAIN = 0,
00036     BCT_GHORZ = 1,
00037     BCT_GVERT = 2,
00038     BCT_GDIAGONAL1 = 3,
00039     BCT_GDIAGONAL2 = 4,
00040     BCT_GCIRCLE = 5,
00041     BCT_GRECT = 6,
00042     BCT_GPIPECROSS = 7,
00043     BCT_GPYRAMID = 8
00044 };
00045 
00046 enum FillType
00047 {
00048     FT_BRUSH = 0,
00049     FT_GRADIENT = 1
00050 };
00051 
00052 class KOFFICEUI_EXPORT KoBrush
00053 {
00054 public:
00055     KoBrush();
00056     KoBrush(  const QBrush &brush, const QColor &gColor1, const QColor &gColor2,
00057               BCType gType, FillType fillType, bool unbalanced,
00058               int xfactor, int yfactor );
00059 
00060     KoBrush &operator=( const KoBrush &brush );
00061 
00062     void setBrush( const QBrush &brush )
00063         {  m_brush = brush; }
00064     void setGColor1( const QColor &gColor1 )
00065         {  m_gColor1 = gColor1; }
00066     void setGColor2( const QColor &gColor2 )
00067         {  m_gColor2 = gColor2; }
00068     void setGType( BCType gType )
00069         {  m_gType = gType; }
00070     void setFillType( FillType fillType )
00071         {  m_fillType = fillType; }
00072     void setGUnbalanced( bool unbalanced )
00073         {  m_unbalanced = unbalanced; }
00074     void setGXFactor( int xfactor )
00075         {  m_xfactor = xfactor; }
00076     void setGYFactor( int yfactor )
00077         {  m_yfactor = yfactor; }
00078 
00079     QBrush getBrush() const
00080         { return m_brush; }
00081     QColor getGColor1() const
00082         { return m_gColor1; }
00083     QColor getGColor2() const
00084         { return m_gColor2; }
00085     BCType getGType() const
00086         { return m_gType; }
00087     FillType getFillType() const
00088         { return m_fillType; }
00089     bool getGUnbalanced() const
00090         { return m_unbalanced; }
00091     int getGXFactor() const
00092         { return m_xfactor; }
00093     int getGYFactor() const
00094         { return m_yfactor; }
00095 
00096 private:
00097     QBrush m_brush;
00098     QColor m_gColor1;
00099     QColor m_gColor2;
00100     BCType m_gType;
00101     FillType m_fillType;
00102     bool m_unbalanced;
00103     int m_xfactor;
00104     int m_yfactor;
00105 };
00106 
00107 #endif /* KOBRUSH_H */
00108 

Généré le Wed Nov 22 23:41:04 2006 pour KPlato par  doxygen 1.5.1-p1