2011-03-18 15:34 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtgui/qth/QActionEvent.qth
  * contrib/hbqt/qtgui/qth/QContextMenuEvent.qth
  * contrib/hbqt/qtgui/qth/QDragEnterEvent.qth
  * contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth
  * contrib/hbqt/qtgui/qth/QDragMoveEvent.qth
  * contrib/hbqt/qtgui/qth/QDropEvent.qth
  * contrib/hbqt/qtgui/qth/QFocusEvent.qth
  * contrib/hbqt/qtgui/qth/QHelpEvent.qth
  * contrib/hbqt/qtgui/qth/QHideEvent.qth
  * contrib/hbqt/qtgui/qth/QHoverEvent.qth
  * contrib/hbqt/qtgui/qth/QInputEvent.qth
  * contrib/hbqt/qtgui/qth/QMainWindow.qth
  * contrib/hbqt/qtgui/qth/QPaintEvent.qth
  * contrib/hbqt/qtgui/qth/QResizeEvent.qth
  * contrib/hbqt/qtgui/qth/QShortcutEvent.qth
  * contrib/hbqt/qtgui/qth/QShowEvent.qth
  * contrib/hbqt/qtgui/qth/QWindowStateChangeEvent.qth
    ! Made: constructors more fault tolerant.
This commit is contained in:
Pritpal Bedi
2011-03-18 22:38:13 +00:00
parent 74337f2493
commit 09121a2702
18 changed files with 123 additions and 13 deletions

View File

@@ -16,6 +16,26 @@
The license applies to all entries newer than 2009-04-28.
*/
2011-03-18 15:34 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/qth/QActionEvent.qth
* contrib/hbqt/qtgui/qth/QContextMenuEvent.qth
* contrib/hbqt/qtgui/qth/QDragEnterEvent.qth
* contrib/hbqt/qtgui/qth/QDragLeaveEvent.qth
* contrib/hbqt/qtgui/qth/QDragMoveEvent.qth
* contrib/hbqt/qtgui/qth/QDropEvent.qth
* contrib/hbqt/qtgui/qth/QFocusEvent.qth
* contrib/hbqt/qtgui/qth/QHelpEvent.qth
* contrib/hbqt/qtgui/qth/QHideEvent.qth
* contrib/hbqt/qtgui/qth/QHoverEvent.qth
* contrib/hbqt/qtgui/qth/QInputEvent.qth
* contrib/hbqt/qtgui/qth/QMainWindow.qth
* contrib/hbqt/qtgui/qth/QPaintEvent.qth
* contrib/hbqt/qtgui/qth/QResizeEvent.qth
* contrib/hbqt/qtgui/qth/QShortcutEvent.qth
* contrib/hbqt/qtgui/qth/QShowEvent.qth
* contrib/hbqt/qtgui/qth/QWindowStateChangeEvent.qth
! Made: constructors more fault tolerant.
2011-03-18 13:10 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtcore/hbqtcore.hbx
! Miss from prev commit.

View File

@@ -74,6 +74,10 @@ HB_FUNC( QT_QACTIONEVENT )
{
__HB_RETPTRGC__( new QActionEvent( hb_parni( 1 ), hbqt_par_QAction( 2 ), ( HB_ISOBJECT( 3 ) ? hbqt_par_QAction( 3 ) : 0 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QActionEvent( *hbqt_par_QActionEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -40,6 +40,10 @@ HB_FUNC( QT_QCONTEXTMENUEVENT )
{
__HB_RETPTRGC__( new QContextMenuEvent( ( QContextMenuEvent::Reason ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ), ( Qt::KeyboardModifiers ) hb_parni( 4 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QContextMenuEvent( *hbqt_par_QContextMenuEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -32,6 +32,10 @@ HB_FUNC( QT_QDRAGENTEREVENT )
{
__HB_RETPTRGC__( new QDragEnterEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QDragEnterEvent( *hbqt_par_QDragEnterEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -28,7 +28,14 @@ Constructor = no
*/
HB_FUNC( QT_QDRAGLEAVEEVENT )
{
__HB_RETPTRGC__( new QDragLeaveEvent() );
if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QDragLeaveEvent( *hbqt_par_QDragLeaveEvent( 1 ) ) );
}
else
{
__HB_RETPTRGC__( new QDragLeaveEvent() );
}
}
</CODE>

View File

@@ -33,6 +33,10 @@ HB_FUNC( QT_QDRAGMOVEEVENT )
{
__HB_RETPTRGC__( new QDragMoveEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( QEvent::Type ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : QEvent::DragMove ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QDragMoveEvent( *hbqt_par_QDragMoveEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -32,6 +32,10 @@ HB_FUNC( QT_QDROPEVENT )
{
__HB_RETPTRGC__( new QDropEvent( *hbqt_par_QPoint( 1 ), ( Qt::DropActions ) hb_parni( 2 ), hbqt_par_QMimeData( 3 ), ( Qt::MouseButtons ) hb_parni( 4 ), ( Qt::KeyboardModifiers ) hb_parni( 5 ), ( QEvent::Type ) ( HB_ISNUM( 6 ) ? hb_parni( 6 ) : QEvent::Drop ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QDropEvent( *hbqt_par_QDropEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -32,6 +32,10 @@ HB_FUNC( QT_QFOCUSEVENT )
{
__HB_RETPTRGC__( new QFocusEvent( ( QEvent::Type ) hb_parni( 1 ), ( Qt::FocusReason ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : Qt::OtherFocusReason ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QFocusEvent( *hbqt_par_QFocusEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -32,6 +32,10 @@ HB_FUNC( QT_QHELPEVENT )
{
__HB_RETPTRGC__( new QHelpEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QHelpEvent( *hbqt_par_QHelpEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -28,7 +28,14 @@ Constructor = no
*/
HB_FUNC( QT_QHIDEEVENT )
{
__HB_RETPTRGC__( new QHideEvent() );
if( hb_pcount() == 0 )
{
__HB_RETPTRGC__( new QHideEvent() );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QHideEvent( *hbqt_par_QHideEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -74,6 +74,10 @@ HB_FUNC( QT_QHOVEREVENT )
{
__HB_RETPTRGC__( new QHoverEvent( ( QEvent::Type ) hb_parni( 1 ), *hbqt_par_QPoint( 2 ), *hbqt_par_QPoint( 3 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QHoverEvent( *hbqt_par_QHoverEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -28,7 +28,14 @@ New =
*/
HB_FUNC( QT_QINPUTEVENT )
{
__HB_RETPTRGC__( new QInputEvent( ( QEvent::Type ) hb_parni( 1 ), ( Qt::KeyboardModifiers ) hb_parni( 2 ) ) );
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISNUM( 2 ) )
{
__HB_RETPTRGC__( new QInputEvent( ( QEvent::Type ) hb_parni( 1 ), ( Qt::KeyboardModifiers ) hb_parni( 2 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QInputEvent( *hbqt_par_QInputEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -27,7 +27,14 @@ New = pParent, nFlags
*/
HB_FUNC( QT_QMAINWINDOW )
{
__HB_RETPTRGC__( new QMainWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
if( hb_pcount() <= 2 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QMainWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : 0 ) ) );
}
else
{
__HB_RETPTRGC__( new QMainWindow() );
}
}
HB_FUNC( HBQT_QMAINWINDOW_SAVESETTINGS )
@@ -77,14 +84,14 @@ void removeToolBarBreak ( QToolBar * before )
bool restoreDockWidget ( QDockWidget * dockwidget )
bool restoreState ( const QByteArray & state, int version = 0 )
QByteArray saveState ( int version = 0 ) const
void setCentralWidget ( QWidget * widget ) [*D=1*]
void setCentralWidget ( QWidget * widget )
void setCorner ( Qt::Corner corner, Qt::DockWidgetArea area )
void setDockOptions ( DockOptions options )
void setDocumentMode ( bool enabled )
void setIconSize ( const QSize & iconSize )
void setMenuBar ( QMenuBar * menuBar ) [*D=1*]
void setMenuWidget ( QWidget * menuBar ) [*D=1*]
void setStatusBar ( QStatusBar * statusbar ) [*D=1*]
void setMenuBar ( QMenuBar * menuBar )
void setMenuWidget ( QWidget * menuBar )
void setStatusBar ( QStatusBar * statusbar )
void setTabPosition ( Qt::DockWidgetAreas areas, QTabWidget::TabPosition tabPosition )
void setTabShape ( QTabWidget::TabShape tabShape )
void setToolButtonStyle ( Qt::ToolButtonStyle toolButtonStyle )

View File

@@ -38,6 +38,10 @@ HB_FUNC( QT_QPAINTEVENT )
{
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QRect( 1 ) ) );
}
else if( hbqt_isObjectType( 1, HBQT_TYPE_QPaintEvent ) )
{
__HB_RETPTRGC__( new QPaintEvent( *hbqt_par_QPaintEvent( 1 ) ) );
}
}
}
</CODE>

View File

@@ -14,7 +14,7 @@
<CLASS>
QObject = no
Inherits = QEvent
Type = Core
Type =
New =
Constructor =
</CLASS>
@@ -32,6 +32,10 @@ HB_FUNC( QT_QRESIZEEVENT )
{
__HB_RETPTRGC__( new QResizeEvent( *hbqt_par_QSize( 1 ), *hbqt_par_QSize( 2 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QResizeEvent( *hbqt_par_QResizeEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -75,6 +75,10 @@ HB_FUNC( QT_QSHORTCUTEVENT )
{
__HB_RETPTRGC__( new QShortcutEvent( *hbqt_par_QKeySequence( 1 ), hb_parni( 2 ), ( HB_ISLOG( 3 ) ? hb_parl( 3 ) : false ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QShortcutEvent( *hbqt_par_QShortcutEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -28,7 +28,14 @@ Constructor =
*/
HB_FUNC( QT_QSHOWEVENT )
{
__HB_RETPTRGC__( new QShowEvent() );
if( hb_pcount() == 0 )
{
__HB_RETPTRGC__( new QShowEvent() );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QShowEvent( *hbqt_par_QShowEvent( 1 ) ) );
}
}
</CODE>

View File

@@ -14,9 +14,9 @@
<CLASS>
QObject = no
Inherits = QEvent
Type = Core
Type =
New =
Constructor = no
Constructor =
</CLASS>
<CODE>
@@ -28,7 +28,18 @@ Constructor = no
*/
HB_FUNC( QT_QWINDOWSTATECHANGEEVENT )
{
// __HB_RETPTRGC__( new QWindowStateChangeEvent() );
if( hb_pcount() == 2 && HB_ISNUM( 1 ) && HB_ISLOG( 2 ) )
{
__HB_RETPTRGC__( new QWindowStateChangeEvent( ( Qt::WindowStates ) hb_parni( 1 ), hb_parl( 2 ) ) );
}
if( hb_pcount() == 1 && HB_ISNUM( 1 ) )
{
__HB_RETPTRGC__( new QWindowStateChangeEvent( ( Qt::WindowStates ) hb_parni( 1 ) ) );
}
else if( hb_pcount() == 1 && HB_ISOBJECT( 1 ) )
{
__HB_RETPTRGC__( new QWindowStateChangeEvent( *hbqt_par_QWindowStateChangeEvent( 1 ) ) );
}
}
</CODE>