Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Properties

QHeaderView Class Reference

Search for all occurrences

Detailed Description

Definition at line 58 of file qheaderview.h.

#include <qheaderview.h>

Inheritance diagram for QHeaderView:
Inheritance graph
[legend]

List of all members.

Public Types

enum   ResizeMode {
  Interactive, Stretch, Fixed, ResizeToContents,
  Custom = Fixed
}

Public Slots

void  setOffset (int offset)
void  setOffsetToSectionPosition (int visualIndex)
void  setOffsetToLastSection ()
void  headerDataChanged (Qt::Orientation orientation, int logicalFirst, int logicalLast)

Signals

void  sectionMoved (int logicalIndex, int oldVisualIndex, int newVisualIndex)
void  sectionResized (int logicalIndex, int oldSize, int newSize)
void  sectionPressed (int logicalIndex)
void  sectionClicked (int logicalIndex)
void  sectionEntered (int logicalIndex)
void  sectionDoubleClicked (int logicalIndex)
void  sectionCountChanged (int oldCount, int newCount)
void  sectionHandleDoubleClicked (int logicalIndex)
void  sectionAutoResize (int logicalIndex, QHeaderView::ResizeMode mode)
void  geometriesChanged ()
void  sortIndicatorChanged (int logicalIndex, Qt::SortOrder order)

Public Member Functions

  QHeaderView (Qt::Orientation orientation, QWidget *parent=0)
virtual  ~QHeaderView ()
void  setModel (QAbstractItemModel *model)
Qt::Orientation  orientation () const
int  offset () const
int  length () const
QSize  sizeHint () const
int  sectionSizeHint (int logicalIndex) const
int  visualIndexAt (int position) const
int  logicalIndexAt (int position) const
int  logicalIndexAt (int x, int y) const
int  logicalIndexAt (const QPoint &pos) const
int  sectionSize (int logicalIndex) const
int  sectionPosition (int logicalIndex) const
int  sectionViewportPosition (int logicalIndex) const
void  moveSection (int from, int to)
void  swapSections (int first, int second)
void  resizeSection (int logicalIndex, int size)
void  resizeSections (QHeaderView::ResizeMode mode)
bool  isSectionHidden (int logicalIndex) const
void  setSectionHidden (int logicalIndex, bool hide)
int  hiddenSectionCount () const
void  hideSection (int logicalIndex)
void  showSection (int logicalIndex)
int  count () const
int  visualIndex (int logicalIndex) const
int  logicalIndex (int visualIndex) const
void  setMovable (bool movable)
bool  isMovable () const
void  setClickable (bool clickable)
bool  isClickable () const
void  setHighlightSections (bool highlight)
bool  highlightSections () const
void  setResizeMode (ResizeMode mode)
void  setResizeMode (int logicalIndex, ResizeMode mode)
ResizeMode  resizeMode (int logicalIndex) const
int  stretchSectionCount () const
void  setSortIndicatorShown (bool show)
bool  isSortIndicatorShown () const
void  setSortIndicator (int logicalIndex, Qt::SortOrder order)
int  sortIndicatorSection () const
Qt::SortOrder  sortIndicatorOrder () const
bool  stretchLastSection () const
void  setStretchLastSection (bool stretch)
bool  cascadingSectionResizes () const
void  setCascadingSectionResizes (bool enable)
int  defaultSectionSize () const
void  setDefaultSectionSize (int size)
int  minimumSectionSize () const
void  setMinimumSectionSize (int size)
Qt::Alignment  defaultAlignment () const
void  setDefaultAlignment (Qt::Alignment alignment)
void  doItemsLayout ()
bool  sectionsMoved () const
bool  sectionsHidden () const
QByteArray  saveState () const
bool  restoreState (const QByteArray &state)
void  reset ()

Protected Slots

void  updateSection (int logicalIndex)
void  resizeSections ()
void  sectionsInserted (const QModelIndex &parent, int logicalFirst, int logicalLast)
void  sectionsAboutToBeRemoved (const QModelIndex &parent, int logicalFirst, int logicalLast)

Protected Member Functions

  QHeaderView (QHeaderViewPrivate &dd, Qt::Orientation orientation, QWidget *parent=0)
void  initialize ()
void  initializeSections ()
void  initializeSections (int start, int end)
void  currentChanged (const QModelIndex &current, const QModelIndex &old)
bool  event (QEvent *e)
void  paintEvent (QPaintEvent *e)
void  mousePressEvent (QMouseEvent *e)
void  mouseMoveEvent (QMouseEvent *e)
void  mouseReleaseEvent (QMouseEvent *e)
void  mouseDoubleClickEvent (QMouseEvent *e)
bool  viewportEvent (QEvent *e)
virtual void  paintSection (QPainter *painter, const QRect &rect, int logicalIndex) const
virtual QSize  sectionSizeFromContents (int logicalIndex) const
int  horizontalOffset () const
int  verticalOffset () const
void  updateGeometries ()
void  scrollContentsBy (int dx, int dy)
void  dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
void  rowsInserted (const QModelIndex &parent, int start, int end)
QRect  visualRect (const QModelIndex &index) const
void  scrollTo (const QModelIndex &index, ScrollHint hint)
QModelIndex  indexAt (const QPoint &p) const
bool  isIndexHidden (const QModelIndex &index) const
QModelIndex  moveCursor (CursorAction, Qt::KeyboardModifiers)
void  setSelection (const QRect &rect, QItemSelectionModel::SelectionFlags flags)
QRegion  visualRegionForSelection (const QItemSelection &selection) const
void  initStyleOption (QStyleOptionHeader *option) const

Properties

bool  showSortIndicator
bool  highlightSections
bool  stretchLastSection
bool  cascadingSectionResizes
int  defaultSectionSize
int  minimumSectionSize
Qt::Alignment  defaultAlignment

Member Enumeration Documentation

enum ResizeMode

Constructor & Destructor Documentation

QHeaderView ( Qt::Orientation  orientation,
QWidget parent = 0 
) [explicit]
virtual ~QHeaderView ( ) [virtual]
QHeaderView ( QHeaderViewPrivate &  dd,
Qt::Orientation  orientation,
QWidget parent = 0 
) [protected]

Member Function Documentation

void setModel ( QAbstractItemModel model ) [virtual]
Qt::Orientation orientation ( ) const
int offset ( ) const
int length ( ) const
QSize sizeHint ( ) const [virtual]
int sectionSizeHint ( int  logicalIndex ) const
int visualIndexAt ( int  position ) const
int logicalIndexAt ( int  position ) const
int logicalIndexAt ( int  x,
int  y 
) const [inline]

Definition at line 235 of file qheaderview.h.

{ return orientation() == Qt::Horizontal ? logicalIndexAt(ax) : logicalIndexAt(ay); }
int logicalIndexAt ( const QPoint pos ) const [inline]

Definition at line 237 of file qheaderview.h.

{ return logicalIndexAt(apos.x(), apos.y()); }
int sectionSize ( int  logicalIndex ) const
int sectionPosition ( int  logicalIndex ) const
int sectionViewportPosition ( int  logicalIndex ) const
void moveSection ( int  from,
int  to 
)
void swapSections ( int  first,
int  second 
)
void resizeSection ( int  logicalIndex,
int  size 
)
void resizeSections ( QHeaderView::ResizeMode  mode )
bool isSectionHidden ( int  logicalIndex ) const
void setSectionHidden ( int  logicalIndex,
bool  hide 
)
int hiddenSectionCount ( ) const
void hideSection ( int  logicalIndex ) [inline]

Definition at line 239 of file qheaderview.h.

{ setSectionHidden(alogicalIndex, true); }
void showSection ( int  logicalIndex ) [inline]

Definition at line 241 of file qheaderview.h.

{ setSectionHidden(alogicalIndex, false); }
int count ( ) const
int visualIndex ( int  logicalIndex ) const
int logicalIndex ( int  visualIndex ) const
void setMovable ( bool  movable )
bool isMovable ( ) const
void setClickable ( bool  clickable )
bool isClickable ( ) const
void setHighlightSections ( bool  highlight )
bool highlightSections ( ) const
void setResizeMode ( ResizeMode  mode )
void setResizeMode ( int  logicalIndex,
ResizeMode  mode 
)
ResizeMode resizeMode ( int  logicalIndex ) const
int stretchSectionCount ( ) const
void setSortIndicatorShown ( bool  show )
bool isSortIndicatorShown ( ) const
void setSortIndicator ( int  logicalIndex,
Qt::SortOrder  order 
)
int sortIndicatorSection ( ) const
Qt::SortOrder sortIndicatorOrder ( ) const
bool stretchLastSection ( ) const
void setStretchLastSection ( bool  stretch )
bool cascadingSectionResizes ( ) const
void setCascadingSectionResizes ( bool  enable )
int defaultSectionSize ( ) const
void setDefaultSectionSize ( int  size )
int minimumSectionSize ( ) const
void setMinimumSectionSize ( int  size )
Qt::Alignment defaultAlignment ( ) const
void setDefaultAlignment ( Qt::Alignment  alignment )
void doItemsLayout ( ) [virtual]
bool sectionsMoved ( ) const
bool sectionsHidden ( ) const
QByteArray saveState ( ) const
bool restoreState ( const QByteArray state )
void reset ( ) [virtual]
void setOffset ( int  offset ) [slot]
void setOffsetToSectionPosition ( int  visualIndex ) [slot]
void setOffsetToLastSection ( ) [slot]
void headerDataChanged ( Qt::Orientation  orientation,
int  logicalFirst,
int  logicalLast 
) [slot]
void sectionMoved ( int  logicalIndex,
int  oldVisualIndex,
int  newVisualIndex 
) [signal]
void sectionResized ( int  logicalIndex,
int  oldSize,
int  newSize 
) [signal]
void sectionPressed ( int  logicalIndex ) [signal]
void sectionClicked ( int  logicalIndex ) [signal]
void sectionEntered ( int  logicalIndex ) [signal]
void sectionDoubleClicked ( int  logicalIndex ) [signal]
void sectionCountChanged ( int  oldCount,
int  newCount 
) [signal]
void sectionHandleDoubleClicked ( int  logicalIndex ) [signal]
void sectionAutoResize ( int  logicalIndex,
QHeaderView::ResizeMode  mode 
) [signal]
void geometriesChanged ( ) [signal]
void sortIndicatorChanged ( int  logicalIndex,
Qt::SortOrder  order 
) [signal]
void updateSection ( int  logicalIndex ) [protected, slot]
void resizeSections ( ) [protected, slot]
void sectionsInserted ( const QModelIndex parent,
int  logicalFirst,
int  logicalLast 
) [protected, slot]
void sectionsAboutToBeRemoved ( const QModelIndex parent,
int  logicalFirst,
int  logicalLast 
) [protected, slot]
void initialize ( ) [protected]
void initializeSections ( ) [protected]
void initializeSections ( int  start,
int  end 
) [protected]
void currentChanged ( const QModelIndex current,
const QModelIndex old 
) [protected, virtual]
bool event ( QEvent e ) [protected, virtual]
void paintEvent ( QPaintEvent e ) [protected, virtual]
void mousePressEvent ( QMouseEvent e ) [protected, virtual]
void mouseMoveEvent ( QMouseEvent e ) [protected, virtual]
void mouseReleaseEvent ( QMouseEvent e ) [protected, virtual]
void mouseDoubleClickEvent ( QMouseEvent e ) [protected, virtual]
bool viewportEvent ( QEvent e ) [protected, virtual]
virtual void paintSection ( QPainter painter,
const QRect rect,
int  logicalIndex 
) const [protected, virtual]
virtual QSize sectionSizeFromContents ( int  logicalIndex ) const [protected, virtual]
int horizontalOffset ( ) const [protected, virtual]
int verticalOffset ( ) const [protected, virtual]
void updateGeometries ( ) [protected, virtual]
void scrollContentsBy ( int  dx,
int  dy 
) [protected, virtual]
void dataChanged ( const QModelIndex topLeft,
const QModelIndex bottomRight 
) [protected, virtual]
void rowsInserted ( const QModelIndex parent,
int  start,
int  end 
) [protected, virtual]
QRect visualRect ( const QModelIndex index ) const [protected, virtual]
void scrollTo ( const QModelIndex index,
ScrollHint  hint 
) [protected, virtual]
QModelIndex indexAt ( const QPoint p ) const [protected, virtual]
bool isIndexHidden ( const QModelIndex index ) const [protected, virtual]
QModelIndex moveCursor ( CursorAction  ,
Qt::KeyboardModifiers   
) [protected, virtual]
void setSelection ( const QRect rect,
QItemSelectionModel::SelectionFlags  flags 
) [protected, virtual]
QRegion visualRegionForSelection ( const QItemSelection selection ) const [protected, virtual]
void initStyleOption ( QStyleOptionHeader option ) const [protected]

Property Documentation

bool showSortIndicator [read, write]

Definition at line 61 of file qheaderview.h.

bool highlightSections [read, write]

Definition at line 62 of file qheaderview.h.

bool stretchLastSection [read, write]

Definition at line 63 of file qheaderview.h.

bool cascadingSectionResizes [read, write]

Definition at line 64 of file qheaderview.h.

int defaultSectionSize [read, write]

Definition at line 65 of file qheaderview.h.

int minimumSectionSize [read, write]

Definition at line 66 of file qheaderview.h.

Qt::Alignment defaultAlignment [read, write]

Definition at line 67 of file qheaderview.h.


The documentation for this class was generated from the following file:

QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView
QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView QHeaderView