本文整理汇总了C++中QTextTableFormat::boolProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ QTextTableFormat::boolProperty方法的具体用法?C++ QTextTableFormat::boolProperty怎么用?C++ QTextTableFormat::boolProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QTextTableFormat
的用法示例。
在下文中一共展示了QTextTableFormat::boolProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cellStyle
KoTableCellStyle KoTextLayoutTableArea::Private::effectiveCellStyle(const QTextTableCell &tableCell)
{
QTextTableFormat tableFormat = table->format();
KoTableCellStyle cellStyle(tableCell.format().toTableCellFormat());
if (documentLayout->styleManager() && table->format().hasProperty(KoTableStyle::TableTemplate)) {
if (KoTextTableTemplate *tableTemplate = documentLayout->styleManager()->tableTemplate(table->format().intProperty(KoTableStyle::TableTemplate))) {
//priorities according to ODF 1.2, 16.18 - table:table-template
if (tableCell.column() == 0 && tableTemplate->firstColumn()
&& tableFormat.boolProperty(KoTableStyle::UseFirstColumnStyles)) {
cellStyle = *(documentLayout->styleManager()->tableCellStyle(tableTemplate->firstColumn()));
return cellStyle;
}
if (tableCell.column() == (table->columns() - 1) && tableTemplate->lastColumn()
&& tableFormat.boolProperty(KoTableStyle::UseLastColumnStyles)) {
cellStyle = *(documentLayout->styleManager()->tableCellStyle(tableTemplate->lastColumn()));
return cellStyle;
}
if (tableCell.row() == 0 && tableTemplate->firstRow()
&& tableFormat.boolProperty(KoTableStyle::UseFirstRowStyles)) {
cellStyle = *(documentLayout->styleManager()->tableCellStyle(tableTemplate->firstRow()));
return cellStyle;
}
if (tableCell.row() == (table->rows() - 1) && tableTemplate->lastRow()
&& tableFormat.boolProperty(KoTableStyle::UseLastRowStyles)) {
cellStyle = *(documentLayout->styleManager()->tableCellStyle(tableTemplate->lastRow()));
return cellStyle;
}
if (((tableCell.row() + 1) % 2) == 0 && tableTemplate->evenRows()
&& tableFormat.boolProperty(KoTableStyle::UseBandingRowStyles)) {
cellStyle = *(documentLayout->styleManager()->tableCellStyle(tableTemplate->evenRows()));
return cellStyle;
}
if (((tableCell.row() + 1) % 2) != 0 && tableTemplate->oddRows()
&& tableFormat.boolProperty(KoTableStyle::UseBandingRowStyles)) {
cellStyle = *(documentLayout->styleManager()->tableCellStyle(tableTemplate->oddRows()));
return cellStyle;
}
if (((tableCell.column() + 1) % 2) == 0 && tableTemplate->evenColumns()
&& tableFormat.boolProperty(KoTableStyle::UseBandingColumnStyles)) {
cellStyle = *(documentLayout->styleManager()->tableCellStyle(tableTemplate->evenColumns()));
return cellStyle;
}
if (((tableCell.column() + 1) % 2) != 0 && tableTemplate->oddColumns()
&& tableFormat.boolProperty(KoTableStyle::UseBandingColumnStyles)) {
cellStyle = *(documentLayout->styleManager()->tableCellStyle(tableTemplate->oddColumns()));
return cellStyle;
}
if (tableTemplate->body()) {
cellStyle = *(documentLayout->styleManager()->tableCellStyle(tableTemplate->body()));
}
}
}
return cellStyle;
}