Skip to content
  • Clarence Dang's avatar
    kpColorCells changes, to follow up on kpColorCellsBase changes: · 6b9654e7
    Clarence Dang authored
    * Set geometry
      - setMinimumSize(), do not fix the size of the widget based on the number of rows
        or it will get too big
      - Minimum QSizePolicy both vertically and horizontally to not make its
        parent widget expand too much
    * Add vertical scrollbar
      - Leave room for the scrollbar to appear
      - Make scrollbar recalculate with widget resizes
        - Use kpColorCellsBase's new setCellsResizable() method
        - Delete resizeEvent() which prevented resize events reaching QTableWidget
          via kpColorCellsBase
    
    * Fix appendRow() and deleteLastRow() to add and delete _visual_ rows,
      independent of whether the current number of colors is divisible by
      the columnCount() [currently fixed at 11]
      - If you delete an only remaining row, the effect is to clear the
        row [see ensureHaveAtLeastOnRow()]
      - Adding only adds the invalid color, which kpColorCollection -- as of a recent
        commit -- no longer saves anyway
    
    * Set modified flag more consistently by using kpColorCellBase's new
      colorChanged() signal connected to the new slotColorChanged()
      - drag-and-drop now updates the modified flag and backing color collection
        - this supports drops to empty color cells
    
    * Remove HACK of specifying 300 columns to kpColorCellsBase in the ctor,
      since setRowCount() and setColumnCount() now work
    
    * Add WhatThis
    
    * Fix makeCellsMatchColorCollection() to support invalid colors (empty cells)
      in the new color collection (by clearing the old cells, which might not have
      been empty)
    
    * Rename static ::Palette*() methods to ::Table*() methods to be less confusing
    * Reintroduce special handling of 0 cells
    
    * Replace the hacky mouseReleaseEvent() with the new slotColorSelected()
      (using the new overload of the kpColorCellsBase::colorSelected() signal)
      - Remove fragile d->mouseButton hack
    
    * Emit rowCountChanged()
    * Emit isModifiedChanged() in setModified()
    
    * Remove dropEvent() since it did nothing
    
    * Remove paintCell() (a non-functional leftover from KolourPaint in KDE 3)
      as kpColorCellsBase now does what it did (gray out cells when disabled)
    
    * Style, TODO, comments
    
    TODO: Swapping colors around and deleting a row results in strange effects.
    
    svn path=/trunk/KDE/kdegraphics/kolourpaint/; revision=716617
    6b9654e7