OSDN Git Service

Automatically align underspecified tasks boundaries on project boundaries when possible.
[tjqt4port/tj2qt4.git] / taskjuggler / TableCellInfo.h
1 /*
2  * TableCellInfo.h - TaskJuggler
3  *
4  * Copyright (c) 2001, 2002, 2003, 2004 by Chris Schlaeger <cs@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * $Id$
11  */
12
13 #ifndef _TableCellInfo_h_
14 #define _TableCellInfo_h_
15
16 class TableColumnFormat;
17 class TableLineInfo;
18 class TableColumnInfo;
19
20 class TableCellInfo
21 {
22 public:
23     TableCellInfo(TableColumnFormat* tcf_, TableLineInfo* tli_,
24                   TableColumnInfo* tci_) :
25         tcf(tcf_),
26         tli(tli_),
27         tci(tci_),
28         rows(1),
29         columns(1),
30         rightPadding(-1),
31         leftPadding(-1),
32         hAlign(),
33         bgColor(),
34         boldText(false),
35         fontFactor(100),
36         statusText(),
37         toolTipID(),
38         toolTipText()
39     { }
40
41     ~TableCellInfo() { }
42
43     void setRows(int r) { rows = r; }
44     int getRows() const { return rows; }
45
46     void setColumns(int c) { columns = c; }
47     int getColumns() const { return columns; }
48
49     void setRightPadding(int rp) { rightPadding = rp; }
50     int getRightPadding() const { return rightPadding; }
51
52     void setLeftPadding(int lp) { leftPadding = lp; }
53     int getLeftPadding() const { return leftPadding; }
54
55     void setHAlign(const QString& a) { hAlign = a; }
56     const QString& getHAlign() const { return hAlign; }
57
58     void setBgColor(const QColor& bgc) { bgColor = bgc; }
59     const QColor& getBgColor() const { return bgColor; }
60
61     void setBoldText(bool b) { boldText = b; }
62     bool getBoldText() const { return boldText; }
63
64     void setFontFactor(int ff) { fontFactor = ff; }
65     int getFontFactor() const { return fontFactor; }
66
67     void setStatusText(const QString& s) { statusText = s; }
68     const QString& getStatusText() const { return statusText; }
69
70     void setToolTipID(const QString& s) { toolTipID = s; }
71     const QString& getToolTipID() const { return toolTipID; }
72
73     void setToolTipText(const QString& s) { toolTipText = s; }
74     const QString& getToolTipText() const { return toolTipText; }
75
76     TableColumnFormat* const tcf;
77     TableLineInfo* const tli;
78     TableColumnInfo* const tci;
79
80 private:
81     int rows;
82     int columns;
83     int rightPadding;
84     int leftPadding;
85     QString hAlign;
86     QColor bgColor;
87     bool boldText;
88     int fontFactor;
89     QString statusText;
90     QString toolTipID;
91     QString toolTipText;
92 } ;
93
94 #endif
95