[lazarus] qt status?
Florian Klaempfl
Florian.Klaempfl at gmx.de
Mon Sep 15 08:09:07 EDT 2003
Florian Klaempfl wrote:
> Andrew Johnson wrote:
>
>> alright. that sounds good. I will go look into that, and if moc _does_
>> produces cohesive enough ones, such that we don't need to actually
>> include any of the actual translations and upkeep them ourselves, it
>> might make usage easier anyway, since we could just require moc and have
>> a script to compile things properly and link resulting c objects and
>> pascal objects and stuff, perhaps in a lazarus package like the gtk2
>> one. And if not.. well we shall see. :)
>>
>
> I started a pascal output module for moc already some time ago but I
> didn't finish it. I'll see if I can dig it out.
Ok, I digged it out, for an example output look below. As you may see,
it needs some fixes. But the whole output is done in one file of 800
lines of C++. The conversion is done by a tool called kalyptus which
comes with KDE3 and it is used to generate the C, Java, ObjC etc.
wrappers as well. It generates C++ wrappers as well as an pascal import
unit. If it looks suitable, I'll continue to get it working. For the
interessted, kalyptus can be found in the kdebindings-3.X.X package.
{***************************************************************************
QButton.pas - description
-------------------
begin : Sun Aug 11 16:37:06 2002
copyright : (C) 2000-2001 Lost Highway Ltd. All rights
reserved.
email : Lost_Highway at tipitina.demon.co.uk
generated by : florian at Guardian on Sun Aug 11 16:37:06
2002, using kalyptus 0.9.
***************************************************************************}
{***************************************************************************
*
*
* This library is free software; you can redistribute it and/or
modify *
* it under the terms of the GNU Library General Public License as
*
* published by the Free Software Foundation; either version 2 of the
*
* License, or (at your option) any later version.
*
*
*
***************************************************************************}
unit QButton;
interface
uses qtp_types;
{*
***************************************************************************
* $Id: qt/qbuttongroup.h 3.0.3 edited Oct 12 12:18 $
*
* Definition of QButtonGroup class
*
* Created : 950130
*
* Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
*
* This file is part of the widgets module of the Qt GUI Toolkit.
*
* This file may be distributed under the terms of the Q Public License
* as defined by Trolltech AS of Norway and appearing in the file
* LICENSE.QPL included in the packaging of this file.
*
* This file may be distributed and/or modified under the terms of the
* GNU General Public License version 2 as published by the Free Software
* Foundation and appearing in the file LICENSE.GPL included in the
* packaging of this file.
*
* Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
* licenses may use this file in accordance with the Qt Commercial License
* Agreement provided with the Software.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* See http://www.trolltech.com/pricing.html or email sales at trolltech.com for
* information about Qt Commercial License Agreements.
* See http://www.trolltech.com/qpl/ for QPL licensing information.
* See http://www.trolltech.com/gpl/ for GPL licensing information.
* Contact info at trolltech.com if any conditions of this licensing are
* not clear to you.
*
********************************************************************
@short
***************************************************************************
* $Id: qt/qbuttongroup.
}
#define QBUTTON_SingleShot 0
#define QBUTTON_Toggle 1
#define QBUTTON_Tristate 2
#define QBUTTON_Off 0
#define QBUTTON_NoChange 1
#define QBUTTON_On 2
function QButton_metaObject(instPointer : PQButton) : PQMetaObject;
function QButton_className(instPointer : PQButton) : pchar;
function QButton_qt_cast(instPointer : PQButton; arg1 : pchar) : pointer;
function QButton_qt_invoke(instPointer : PQButton; arg1 : longint; arg2
: PQUObject) : longint;
function QButton_qt_emit(instPointer : PQButton; arg1 : longint; arg2 :
PQUObject) : longint;
function QButton_qt_property(instPointer : PQButton; arg1 : longint;
arg2 : longint; arg3 : PQVariant) : longint;
function QButton_qObject(instPointer : PQButton) : PQObject;
function new_QButton( parent : qt_QWidget *; name : pchar; f :
longint) : PQButton;cdecl;
procedure del_QButton(p : PQButton);cdecl;
function QButton_text(instPointer : PQButton) : PQString;
procedure QButton_setText(instPointer : PQButton;var arg1 : QString);
function QButton_pixmap(instPointer : PQButton) : PQPixmap;
procedure QButton_setPixmap(instPointer : PQButton; arg1 : qt_QPixmap *);
function QButton_accel(instPointer : PQButton) : qt_QKeySequence*;
procedure QButton_setAccel(instPointer : PQButton; arg1 : qt_QKeySequence*);
function QButton_isToggleButton(instPointer : PQButton) : longint;
function QButton_toggleType(instPointer : PQButton) : ToggleType;
procedure QButton_setDown(instPointer : PQButton; arg1 : longint);
function QButton_isDown(instPointer : PQButton) : longint;
function QButton_isOn(instPointer : PQButton) : longint;
function QButton_state(instPointer : PQButton) : ToggleState;
function QButton_autoResize(instPointer : PQButton) : longint;
procedure QButton_setAutoResize(instPointer : PQButton; arg1 : longint);
function QButton_autoRepeat(instPointer : PQButton) : longint;
procedure QButton_setAutoRepeat(instPointer : PQButton; arg1 : longint);
function QButton_isExclusiveToggle(instPointer : PQButton) : longint;
function QButton_group(instPointer : PQButton) : qt_QButtonGroup*;
procedure QButton_animateClick(instPointer : PQButton);
procedure QButton_toggle(instPointer : PQButton);
function QButton_staticMetaObject() : PQMetaObject;
function QButton_tr( arg1 : pchar; arg2 : pchar) : PQString;
function QButton_trUtf8( arg1 : pchar; arg2 : pchar) : PQString;
procedure QButton_setToggleButton(instPointer : PQButton; arg1 : longint);
procedure QButton_setToggleType(instPointer : PQButton; arg1 : ToggleType);
procedure QButton_setOn(instPointer : PQButton; arg1 : longint);
procedure QButton_setState(instPointer : PQButton; arg1 : ToggleState);
function QButton_hitButton(instPointer : PQButton; pos : qt_QPoint*) :
longint;
procedure QButton_drawButton(instPointer : PQButton; arg1 : qt_QPainter *);
procedure QButton_drawButtonLabel(instPointer : PQButton; arg1 :
qt_QPainter *);
procedure QButton_enabledChange(instPointer : PQButton; arg1 : longint);
More information about the Lazarus
mailing list