File indexing completed on 2024-05-12 16:41:07
0001 /*************************************************************************** 0002 Copyright (C) 2008 by Mathias Soeken (msoeken@informatik.uni-bremen.de) 0003 ***************************************************************************/ 0004 0005 /*************************************************************************** 0006 * * 0007 * This program is free software; you can redistribute it and/or modify * 0008 * it under the terms of the GNU General Public License as published by * 0009 * the Free Software Foundation; either version 2 of the License, or * 0010 * (at your option) any later version. * 0011 * * 0012 ***************************************************************************/ 0013 0014 #ifndef TABULARPROPERTIES_H 0015 #define TABULARPROPERTIES_H 0016 0017 #include <QColor> 0018 #include <QList> 0019 #include <QHash> 0020 #include <QString> 0021 #include <QStringList> 0022 0023 namespace KileDocument { 0024 class LatexCommands; 0025 } 0026 0027 namespace KileDialog { 0028 0029 /** 0030 * @brief This class stores data while generating LaTeX output. 0031 * 0032 * This class saves information like whether the \multicolumn command 0033 * and/or other commands have been used. 0034 */ 0035 class TabularProperties { 0036 public: 0037 TabularProperties(); 0038 0039 void setUseMultiColumn(bool useMultiColumn = true); 0040 bool useMultiColumn() const; 0041 0042 void addRowColor(int row, const QColor &color); 0043 void addColor(const QColor &color); 0044 QColor rowColor(int row) const; 0045 QString colorName(const QColor &color) const; 0046 const QHash<QString, QString>& colorNames() const; 0047 0048 const QStringList& requiredPackages() const; 0049 0050 void setBullet(const QString &bullet); 0051 QString bullet() const; 0052 0053 void addBorderUnderRow(int row); 0054 bool hasBorderUnderRow(int row) const; 0055 void setHasTopBorder(); 0056 bool hasTopBorder() const; 0057 0058 void addBorderBesideColumn(int column); 0059 bool hasBorderBesideColumn(int column) const; 0060 void setHasLeftBorder(); 0061 bool hasLeftBorder() const; 0062 0063 private: 0064 bool m_UseMultiColumn; 0065 QHash<int, QColor> m_RowColors; 0066 QHash<QString, QString> m_ColorNames; 0067 int m_ColorIndex; 0068 QStringList m_RequiredPackages; 0069 QString m_Bullet; 0070 QList<int> m_BorderUnderRow; 0071 bool m_TopBorder; 0072 QList<int> m_BorderBesideColumn; 0073 bool m_LeftBorder; 0074 }; 0075 0076 } 0077 0078 #endif