ConditionalFormatting Class
Conditional formatting for single cell or ranges More...
Header: | #include <ConditionalFormatting> |
Public Types
enum | HighlightRuleType { Highlight_LessThan, Highlight_LessThanOrEqual, Highlight_Equal, Highlight_NotEqual, ..., Highlight_Expression } |
enum | ValueObjectType { VOT_Formula, VOT_Max, VOT_Min, VOT_Num, VOT_Percent, VOT_Percentile } |
Public Functions
ConditionalFormatting() | |
ConditionalFormatting(const ConditionalFormatting & other) | |
~ConditionalFormatting() | |
bool | add2ColorScaleRule(const QColor & minColor, const QColor & maxColor, bool stopIfTrue = false) |
bool | add3ColorScaleRule(const QColor & minColor, const QColor & midColor, const QColor & maxColor, bool stopIfTrue = false) |
void | addCell(const CellReference & cell) |
void | addCell(int row, int col) |
bool | addDataBarRule(const QColor & color, ValueObjectType type1, const QString & val1, ValueObjectType type2, const QString & val2, bool showData = true, bool stopIfTrue = false) |
bool | addDataBarRule(const QColor & color, bool showData = true, bool stopIfTrue = false) |
bool | addHighlightCellsRule(HighlightRuleType type, const QString & formula1, const QString & formula2, const Format & format, bool stopIfTrue = false) |
bool | addHighlightCellsRule(HighlightRuleType type, const Format & format, bool stopIfTrue = false) |
bool | addHighlightCellsRule(HighlightRuleType type, const QString & formula, const Format & format, bool stopIfTrue = false) |
void | addRange(const CellRange & range) |
void | addRange(int firstRow, int firstCol, int lastRow, int lastCol) |
QList<CellRange> | ranges() const |
ConditionalFormatting & | operator=(const ConditionalFormatting & other) |
Detailed Description
Conditional formatting for single cell or ranges
The conditional formatting can be applied to a single cell or ranges of cells.
Member Type Documentation
enum ConditionalFormatting::HighlightRuleType
Constant | Value |
---|---|
ConditionalFormatting::Highlight_LessThan | 0 |
ConditionalFormatting::Highlight_LessThanOrEqual | 1 |
ConditionalFormatting::Highlight_Equal | 2 |
ConditionalFormatting::Highlight_NotEqual | 3 |
ConditionalFormatting::Highlight_GreaterThanOrEqual | 4 |
ConditionalFormatting::Highlight_GreaterThan | 5 |
ConditionalFormatting::Highlight_Between | 6 |
ConditionalFormatting::Highlight_NotBetween | 7 |
ConditionalFormatting::Highlight_ContainsText | 8 |
ConditionalFormatting::Highlight_NotContainsText | 9 |
ConditionalFormatting::Highlight_BeginsWith | 10 |
ConditionalFormatting::Highlight_EndsWith | 11 |
ConditionalFormatting::Highlight_TimePeriod | 12 |
ConditionalFormatting::Highlight_Duplicate | 13 |
ConditionalFormatting::Highlight_Unique | 14 |
ConditionalFormatting::Highlight_Blanks | 15 |
ConditionalFormatting::Highlight_NoBlanks | 16 |
ConditionalFormatting::Highlight_Errors | 17 |
ConditionalFormatting::Highlight_NoErrors | 18 |
ConditionalFormatting::Highlight_Top | 19 |
ConditionalFormatting::Highlight_TopPercent | 20 |
ConditionalFormatting::Highlight_Bottom | 21 |
ConditionalFormatting::Highlight_BottomPercent | 22 |
ConditionalFormatting::Highlight_AboveAverage | 23 |
ConditionalFormatting::Highlight_AboveOrEqualAverage | 24 |
ConditionalFormatting::Highlight_BelowAverage | 28 |
ConditionalFormatting::Highlight_BelowOrEqualAverage | 29 |
ConditionalFormatting::Highlight_AboveStdDev1 | 25 |
ConditionalFormatting::Highlight_AboveStdDev2 | 26 |
ConditionalFormatting::Highlight_AboveStdDev3 | 27 |
ConditionalFormatting::Highlight_BelowStdDev1 | 30 |
ConditionalFormatting::Highlight_BelowStdDev2 | 31 |
ConditionalFormatting::Highlight_BelowStdDev3 | 32 |
ConditionalFormatting::Highlight_Expression | 33 |
enum ConditionalFormatting::ValueObjectType
Constant | Value |
---|---|
ConditionalFormatting::VOT_Formula | 0 |
ConditionalFormatting::VOT_Max | 1 |
ConditionalFormatting::VOT_Min | 2 |
ConditionalFormatting::VOT_Num | 3 |
ConditionalFormatting::VOT_Percent | 4 |
ConditionalFormatting::VOT_Percentile | 5 |
Member Function Documentation
ConditionalFormatting::ConditionalFormatting()
Construct a conditional formatting object
ConditionalFormatting::ConditionalFormatting(const ConditionalFormatting & other)
Constructs a copy of other.
ConditionalFormatting::~ConditionalFormatting()
Destroy the object.
bool ConditionalFormatting::add2ColorScaleRule(const QColor & minColor, const QColor & maxColor, bool stopIfTrue = false)
Add a colorScale rule with the given minColor, maxColor and stopIfTrue. Return false if failed.
bool ConditionalFormatting::add3ColorScaleRule(const QColor & minColor, const QColor & midColor, const QColor & maxColor, bool stopIfTrue = false)
Add a colorScale rule with the given minColor, midColor, maxColor and stopIfTrue. Return false if failed.
void ConditionalFormatting::addCell(const CellReference & cell)
Add the cell on which the conditional formatting will apply to.
void ConditionalFormatting::addCell(int row, int col)
This is an overloaded function.
Add the cell(row, col) on which the conditional formatting will apply to.
bool ConditionalFormatting::addDataBarRule(const QColor & color, ValueObjectType type1, const QString & val1, ValueObjectType type2, const QString & val2, bool showData = true, bool stopIfTrue = false)
Add a dataBar rule with the given color, type1, val1 , type2, val2, showData and stopIfTrue. Return false if failed.
bool ConditionalFormatting::addDataBarRule(const QColor & color, bool showData = true, bool stopIfTrue = false)
This is an overloaded function.
Add a dataBar rule with the given color, showData and stopIfTrue.
bool ConditionalFormatting::addHighlightCellsRule(HighlightRuleType type, const QString & formula1, const QString & formula2, const Format & format, bool stopIfTrue = false)
Add a hightlight rule with the given type, formula1, formula2, format and stopIfTrue. Return false if failed.
bool ConditionalFormatting::addHighlightCellsRule(HighlightRuleType type, const Format & format, bool stopIfTrue = false)
This is an overloaded function.
Add a hightlight rule with the given type format and stopIfTrue.
bool ConditionalFormatting::addHighlightCellsRule(HighlightRuleType type, const QString & formula, const Format & format, bool stopIfTrue = false)
This is an overloaded function.
Add a hightlight rule with the given type, formula, format and stopIfTrue. Return false if failed.
void ConditionalFormatting::addRange(const CellRange & range)
Add the range on which the conditional formatting will apply to.
void ConditionalFormatting::addRange(int firstRow, int firstCol, int lastRow, int lastCol)
This is an overloaded function.
Add the range(firstRow, firstCol, lastRow, lastCol) on which the conditional formatting will apply to.
QList<CellRange> ConditionalFormatting::ranges() const
Returns the ranges on which the validation will be applied.
ConditionalFormatting & ConditionalFormatting::operator=(const ConditionalFormatting & other)
Assigns other to this conditional formatting and returns a reference to this conditional formatting.