home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / KoBrush.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-30  |  2.8 KB  |  107 lines

  1. // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
  2. /* This file is part of the KDE project
  3.    Copyright (C) 2005-2006 Thorsten Zachmann <zachmann@kde.org>
  4.  
  5.    This library is free software; you can redistribute it and/or
  6.    modify it under the terms of the GNU Library General Public
  7.    License as published by the Free Software Foundation; either
  8.    version 2 of the License, or (at your option) any later version.
  9.  
  10.    This library is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.    Library General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU Library General Public License
  16.    along with this library; see the file COPYING.LIB.  If not, write to
  17.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18.  * Boston, MA 02110-1301, USA.
  19. */
  20.  
  21. #ifndef KOBRUSH_H
  22. #define KOBRUSH_H
  23.  
  24. #include <qbrush.h>
  25.  
  26. class KoGenStyle;
  27. class KoGenStyles;
  28. class KoOasisContext;
  29. class QDomElement;
  30.  
  31.  
  32. enum BCType {
  33.     BCT_PLAIN = 0,
  34.     BCT_GHORZ = 1,
  35.     BCT_GVERT = 2,
  36.     BCT_GDIAGONAL1 = 3,
  37.     BCT_GDIAGONAL2 = 4,
  38.     BCT_GCIRCLE = 5,
  39.     BCT_GRECT = 6,
  40.     BCT_GPIPECROSS = 7,
  41.     BCT_GPYRAMID = 8
  42. };
  43.  
  44. enum FillType
  45. {
  46.     FT_BRUSH = 0,
  47.     FT_GRADIENT = 1
  48. };
  49.  
  50. class KoBrush
  51. {
  52. public:
  53.     KoBrush();
  54.     KoBrush(  const QBrush &brush, const QColor &gColor1, const QColor &gColor2,
  55.               BCType gType, FillType fillType, bool unbalanced,
  56.               int xfactor, int yfactor );
  57.  
  58.     KoBrush &operator=( const KoBrush &brush );
  59.  
  60.     void setBrush( const QBrush &brush )
  61.         {  m_brush = brush; }
  62.     void setGColor1( const QColor &gColor1 )
  63.         {  m_gColor1 = gColor1; }
  64.     void setGColor2( const QColor &gColor2 )
  65.         {  m_gColor2 = gColor2; }
  66.     void setGType( BCType gType )
  67.         {  m_gType = gType; }
  68.     void setFillType( FillType fillType )
  69.         {  m_fillType = fillType; }
  70.     void setGUnbalanced( bool unbalanced )
  71.         {  m_unbalanced = unbalanced; }
  72.     void setGXFactor( int xfactor )
  73.         {  m_xfactor = xfactor; }
  74.     void setGYFactor( int yfactor )
  75.         {  m_yfactor = yfactor; }
  76.  
  77.     QBrush getBrush() const
  78.         { return m_brush; }
  79.     QColor getGColor1() const
  80.         { return m_gColor1; }
  81.     QColor getGColor2() const
  82.         { return m_gColor2; }
  83.     BCType getGType() const
  84.         { return m_gType; }
  85.     FillType getFillType() const
  86.         { return m_fillType; }
  87.     bool getGUnbalanced() const
  88.         { return m_unbalanced; }
  89.     int getGXFactor() const
  90.         { return m_xfactor; }
  91.     int getGYFactor() const
  92.         { return m_yfactor; }
  93.  
  94. private:
  95.     QBrush m_brush;
  96.     QColor m_gColor1;
  97.     QColor m_gColor2;
  98.     BCType m_gType;
  99.     FillType m_fillType;
  100.     bool m_unbalanced;
  101.     int m_xfactor;
  102.     int m_yfactor;
  103. };
  104.  
  105. #endif /* KOBRUSH_H */
  106.  
  107.