KOffice – TDE office suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.9KB

  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. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. * Boston, MA 02110-1301, USA.
  16. */
  17. #ifndef KSPREADBRUSH_H
  18. #define KSPREADBRUSH_H
  19. #include <tqbrush.h>
  20. #include "kspread_global.h"
  21. class KoGenStyle;
  22. class KoGenStyles;
  23. class KoOasisContext;
  24. class TQDomElement;
  25. class KSpreadBrush
  26. {
  27. public:
  28. KSpreadBrush();
  29. KSpreadBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2,
  30. BCType gType, FillType fillType, bool unbalanced,
  31. int xfactor, int yfactor );
  32. KSpreadBrush &operator=( const KSpreadBrush &brush );
  33. void setBrush( const TQBrush &brush )
  34. { m_brush = brush; }
  35. void setGColor1( const TQColor &gColor1 )
  36. { m_gColor1 = gColor1; }
  37. void setGColor2( const TQColor &gColor2 )
  38. { m_gColor2 = gColor2; }
  39. void setGType( BCType gType )
  40. { m_gType = gType; }
  41. void setFillType( FillType fillType )
  42. { m_fillType = fillType; }
  43. void setGUnbalanced( bool unbalanced )
  44. { m_unbalanced = unbalanced; }
  45. void setGXFactor( int xfactor )
  46. { m_xfactor = xfactor; }
  47. void setGYFactor( int yfactor )
  48. { m_yfactor = yfactor; }
  49. TQBrush getBrush() const
  50. { return m_brush; }
  51. TQColor getGColor1() const
  52. { return m_gColor1; }
  53. TQColor getGColor2() const
  54. { return m_gColor2; }
  55. BCType getGType() const
  56. { return m_gType; }
  57. FillType getFillType() const
  58. { return m_fillType; }
  59. bool getGUnbalanced() const
  60. { return m_unbalanced; }
  61. int getGXFactor() const
  62. { return m_xfactor; }
  63. int getGYFactor() const
  64. { return m_yfactor; }
  65. void saveOasisFillStyle( KoGenStyle &styleObjectAuto, KoGenStyles& mainStyles ) const;
  66. void loadOasisFillStyle( KoOasisContext &context, const char * propertyType );
  67. private:
  68. //TQString saveOasisGradientStyle( KoGenStyles& mainStyles ) const;
  69. TQBrush m_brush;
  70. TQColor m_gColor1;
  71. TQColor m_gColor2;
  72. BCType m_gType;
  73. FillType m_fillType;
  74. bool m_unbalanced;
  75. int m_xfactor;
  76. int m_yfactor;
  77. };
  78. #endif /* KSPREADBRUSH_H */