Files
harbour-core/harbour/contrib/hbqt/qth/QTableWidget.qth
Pritpal Bedi 49da16f246 2010-06-14 21:31 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qth/HBQPlainTextEdit.qth
  * contrib/hbqt/qth/HBQSyntaxHighLighter.qth
  * contrib/hbqt/qth/QTableWidget.qth
    ! Restored the changed effected with r14752.
2010-06-15 04:35:31 +00:00

210 lines
8.7 KiB
Plaintext

/*
* $Id$
*/
/*
* Harbour Project source code:
* QT Source Generator for Harbour
*
* Copyright 2009 Pritpal Bedi <pritpal@vouchcac.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/*----------------------------------------------------------------------*/
;
; Header File to Generate QT Wrapper Sources
;
<CLASS>
Inherit = QTableView
New = pParent
</CLASS>
<CODE>
#include <QtGui/QTableWidget>
/*
* QTableWidget ( QWidget * parent = 0 )
* QTableWidget ( int rows, int columns, QWidget * parent = 0 )
* ~QTableWidget ()
*/
HB_FUNC( QT_QTABLEWIDGET )
{
if( hb_pcount() >= 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
hb_retptr( ( QTableWidget* ) new QTableWidget( hb_parni( 1 ), hb_parni( 2 ), hbqt_par_QWidget( 3 ) ) );
else
hb_retptr( ( QTableWidget* ) new QTableWidget( hbqt_par_QWidget( 1 ) ) );
}
</CODE>
<PROTOS>
QWidget * cellWidget ( int row, int column ) const
void closePersistentEditor ( QTableWidgetItem * item )
int column ( const QTableWidgetItem * item ) const
int columnCount () const
int currentColumn () const
QTableWidgetItem * currentItem () const
int currentRow () const
void editItem ( QTableWidgetItem * item )
QList<QTableWidgetItem *> findItems ( const QString & text, Qt::MatchFlags flags ) const
QTableWidgetItem * horizontalHeaderItem ( int column ) const
QTableWidgetItem * item ( int row, int column ) const
QTableWidgetItem * itemAt ( const QPoint & point ) const
QTableWidgetItem * itemAt ( int ax, int ay ) const
const QTableWidgetItem * itemPrototype () const
void openPersistentEditor ( QTableWidgetItem * item )
void removeCellWidget ( int row, int column )
int row ( const QTableWidgetItem * item ) const
int rowCount () const
QList<QTableWidgetItem *> selectedItems ()
QList<QTableWidgetSelectionRange> selectedRanges () const
void setCellWidget ( int row, int column, QWidget * widget )
void setColumnCount ( int columns )
void setCurrentCell ( int row, int column )
void setCurrentCell ( int row, int column, QItemSelectionModel::SelectionFlags command )
void setCurrentItem ( QTableWidgetItem * item ){
QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 1 );
QGC_POINTER * q = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 2 );
HB_TRACE( HB_TR_DEBUG, ( "Entering function QT_QTABLEWIDGET_SETCURRENTITEM()" ) );
if( p && p->ph && q && q->ph )
{
HB_TRACE( HB_TR_DEBUG, ( "QT_QTABLEWIDGET_SETCURRENTITEM() Qt object: %p is attached to: %p", p->ph, q->ph ) );
q->bNew = HB_FALSE;
hbqt_par_QTableWidget( 1 )->setCurrentItem( hbqt_par_QTableWidgetItem( 2 ) );
}
}
void setCurrentItem ( QTableWidgetItem * item, QItemSelectionModel::SelectionFlags command ){
QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 1 );
QGC_POINTER * q = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 2 );
HB_TRACE( HB_TR_DEBUG, ( "Entering function QT_QTABLEWIDGET_SETCURRENTITEM_1()" ) );
if( p && p->ph && q && q->ph )
{
HB_TRACE( HB_TR_DEBUG, ( "QT_QTABLEWIDGET_SETCURRENTITEM_1() Qt object: %p is attached to: %p", p->ph, q->ph ) );
q->bNew = HB_FALSE;
hbqt_par_QTableWidget( 1 )->setCurrentItem( hbqt_par_QTableWidgetItem( 2 ), ( QItemSelectionModel::SelectionFlags ) hb_parni( 2 ) );
}
}
void setHorizontalHeaderItem ( int column, QTableWidgetItem * item ){
QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 1 );
QGC_POINTER * q = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 3 );
HB_TRACE( HB_TR_DEBUG, ( "Entering function QT_QTABLEWIDGET_SETHORIZONTALHEADERITEM()" ) );
if( p && p->ph && q && q->ph )
{
HB_TRACE( HB_TR_DEBUG, ( "QT_QTABLEWIDGET_SETHORIZONTALHEADERITEM() Qt object: %p is attached to: %p", p->ph, q->ph ) );
q->bNew = HB_FALSE;
hbqt_par_QTableWidget( 1 )->setHorizontalHeaderItem( hb_parni( 2 ), hbqt_par_QTableWidgetItem( 3 ) );
}
}
void setHorizontalHeaderLabels ( const QStringList & labels )
void setItem ( int row, int column, QTableWidgetItem * item ){
QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 1 );
QGC_POINTER * q = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 4 );
HB_TRACE( HB_TR_DEBUG, ( "Entering function QT_QTABLEWIDGET_SETITEM()" ) );
if( p && p->ph && q && q->ph )
{
HB_TRACE( HB_TR_DEBUG, ( "QT_QTABLEWIDGET_SETITEM() Qt object: %p is attached to: %p", p->ph, q->ph ) );
q->bNew = HB_FALSE;
hbqt_par_QTableWidget( 1 )->setItem( hb_parni( 2 ), hb_parni( 3 ), hbqt_par_QTableWidgetItem( 4 ) );
}
}
void setItemPrototype ( const QTableWidgetItem * item )
void setRangeSelected ( const QTableWidgetSelectionRange & range, bool select )
void setRowCount ( int rows )
void setVerticalHeaderItem ( int row, QTableWidgetItem * item ){
QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 1 );
QGC_POINTER * q = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 3 );
HB_TRACE( HB_TR_DEBUG, ( "Entering function QT_QTABLEWIDGET_SETVERTICALHEADERITEM()" ) );
if( p && p->ph && q && q->ph )
{
HB_TRACE( HB_TR_DEBUG, ( "QT_QTABLEWIDGET_SETVERTICALHEADERITEM() Qt object: %p is attached to: %p", p->ph, q->ph ) );
q->bNew = HB_FALSE;
hbqt_par_QTableWidget( 1 )->setVerticalHeaderItem( hb_parni( 2 ), hbqt_par_QTableWidgetItem( 3 ) );
}
}
void setVerticalHeaderLabels ( const QStringList & labels )
void sortItems ( int column, Qt::SortOrder order = Qt::AscendingOrder )
QTableWidgetItem * takeHorizontalHeaderItem ( int column )
QTableWidgetItem * takeItem ( int row, int column )
QTableWidgetItem * takeVerticalHeaderItem ( int row )
QTableWidgetItem * verticalHeaderItem ( int row ) const
int visualColumn ( int logicalColumn ) const
QRect visualItemRect ( const QTableWidgetItem * item ) const
int visualRow ( int logicalRow ) const
</PROTOS>
<SLOTS>
void clear ()
void clearContents ()
void insertColumn ( int column )
void insertRow ( int row )
void removeColumn ( int column )
void removeRow ( int row )
void scrollToItem ( const QTableWidgetItem * item, QAbstractItemView::ScrollHint hint = EnsureVisible )
</SLOTS>
<SIGNALS>
void cellActivated ( int row, int column )
void cellChanged ( int row, int column )
void cellClicked ( int row, int column )
void cellDoubleClicked ( int row, int column )
void cellEntered ( int row, int column )
void cellPressed ( int row, int column )
void currentCellChanged ( int currentRow, int currentColumn, int previousRow, int previousColumn )
void currentItemChanged ( QTableWidgetItem * current, QTableWidgetItem * previous )
void itemActivated ( QTableWidgetItem * item )
void itemChanged ( QTableWidgetItem * item )
void itemClicked ( QTableWidgetItem * item )
void itemDoubleClicked ( QTableWidgetItem * item )
void itemEntered ( QTableWidgetItem * item )
void itemPressed ( QTableWidgetItem * item )
void itemSelectionChanged ()
</SIGNALS>