* contrib/hbqt/qtgui/qth/QBoxLayout.qth
* contrib/hbqt/qtgui/qth/QComboBox.qth
* contrib/hbqt/qtgui/qth/QDirModel.qth
* contrib/hbqt/qtgui/qth/QDockWidget.qth
* contrib/hbqt/qtgui/qth/QDrag.qth
* contrib/hbqt/qtgui/qth/QGraphicsScene.qth
* contrib/hbqt/qtgui/qth/QGridLayout.qth
* contrib/hbqt/qtgui/qth/QLayout.qth
* contrib/hbqt/qtgui/qth/QMainWindow.qth
* contrib/hbqt/qtgui/qth/QMenu.qth
* contrib/hbqt/qtgui/qth/QMenuBar.qth
* contrib/hbqt/qtgui/qth/QScrollArea.qth
* contrib/hbqt/qtgui/qth/QStandardItemModel.qth
* contrib/hbqt/qtgui/qth/QStatusBar.qth
* contrib/hbqt/qtgui/qth/QTabWidget.qth
* contrib/hbqt/qtgui/qth/QToolBar.qth
* contrib/hbqt/qtgui/qth/QTreeWidgetItem.qth
* contrib/hbqt/qtgui/qth/QWidget.qth
% Replaced: [*D=n*] => [*X=n*] except for
QTreeWidget/QListWidget/QTableWidget as per the change
in core engine where deletion of a Qt object is entirely
thought of on new grounds.
* contrib/hbqt/tests/demoqt.prg
! Optimizations and removal of redundant code.
* contrib/hbqt/qtcore/hbqt.h
* contrib/hbqt/qtcore/hbqt_bind.cpp
* contrib/hbqt/qtcore/hbqt_destroyer.cpp
* contrib/hbqt/qtcore/hbqt_destroyer.h
+ Overhauled: the Qt object destruction protocol.
This commit is the result of two weeks intensive debugging
spree. This commits now handles MT applications better
then before. This commit also covers the mem leaks evident
for certain widgets.
WARNING: regression is possible, please report.
151 lines
6.2 KiB
Plaintext
151 lines
6.2 KiB
Plaintext
/*
|
|
* $Id$
|
|
*/
|
|
|
|
/*
|
|
* Harbour Qt wrapper generator control file
|
|
*
|
|
* Copyright 2009-2012 Pritpal Bedi <bedipritpal@hotmail.com>
|
|
* www - http://www.harbour-project.org
|
|
*
|
|
* See COPYING for licensing terms.
|
|
*/
|
|
|
|
<CLASS>
|
|
QObject = yes
|
|
Inherit = QObject
|
|
Type =
|
|
New =
|
|
</CLASS>
|
|
|
|
<CODE>
|
|
#include <QtGui/QGraphicsScene>
|
|
#include <QtGui/QPalette>
|
|
|
|
/*
|
|
* QGraphicsScene ( QObject * parent = 0 )
|
|
* QGraphicsScene ( const QRectF & sceneRect, QObject * parent = 0 )
|
|
* QGraphicsScene ( qreal x, qreal y, qreal width, qreal height, QObject * parent = 0 )
|
|
* virtual ~QGraphicsScene ()
|
|
*/
|
|
HB_FUNC( QT_QGRAPHICSSCENE )
|
|
{
|
|
if( hb_pcount() == 5 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) && hbqt_par_isDerivedFrom( 5, "QOBJECT" ) )
|
|
{
|
|
__HB_RETPTRGC__( new QGraphicsScene( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), hbqt_par_QObject( 5 ) ) );
|
|
}
|
|
else if( hb_pcount() == 4 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) && HB_ISNUM( 3 ) && HB_ISNUM( 4 ) )
|
|
{
|
|
__HB_RETPTRGC__( new QGraphicsScene( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ), 0 ) );
|
|
}
|
|
else if( hb_pcount() == 2 && hbqt_par_isDerivedFrom( 1, "QRECTF" ) && hbqt_par_isDerivedFrom( 2, "QOBJECT" ) )
|
|
{
|
|
__HB_RETPTRGC__( new QGraphicsScene( *hbqt_par_QRectF( 1 ), hbqt_par_QObject( 2 ) ) );
|
|
}
|
|
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QRECTF" ) )
|
|
{
|
|
__HB_RETPTRGC__( new QGraphicsScene( *hbqt_par_QRectF( 1 ), 0 ) );
|
|
}
|
|
else if( hb_pcount() == 1 && hbqt_par_isDerivedFrom( 1, "QOBJECT" ) )
|
|
{
|
|
__HB_RETPTRGC__( new QGraphicsScene( hbqt_par_QObject( 1 ) ) );
|
|
}
|
|
else
|
|
{
|
|
__HB_RETPTRGC__( new QGraphicsScene() );
|
|
}
|
|
}
|
|
</CODE>
|
|
|
|
<ENUMS>
|
|
enum ItemIndexMethod { BspTreeIndex, NoIndex }
|
|
enum SceneLayer { ItemLayer, BackgroundLayer, ForegroundLayer, AllLayers }
|
|
flags SceneLayers
|
|
</ENUMS>
|
|
|
|
<PROTOS>
|
|
QGraphicsWidget * activeWindow () const
|
|
QGraphicsEllipseItem * addEllipse ( const QRectF & rect, const QPen & pen = QPen(), const QBrush & brush = QBrush() )
|
|
QGraphicsEllipseItem * addEllipse ( qreal x, qreal y, qreal w, qreal h, const QPen & pen = QPen(), const QBrush & brush = QBrush() )
|
|
void addItem ( QGraphicsItem * item ) [*X=1*]
|
|
QGraphicsLineItem * addLine ( const QLineF & line, const QPen & pen = QPen() )
|
|
QGraphicsLineItem * addLine ( qreal x1, qreal y1, qreal x2, qreal y2, const QPen & pen = QPen() )
|
|
QGraphicsPathItem * addPath ( const QPainterPath & path, const QPen & pen = QPen(), const QBrush & brush = QBrush() )
|
|
QGraphicsPixmapItem * addPixmap ( const QPixmap & pixmap )
|
|
QGraphicsPolygonItem * addPolygon ( const QPolygonF & polygon, const QPen & pen = QPen(), const QBrush & brush = QBrush() )
|
|
QGraphicsRectItem * addRect ( const QRectF & rect, const QPen & pen = QPen(), const QBrush & brush = QBrush() )
|
|
QGraphicsRectItem * addRect ( qreal x, qreal y, qreal w, qreal h, const QPen & pen = QPen(), const QBrush & brush = QBrush() )
|
|
QGraphicsSimpleTextItem * addSimpleText ( const QString & text, const QFont & font = QFont() )
|
|
QGraphicsTextItem * addText ( const QString & text, const QFont & font = QFont() )
|
|
QGraphicsProxyWidget * addWidget ( QWidget * widget, Qt::WindowFlags wFlags = 0 )
|
|
QBrush backgroundBrush () const
|
|
int bspTreeDepth () const
|
|
void clearFocus ()
|
|
QList<QGraphicsItem *> collidingItems ( const QGraphicsItem * item, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const
|
|
QGraphicsItemGroup * createItemGroup ( const QList<QGraphicsItem *> & items )
|
|
void destroyItemGroup ( QGraphicsItemGroup * group )
|
|
QGraphicsItem * focusItem () const
|
|
QFont font () const
|
|
QBrush foregroundBrush () const
|
|
bool hasFocus () const
|
|
qreal height () const
|
|
// virtual QVariant inputMethodQuery ( Qt::InputMethodQuery query ) const
|
|
void invalidate ( qreal x, qreal y, qreal w, qreal h, SceneLayers layers = AllLayers )
|
|
bool isSortCacheEnabled () const
|
|
QGraphicsItem * itemAt ( const QPointF & position ) const
|
|
QGraphicsItem * itemAt ( qreal x, qreal y ) const
|
|
ItemIndexMethod itemIndexMethod () const
|
|
QList<QGraphicsItem *> items () const
|
|
QList<QGraphicsItem *> items ( const QPointF & pos ) const
|
|
QList<QGraphicsItem *> items ( qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const
|
|
QList<QGraphicsItem *> items ( const QRectF & rectangle, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const
|
|
QList<QGraphicsItem *> items ( const QPolygonF & polygon, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const
|
|
QList<QGraphicsItem *> items ( const QPainterPath & path, Qt::ItemSelectionMode mode = Qt::IntersectsItemShape ) const
|
|
QRectF itemsBoundingRect () const
|
|
QGraphicsItem * mouseGrabberItem () const
|
|
QPalette palette () const
|
|
void removeItem ( QGraphicsItem * item )
|
|
void render ( QPainter * painter, const QRectF & target = QRectF(), const QRectF & source = QRectF(), Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio )
|
|
QRectF sceneRect () const
|
|
QList<QGraphicsItem *> selectedItems () const
|
|
QPainterPath selectionArea () const
|
|
void setActiveWindow ( QGraphicsWidget * widget )
|
|
void setBackgroundBrush ( const QBrush & brush )
|
|
void setBspTreeDepth ( int depth )
|
|
void setFocus ( Qt::FocusReason focusReason = Qt::OtherFocusReason )
|
|
void setFocusItem ( QGraphicsItem * item, Qt::FocusReason focusReason = Qt::OtherFocusReason )
|
|
void setFont ( const QFont & font )
|
|
void setForegroundBrush ( const QBrush & brush )
|
|
void setItemIndexMethod ( ItemIndexMethod method )
|
|
void setPalette ( const QPalette & palette )
|
|
void setSceneRect ( const QRectF & rect )
|
|
void setSceneRect ( qreal x, qreal y, qreal w, qreal h )
|
|
void setSelectionArea ( const QPainterPath & path )
|
|
void setSelectionArea ( const QPainterPath & path, Qt::ItemSelectionMode mode )
|
|
void setSortCacheEnabled ( bool enabled )
|
|
void setStickyFocus ( bool enabled )
|
|
void setStyle ( QStyle * style )
|
|
bool stickyFocus () const
|
|
QStyle * style () const
|
|
void update ( qreal x, qreal y, qreal w, qreal h )
|
|
QList<QGraphicsView *> views () const
|
|
qreal width () const
|
|
</PROTOS>
|
|
|
|
<SLOTS>
|
|
void advance ()
|
|
void clear ()
|
|
void clearSelection ()
|
|
void invalidate ( const QRectF & rect = QRectF(), SceneLayers layers = AllLayers )
|
|
void update ( const QRectF & rect = QRectF() )
|
|
</SLOTS>
|
|
|
|
<SIGNALS>
|
|
void changed ( const QList<QRectF> & region )
|
|
void sceneRectChanged ( const QRectF & rect )
|
|
void selectionChanged ()
|
|
</SIGNALS>
|
|
|
|
<VARIABLES>
|
|
</VARIABLES>
|