-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMmlMtableNode.h
49 lines (41 loc) · 1.24 KB
/
MmlMtableNode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef MMLMTABLENODE_H
#define MMLMTABLENODE_H
#include "Helpers.h"
#include "MmlDocument.h"
#include "MmlTableBaseNode.h"
#include <QDebug>
class MmlMtableNode : public MmlTableBaseNode
{
public:
MmlMtableNode( MmlDocument *document, const MmlAttributeMap &attribute_map ) : MmlTableBaseNode( MtableNode, document, attribute_map ) {}
double rowspacing() const;
double columnspacing() const;
double framespacing_hor() const;
double framespacing_ver() const;
FrameType frame() const;
FrameType columnlines( int idx ) const;
FrameType rowlines( int idx ) const;
protected:
virtual void layoutSymbol();
virtual QRectF symbolRect() const;
virtual void paintSymbol( QPainter *painter, double x_scaling, double y_scaling ) const;
private:
struct CellSizeData
{
void init( const MmlNode *first_row );
QList<double> col_widths, row_heights;
int numCols() const
{
return col_widths.count();
}
int numRows() const
{
return row_heights.count();
}
double colWidthSum() const;
double rowHeightSum() const;
};
CellSizeData m_cell_size_data;
double m_content_width, m_content_height;
};
#endif//MMLMTABLENODE_H