176 lines
6.7 KiB
Plaintext
176 lines
6.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 = QWidget
|
|
New = pParent, nFlags
|
|
</CLASS>
|
|
|
|
<CODE>
|
|
#include <QtGui/QMainWindow>
|
|
#include <QtCore/QSettings>
|
|
|
|
|
|
/*
|
|
* QMainWindow ( QWidget * parent = 0, Qt::WindowFlags flags = 0 )
|
|
* ~QMainWindow ()
|
|
*/
|
|
HB_FUNC( QT_QMAINWINDOW )
|
|
{
|
|
hb_retptr( ( QMainWindow* ) new QMainWindow( hbqt_par_QWidget( 1 ), ( Qt::WindowFlags ) hb_parni( 2 ) ) );
|
|
}
|
|
|
|
HB_FUNC( HBQT_QMAINWINDOW_SAVESETTINGS )
|
|
{
|
|
QSettings qSet( hbqt_par_QString( 1 ), QSettings::IniFormat );
|
|
|
|
qSet.setValue( hbqt_par_QString( 2 ), hbqt_par_QMainWindow( 3 )->saveState() );
|
|
}
|
|
|
|
HB_FUNC( HBQT_QMAINWINDOW_RESTSETTINGS )
|
|
{
|
|
QSettings qSet( hbqt_par_QString( 1 ), QSettings::IniFormat );
|
|
|
|
hbqt_par_QMainWindow( 3 )->restoreState( qSet.value( hbqt_par_QString( 2 ) ).toByteArray() );
|
|
}
|
|
</CODE>
|
|
|
|
<ENUMS>
|
|
enum DockOption { AnimatedDocks, AllowNestedDocks, AllowTabbedDocks, ForceTabbedDocks, VerticalTabs }
|
|
flags DockOptions
|
|
</ENUMS>
|
|
|
|
<PROTOS>
|
|
void addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget )
|
|
void addDockWidget ( Qt::DockWidgetArea area, QDockWidget * dockwidget, Qt::Orientation orientation )
|
|
void addToolBar ( Qt::ToolBarArea area, QToolBar * toolbar ){
|
|
QGC_POINTER_QMainWindow * q = ( QGC_POINTER_QMainWindow * ) hb_parptrGC( hbqt_gcFuncs(), 1 );
|
|
QGC_POINTER * p = ( QGC_POINTER * ) hb_parptrGC( hbqt_gcFuncs(), 3 );
|
|
|
|
HB_TRACE( HB_TR_DEBUG, ("QMAINWINDOW_ADDTOOLBAR" ) );
|
|
HB_TRACE( HB_TR_DEBUG, ( "QT_QMAINWINDOW_ADDTOOLBAR() Qt object: %p to: %p", (void *) p, (void *) q) );
|
|
HB_TRACE( HB_TR_DEBUG, ( "QT_QMAINWINDOW_ADDTOOLBAR() Qt object: %p to: %p", (void *) p->ph, (void *) q->ph) );
|
|
|
|
if ( p && p->ph && q && q->ph )
|
|
{
|
|
HB_TRACE( HB_TR_DEBUG, ( "QT_QMAINWINDOW_ADDTOOLBAR() Qt object: %p is attached to: %p", (void *) p->ph, (void *) q->ph) );
|
|
p->bNew = HB_FALSE;
|
|
if ( q && q->ph )
|
|
( q->ph )->addToolBar( ( Qt::ToolBarArea ) hb_parni( 2 ), ( ( QToolBar *) p->ph ));
|
|
else
|
|
{
|
|
HB_TRACE( HB_TR_DEBUG, ( "F=QT_QTOOLBAR_ADDACTION FP=( p )->addAction( hbqt_par_QAction( 2 ) ); p is NULL" ));
|
|
}
|
|
}
|
|
}
|
|
void addToolBar ( QToolBar * toolbar )
|
|
QToolBar * addToolBar ( const QString & title )
|
|
void addToolBarBreak ( Qt::ToolBarArea area = Qt::TopToolBarArea )
|
|
QWidget * centralWidget () const
|
|
Qt::DockWidgetArea corner ( Qt::Corner corner ) const
|
|
virtual QMenu * createPopupMenu ()
|
|
DockOptions dockOptions () const
|
|
Qt::DockWidgetArea dockWidgetArea ( QDockWidget * dockwidget ) const
|
|
bool documentMode () const
|
|
QSize iconSize () const
|
|
void insertToolBar ( QToolBar * before, QToolBar * toolbar )
|
|
void insertToolBarBreak ( QToolBar * before )
|
|
bool isAnimated () const
|
|
bool isDockNestingEnabled () const
|
|
QMenuBar * menuBar () const
|
|
QWidget * menuWidget () const
|
|
void removeDockWidget ( QDockWidget * dockwidget )
|
|
void removeToolBar ( QToolBar * toolbar )
|
|
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 )
|
|
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 )
|
|
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 )
|
|
void setUnifiedTitleAndToolBarOnMac ( bool set )
|
|
void splitDockWidget ( QDockWidget * first, QDockWidget * second, Qt::Orientation orientation )
|
|
QStatusBar * statusBar () const
|
|
QTabWidget::TabPosition tabPosition ( Qt::DockWidgetArea area ) const
|
|
QTabWidget::TabShape tabShape () const
|
|
QList<QDockWidget *> tabifiedDockWidgets ( QDockWidget * dockwidget ) const
|
|
void tabifyDockWidget ( QDockWidget * first, QDockWidget * second )
|
|
Qt::ToolBarArea toolBarArea ( QToolBar * toolbar ) const
|
|
bool toolBarBreak ( QToolBar * toolbar ) const
|
|
Qt::ToolButtonStyle toolButtonStyle () const
|
|
bool unifiedTitleAndToolBarOnMac () const
|
|
</PROTOS>
|
|
|
|
<SLOTS>
|
|
void setAnimated ( bool enabled )
|
|
void setDockNestingEnabled ( bool enabled )
|
|
</SLOTS>
|
|
|
|
<SIGNALS>
|
|
void iconSizeChanged ( const QSize & iconSize )
|
|
void toolButtonStyleChanged ( Qt::ToolButtonStyle toolButtonStyle )
|
|
</SIGNALS>
|
|
|
|
|