LibEngsas
espreadsheetcell.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2012 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 
19 
20 #ifndef ESPREADSHEETCELL_H
21 #define ESPREADSHEETCELL_H
22 
23 #include "eglobal.h"
24 
25 #include <QVariant>
26 #include <QFont>
27 #include <QBrush>
28 
41 {
42  public:
44  ESpreadsheetCell(int row, int column, QVariant value = QVariant());
45 
49  bool isValid() const;
50  int row() const;
51  void setRow(int row);
52  int column() const;
53  void setColumn(int column);
54 
55  QVariant value() const;
56  void setValue(QVariant value);
57  QFont font() const;
58  void setFont(QFont font);
59  void setFont(QVariant font);
60  Qt::Alignment alignment() const;
61  void setAlignment(int alignment);
62  void setAlignment(QVariant alignment);
63  QBrush foreground() const;
64  void setForeground(QBrush foreground);
65  void setForeground(QVariant foreground);
66  QBrush background() const;
67  void setBackground(QBrush background);
68  void setBackground(QVariant background);
69 
70  private:
71  void init();
72 
73  int myRow, myColumn;
74  QVariant myValue;
75  QFont myFont;
76  QBrush myForeground, myBackground;
77  Qt::Alignment myAlignment;
78 };
79 
80 #endif // ESPREADSHEETCELL_H
QFont myFont
Definition: espreadsheetcell.h:75
QBrush myForeground
Definition: espreadsheetcell.h:76
QVariant myValue
Definition: espreadsheetcell.h:74
#define E_CORE_EXPORT
Definition: eglobal.h:107
int myRow
Definition: espreadsheetcell.h:73
Represents one cell of a ESpreadsheetIt contains the value (see value()) of a cell and also the forma...
Definition: espreadsheetcell.h:40
Qt::Alignment myAlignment
Definition: espreadsheetcell.h:77