src/gui/itemviews/qtableview.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 5 d3bac044e0f0
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
  2357 /*!
  2357 /*!
  2358     \since 4.2
  2358     \since 4.2
  2359     \property QTableView::sortingEnabled
  2359     \property QTableView::sortingEnabled
  2360     \brief whether sorting is enabled
  2360     \brief whether sorting is enabled
  2361 
  2361 
  2362     If this property is true, sorting is enabled for the table; if the
  2362     If this property is true, sorting is enabled for the table.  If
  2363     property is false, sorting is not enabled. The default value is false.
  2363     this property is false, sorting is not enabled. The default value
       
  2364     is false.
       
  2365 
       
  2366     \note. Setting the property to true with setSortingEnabled()
       
  2367     immediately triggers a call to sortByColumn() with the current
       
  2368     sort section and order.
  2364 
  2369 
  2365     \sa sortByColumn()
  2370     \sa sortByColumn()
  2366 */
  2371 */
  2367 
  2372 
       
  2373 /*!
       
  2374   If \a enabled true enables sorting for the table and immediately
       
  2375   trigger a call to sortByColumn() with the current sort section and
       
  2376   order
       
  2377  */
  2368 void QTableView::setSortingEnabled(bool enable)
  2378 void QTableView::setSortingEnabled(bool enable)
  2369 {
  2379 {
  2370     Q_D(QTableView);
  2380     Q_D(QTableView);
  2371     d->sortingEnabled = enable;
  2381     d->sortingEnabled = enable;
  2372     horizontalHeader()->setSortIndicatorShown(enable);
  2382     horizontalHeader()->setSortIndicatorShown(enable);