Commit 417c04b7 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Allow setting of visibility attribute (visible, collapse, filter)

svn path=/trunk/koffice/; revision=757441
parent 52870b68
......@@ -26,8 +26,17 @@ class TableRow::Private
{
public:
Private()
{
softPageBreak = false;
repeated = 0;
visibility = Visible;
}
QList<TableCell*> cells;
bool softPageBreak;
int repeated;
Visibility visibility;
};
TableRow::TableRow( int columns )
......@@ -62,4 +71,36 @@ bool TableRow::softPageBreak() const
return d->softPageBreak;
}
void TableRow::setRepeat(int repeat)
{
d->repeated = repeat;
}
int TableRow::repeat() const
{
return d->repeated;
}
void TableRow::setVisibility(const QString & visibility)
{
if (visibility == "collapse") {
d->visibility = Collapse;
}
else if (visibility == "filter") {
d->visibility = Filter;
}
else {
d->visibility = Visible;
}
}
void TableRow::setVisibility(Visibility visibility)
{
d->visibility = visibility;
}
TableRow::Visibility TableRow::visibility() const
{
return d->visibility;
}
#include "TableRow.moc"
......@@ -32,6 +32,12 @@ Q_OBJECT
public:
enum Visibility {
Visible,
Collapse,
Filter
};
/**
* create a new table row.
*
......@@ -53,6 +59,10 @@ public:
void setRepeat(int repeat);
int repeat() const;
/// Set the visibility of this row as per 8.1.2, table:visibility
void setVisibility(const QString & visibility);
void setVisibility(Visibility visibility);
Visibility visibility() const;
signals:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment