kspread
KSpread::SortManipulator Class Reference
Sorts the range that it gets, using various criteria. More...
#include <SortManipulator.h>

Public Member Functions | |
| SortManipulator () | |
| virtual | ~SortManipulator () |
| void | addSortBy (int v, bool asc) |
| void | clearSortOrder () |
| virtual bool | process (Element *element) |
| void | setCaseSensitive (bool v) |
| void | setCopyFormat (bool v) |
| void | setCustomList (QStringList l) |
| void | setSkipFirst (bool v) |
| void | setSortRows (bool v) |
| void | setUseCustomList (bool v) |
Protected Member Functions | |
| virtual Style | newFormat (Element *element, int col, int row) |
| virtual Value | newValue (Element *element, int col, int row, bool *parse, Format::Type *fmtType) |
| virtual bool | postProcessing () |
| virtual bool | preProcessing () |
| bool | shouldReorder (Element *element, int first, int second) |
| void | sort (Element *element) |
Protected Attributes | |
| CellStorage * | m_cellStorage |
| bool | m_cs |
| QStringList | m_customlist |
| bool | m_rows |
| bool | m_skipfirst |
| QList< int > | m_sortby |
| QList< bool > | m_sortorder |
| QHash< Cell, Style > | m_styles |
| bool | m_usecustomlist |
| QMap< int, int > | sorted |
Detailed Description
Sorts the range that it gets, using various criteria.
Definition at line 33 of file SortManipulator.h.
Constructor & Destructor Documentation
| SortManipulator::SortManipulator | ( | ) |
Definition at line 32 of file SortManipulator.cpp.
| SortManipulator::~SortManipulator | ( | ) | [virtual] |
Definition at line 45 of file SortManipulator.cpp.
Member Function Documentation
| void SortManipulator::addSortBy | ( | int | v, | |
| bool | asc | |||
| ) |
Add new sort type.
Indexed from 0. Sort types are used in order in which they're added.
Definition at line 100 of file SortManipulator.cpp.
| void SortManipulator::clearSortOrder | ( | ) |
Definition at line 106 of file SortManipulator.cpp.
this method should return new format for a given cell
Implements KSpread::AbstractDFManipulator.
Definition at line 128 of file SortManipulator.cpp.
| Value SortManipulator::newValue | ( | Element * | element, | |
| int | col, | |||
| int | row, | |||
| bool * | parse, | |||
| Format::Type * | fmtType | |||
| ) | [protected, virtual] |
Return new value.
row/col are relative to sheet, not element. If the function sets *parse to true, the value will be treated as an user-entered string and parsed by Cell.
Implements KSpread::AbstractDataManipulator.
Definition at line 112 of file SortManipulator.cpp.
| bool SortManipulator::postProcessing | ( | ) | [protected, virtual] |
Stops the undo recording and stores the old data.
Reimplemented from KSpread::AbstractDataManipulator.
Definition at line 90 of file SortManipulator.cpp.
| bool SortManipulator::preProcessing | ( | ) | [protected, virtual] |
Starts the undo recording.
Reimplemented from KSpread::AbstractDataManipulator.
Definition at line 65 of file SortManipulator.cpp.
| bool SortManipulator::process | ( | Element * | ) | [virtual] |
Processes element , a Region::Point or a Region::Range .
Invoked by mainProcessing() .
Reimplemented from KSpread::AbstractDFManipulator.
Definition at line 49 of file SortManipulator.cpp.
| void KSpread::SortManipulator::setCaseSensitive | ( | bool | v | ) | [inline] |
case sensitive sorting
Definition at line 45 of file SortManipulator.h.
| void KSpread::SortManipulator::setCopyFormat | ( | bool | v | ) | [inline] |
set whether cell formats should be moved with data
Definition at line 47 of file SortManipulator.h.
| void KSpread::SortManipulator::setCustomList | ( | QStringList | l | ) | [inline] |
set a custom list that will be used
Definition at line 51 of file SortManipulator.h.
| void KSpread::SortManipulator::setSkipFirst | ( | bool | v | ) | [inline] |
skip first row/column, as it contains headers
Definition at line 43 of file SortManipulator.h.
| void KSpread::SortManipulator::setSortRows | ( | bool | v | ) | [inline] |
true if rows are to be sorted, false if columns are
Definition at line 41 of file SortManipulator.h.
| void KSpread::SortManipulator::setUseCustomList | ( | bool | v | ) | [inline] |
set whether we will use a custom list
Definition at line 49 of file SortManipulator.h.
| bool SortManipulator::shouldReorder | ( | Element * | element, | |
| int | first, | |||
| int | second | |||
| ) | [protected] |
Definition at line 172 of file SortManipulator.cpp.
| void SortManipulator::sort | ( | Element * | element | ) | [protected] |
sort the data, filling the "sorted" structure
Definition at line 144 of file SortManipulator.cpp.
Member Data Documentation
CellStorage* KSpread::SortManipulator::m_cellStorage [protected] |
Definition at line 77 of file SortManipulator.h.
bool KSpread::SortManipulator::m_cs [protected] |
Definition at line 69 of file SortManipulator.h.
QStringList KSpread::SortManipulator::m_customlist [protected] |
Definition at line 70 of file SortManipulator.h.
bool KSpread::SortManipulator::m_rows [protected] |
Definition at line 69 of file SortManipulator.h.
bool KSpread::SortManipulator::m_skipfirst [protected] |
Definition at line 69 of file SortManipulator.h.
QList<int> KSpread::SortManipulator::m_sortby [protected] |
Definition at line 71 of file SortManipulator.h.
QList<bool> KSpread::SortManipulator::m_sortorder [protected] |
Definition at line 72 of file SortManipulator.h.
QHash<Cell, Style> KSpread::SortManipulator::m_styles [protected] |
Definition at line 78 of file SortManipulator.h.
bool KSpread::SortManipulator::m_usecustomlist [protected] |
Definition at line 69 of file SortManipulator.h.
QMap<int, int> KSpread::SortManipulator::sorted [protected] |
sorted order - which row/column will move to where
Definition at line 75 of file SortManipulator.h.
The documentation for this class was generated from the following files:
