QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgscomposertablecolumn.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgscomposertablecolumn.h
3  ------------------
4  begin : May 2014
5  copyright : (C) 2014 by Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSCOMPOSERTABLECOLUMN_H
19 #define QGSCOMPOSERTABLECOLUMN_H
20 
21 #include "qgscomposertable.h"
22 #include <QObject>
23 
27 class CORE_EXPORT QgsComposerTableColumn: public QObject
28 {
29  Q_OBJECT
30 
31  public:
32 
34  virtual ~QgsComposerTableColumn();
35 
42  virtual bool writeXML( QDomElement& columnElem, QDomDocument & doc ) const;
43 
49  virtual bool readXML( const QDomElement& columnElem );
50 
56  double width() const { return mWidth; }
57 
63  void setWidth( const double width ) { mWidth = width; }
64 
71  QString heading() const { return mHeading; }
72 
79  void setHeading( QString heading ) { mHeading = heading; }
80 
87  Qt::AlignmentFlag hAlignment() const { return mHAlignment; }
88 
95  void setHAlignment( Qt::AlignmentFlag alignment ) { mHAlignment = alignment; }
96 
104  QString attribute() const { return mAttribute; }
105 
113  void setAttribute( QString attribute ) { mAttribute = attribute; }
114 
123  Qt::SortOrder sortOrder() const { return mSortOrder; }
124 
133  void setSortOrder( Qt::SortOrder sortOrder ) { mSortOrder = sortOrder; }
134 
147  int sortByRank() const { return mSortByRank; }
148 
161  void setSortByRank( int sortByRank ) { mSortByRank = sortByRank; }
162 
167  QgsComposerTableColumn* clone();
168 
169  private:
170 
171  QColor mBackgroundColor; //curently unused
172  Qt::AlignmentFlag mHAlignment;
173  QString mHeading;
174  QString mAttribute;
175  int mSortByRank;
176  Qt::SortOrder mSortOrder;
177  double mWidth;
178 
179 };
180 
181 #endif // QGSCOMPOSERTABLECOLUMN_H