src/gui/itemviews/qtableview_p.h
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
    72 * spans are mentaly divided into sub spans so that the start of any subspans doesn't overlap
    72 * spans are mentaly divided into sub spans so that the start of any subspans doesn't overlap
    73 * with any other subspans. There is no real representation of the subspans.
    73 * with any other subspans. There is no real representation of the subspans.
    74 * The key of the first map is the row where the subspan starts, the value of the first map is
    74 * The key of the first map is the row where the subspan starts, the value of the first map is
    75 * a list (map) of all subspans that starts at the same row.  It is indexed with its row
    75 * a list (map) of all subspans that starts at the same row.  It is indexed with its row
    76 */
    76 */
    77 class QSpanCollection
    77 class Q_AUTOTEST_EXPORT QSpanCollection
    78 {
    78 {
    79 public:
    79 public:
    80     struct Span
    80     struct Span
    81     {
    81     {
    82         int m_top;
    82         int m_top;
   110     void updateInsertedRows(int start, int end);
   110     void updateInsertedRows(int start, int end);
   111     void updateInsertedColumns(int start, int end);
   111     void updateInsertedColumns(int start, int end);
   112     void updateRemovedRows(int start, int end);
   112     void updateRemovedRows(int start, int end);
   113     void updateRemovedColumns(int start, int end);
   113     void updateRemovedColumns(int start, int end);
   114 
   114 
       
   115 #ifdef QT_BUILD_INTERNAL
       
   116     bool checkConsistency() const;
       
   117 #endif
       
   118 
   115     typedef QLinkedList<Span *> SpanList;
   119     typedef QLinkedList<Span *> SpanList;
   116     SpanList spans; //lists of all spans
   120     SpanList spans; //lists of all spans
   117 private:
   121 private:
   118     //the indexes are negative so the QMap::lowerBound do what i need.
   122     //the indexes are negative so the QMap::lowerBound do what i need.
   119     typedef QMap<int, Span *> SubIndex;
   123     typedef QMap<int, Span *> SubIndex;