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.

176 lines
6.7KB

  1. /* This file is part of the KDE project
  2. Copyright 2002-2003 Joseph Wenninger <jowenn@kde.org>
  3. Copyright 2002 Ariya Hidayat <ariya@kde.org>
  4. Copyright 2002 Philipp Mueller <philipp.mueller@gmx.de>
  5. Copyright 2001 David Faure <faure@kde.org
  6. Copyright 2001 Simon Hausmann <hausmann@kde.org>
  7. Copyright 1999-2001 Laurent Montel <montel@kde.org>
  8. Copyright 1999 Torben Weis <weis@kde.org>
  9. This library is free software; you can redistribute it and/or
  10. modify it under the terms of the GNU Library General Public
  11. License as published by the Free Software Foundation; either
  12. version 2 of the License, or (at your option) any later version.
  13. This library is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  16. Library General Public License for more details.
  17. You should have received a copy of the GNU Library General Public License
  18. along with this library; see the file COPYING.LIB. If not, write to
  19. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  20. * Boston, MA 02110-1301, USA.
  21. */
  22. #ifndef KSPREAD_CELL_IFACE_H
  23. #define KSPREAD_CELL_IFACE_H
  24. #include <tqstringlist.h>
  25. #include <dcopobject.h>
  26. class TQPoint;
  27. namespace KSpread
  28. {
  29. class Sheet;
  30. class CellIface : virtual public DCOPObject
  31. {
  32. K_DCOP
  33. public:
  34. CellIface();
  35. void setCell( Sheet* sheet, const TQPoint& point );
  36. k_dcop:
  37. virtual bool isDefault() const;
  38. virtual bool isEmpty() const;
  39. virtual TQString text() const;
  40. virtual void setText( const TQString& text );
  41. virtual void setValue( int value );
  42. virtual void setValue( double value );
  43. virtual double value() const;
  44. virtual TQString visibleContentAsString() const;
  45. virtual void setBgColor(const TQString& _c);
  46. virtual void setBgColor(int r,int g,int b);
  47. virtual TQString bgColor() const;
  48. virtual void setTextColor(const TQString& _c);
  49. virtual void setTextColor(int r,int g,int b);
  50. virtual TQString textColor()const ;
  51. virtual void setComment(const TQString &_comment);
  52. virtual TQString comment()const;
  53. virtual void setAngle(int angle);
  54. virtual int angle() const ;
  55. virtual void setVerticalText(bool _vertical);
  56. virtual bool verticalText() const ;
  57. virtual void setMultiRow(bool _multi);
  58. virtual bool multiRow() const;
  59. virtual void setAlign(const TQString &_align);
  60. virtual TQString align() const;
  61. virtual void setAlignY(const TQString &_alignY);
  62. virtual TQString alignY() const;
  63. virtual void setPrefix(const TQString &_prefix);
  64. virtual TQString prefix() const;
  65. virtual void setPostfix(const TQString &_postfix);
  66. virtual TQString postfix() const;
  67. /** @deprecated use setFormatType*/
  68. virtual void setFormatNumber(const TQString &ft) { setFormatType(ft); }
  69. virtual void setFormatType(const TQString &formatType);
  70. /** @deprecated use getFormatType */
  71. virtual TQString getFormatNumber() const { return getFormatType(); }
  72. virtual TQString getFormatType() const;
  73. virtual void setPrecision(int _p);
  74. virtual int precision() const;
  75. //font
  76. virtual void setTextFontBold( bool _b );
  77. virtual bool textFontBold( ) const;
  78. virtual void setTextFontItalic( bool _b );
  79. virtual bool textFontItalic( ) const;
  80. virtual void setTextFontUnderline( bool _b );
  81. virtual bool textFontUnderline( ) const;
  82. virtual void setTextFontStrike( bool _b );
  83. virtual bool textFontStrike( ) const;
  84. virtual void setTextFontSize( int _size );
  85. virtual int textFontSize() const;
  86. virtual void setTextFontFamily( const TQString& _font );
  87. virtual TQString textFontFamily() const;
  88. //border left
  89. virtual void setLeftBorderStyle( const TQString& _style );
  90. virtual void setLeftBorderColor(const TQString& _c);
  91. virtual void setLeftBorderColor(int r,int g,int b);
  92. virtual void setLeftBorderWidth( int _size );
  93. virtual int leftBorderWidth() const;
  94. virtual TQString leftBorderColor() const;
  95. virtual TQString leftBorderStyle() const;
  96. //border right
  97. virtual void setRightBorderStyle( const TQString& _style );
  98. virtual void setRightBorderColor(const TQString& _c);
  99. virtual void setRightBorderColor(int r,int g,int b);
  100. virtual void setRightBorderWidth( int _size );
  101. virtual int rightBorderWidth() const;
  102. virtual TQString rightBorderColor() const;
  103. virtual TQString rightBorderStyle() const;
  104. //border top
  105. virtual void setTopBorderStyle( const TQString& _style );
  106. virtual void setTopBorderColor(const TQString& _c);
  107. virtual void setTopBorderColor(int r,int g,int b);
  108. virtual void setTopBorderWidth( int _size );
  109. virtual int topBorderWidth() const;
  110. virtual TQString topBorderColor() const;
  111. virtual TQString topBorderStyle() const;
  112. //border bottom
  113. virtual void setBottomBorderStyle( const TQString& _style );
  114. virtual void setBottomBorderColor(const TQString& _c);
  115. virtual void setBottomBorderColor(int r,int g,int b);
  116. virtual void setBottomBorderWidth( int _size );
  117. virtual int bottomBorderWidth() const;
  118. virtual TQString bottomBorderColor() const;
  119. virtual TQString bottomBorderStyle() const;
  120. // fall back diagonal
  121. virtual void setFallDiagonalStyle( const TQString& _style );
  122. virtual void setFallDiagonalColor(const TQString& _c);
  123. virtual void setFallDiagonalColor(int r,int g,int b);
  124. virtual void setFallDiagonalWidth( int _size );
  125. virtual int fallDiagonalWidth() const;
  126. virtual TQString fallDiagonalColor() const;
  127. virtual TQString fallDiagonalStyle() const;
  128. //GoUpDiagonal
  129. virtual void setGoUpDiagonalStyle( const TQString& _style );
  130. virtual void setGoUpDiagonalColor(const TQString& _c);
  131. virtual void setGoUpDiagonalColor(int r,int g,int b);
  132. virtual void setGoUpDiagonalWidth( int _size );
  133. virtual int goUpDiagonalWidth() const;
  134. virtual TQString goUpDiagonalColor() const;
  135. virtual TQString goUpDiagonalStyle() const;
  136. //indent
  137. virtual void setIndent(double indent);
  138. virtual double getIndent() const ;
  139. //don't print text
  140. virtual void setDontPrintText ( bool _b);
  141. virtual bool getDontprintText() const ;
  142. virtual bool hasValidation() const;
  143. virtual void removeValidity();
  144. virtual TQString validationTitle() const;
  145. virtual TQString validationMessage() const;
  146. virtual bool displayValidationMessage() const;
  147. virtual bool validationAllowEmptyCell() const;
  148. virtual bool displayValidationInformation() const;
  149. virtual TQStringList listValidation() const;
  150. virtual TQString validationTitleInfo() const;
  151. virtual TQString validationMessageInfo() const;
  152. private:
  153. TQPoint m_point;
  154. Sheet* m_sheet;
  155. };
  156. } // namespace KSpread
  157. #endif