-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 01 November 2003 13:19, Phil Thompson wrote:
> On Saturday 01 November 2003 8:37 am, Roland Schulz wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hey,
> >
> > On Saturday 01 November 2003 00:25, you wrote:
> > > On Friday 31 October 2003 9:49 pm, Roland Schulz wrote:
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA1
> > > >
> > > > Hey,
> > > >
> > > > trying to change the sip layer makes great advancement. Overwriting
> > > > the className function already makes the Preview working!!
> > > > Overwriting metaObject also makes signals, slots and propterties
> > > > (partly) working!! So I think this will work.
> > >
> > > How have you "overwritten" the className function?
> >
> > Adding it to sipqtQWidget.h by hand. See the attached file.
> >
> > > > What I did for className is that I added to sipqtQWidget.h:
> > > > virtual const char *className() const {return "FileChooser";}
> > > >
> > > >
> > > > How should I do this in qwidget.sip? How can I get the classname (of
> > > > course harding it is only for testing)? Calling className from Python
> > > > space gives the correct result, so this should be doable. How can I
> > > > access variables defined in the Python claass? Is there a way to tell
> > > > sip to add this className method to all classes?
> > >
> > > Use the /AutoGen/ option to automatically generate methods, but I'm not
> > > convinced this is going to help.
> >
> > What does this /AutoGen/ function?
>
> Having seen what you've done, /AutoGen/ isn't designed for what you want to
> do. It needs a SIP change to generate the calls.
Could this be done easily?
> > > Remind me how Designer calls the factory
> > > function to create the widget.
> >
> > designer creates an object PyQWidgetPlugin from the library and calls the
> > create method. Create uses pythonize to call the createWidget method in
> > the Python class.
>
> I agree with Jim in that I can't see why adding these functions here is any
> different to using a proxy.
The problem is not adding the functions to the proxy but to create a working
proxy. May be I just don't get how to create such a proxy easily. What I did,
is: I took the header files for QWidget (I want to proxy QWidget), QObject
and QPaintDevice. The later two are the base classes so I tought there
methods also have to be proxyed. But it still didn't work and I think the
problem is that these classes have:
QApplication QBaseApplication QDragManager QETWidget QFontInfo
QFontMetrics QLayout QPaintDeviceMetrics QPainter QSignal QWSManager
QWidget
as friend classes. So there I think I would also have to proxy all private
methods and I don't know how to find out if anyone directly access some
member variables. So I don't know how to create a QWidget proxy. If I would
have one, I could do there the changes as easily, but I don't get so far.
Is there an easier/other way to create such an proxy? Otherwise I don't think
this is a good way to go.
> In the end you are going to need to introspect
> the Python object to return the correct class name and meta-object anyway.
> (However I am coming round to thinking the proxy approach is worse as a
> more general solution.)
agree
> I think what you need to do next is to come up with 2 functions that can go
> into the SIP module/library that can be called from SIP generated code (or
> a proxy) like this...
>
> class sipQFoo : public QFoo
> {
> public:
> const char *className() const
> {
> return sipGetClassNameForCpp(sipPyThis);
> }
>
> QMetaObject *metaObject() const
> {
> static QMetaObject *metaObj = 0;
>
> if (!metaObj)
> metaObj = sipGetMetaObjectForCpp(sipPyThis);
>
> return metaObj;
> }
>
> ...normal ctors...
>
> In fact sipGetClassNameForCpp() is fairly simple...
>
> const char *sipGetClassNameForCpp(sipThisType *sipThis)
> {
> PyObject *nmo;
>
> if (sipThis == NULL || (nm = sipClassName((PyObject *)sipThis)) ==
> NULL) return "Unknown class";
>
> const char *nm = PyString_AsString(nmo);
> Py_DECREF(nmo);
>
> return nm;
> }
>
> You can do the other one. :)
I'll try. But it would already be very nice only to have the classname
function. Like I wrote, this makes already the Preview working.
How can I access variables defined in the Python class?
To get properties working I'll need to also overwrite qt_property. Than I can
see if they work.
For signals and slots we'll need to do same changes to pyuic too.
For the connection
<connection>
<sender>fileChooser1</sender>
<signal>fileNameChanged(const QString&)</signal>
<receiver>fileChooser2</receiver>
<slot>setFileName(const QString&)</slot>
</connection>
it creates:
self.connect(self.fileChooser1,SIGNAL("fileNameChanged(const
QString&)"),self.fileChooser2,SLOT("setFileName(const QString&)"))
but has to generate:
self.connect(self.fileChooser1,PYSIGNAL("fileNameChanged"),self.fileChooser2.setFileName)
in the case of a Python class. Of course it has to know if it is a python
class, but it could get this information from the Comment line.
Than we need to discuss what syntax we want to use to define signals and slots
in the Python class. One problem is that designer only connects signals and
slots with fiting arguments, so we have to pass the information about the
arguments to.
What do you think about a syntax like:
class FileChooser:
Q_SIGNALS = [["fileNameChanged","QString"]]
Q_SLOTS = [["setFileName","QString"],["chooseFile"]]
def __init__ .....
Both are lists of lists of strings. One List for every sinal/slot and the
first entry of the list is the name. The following the arguments.
regards
Roland
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQE/o7+vV/hlvQgMogsRAiqfAJwO2ty5IQXkirelDFpqp1TcCU4dawCg3zd/
pRgFMu2R31cSmeoCNNiH7/4=
=7Jhs
-----END PGP SIGNATURE-----
//#include <qobject.h>
//#include <iostream>
#include <qvariant.h>
//using namespace std;
//class QVariant;
class ProxyQWidget : public QWidget
{
// Q_OBJECT
private:
QWidget *w;
public:
int devType() const { return w->devType(); }
bool isExtDev() const { return w->isExtDev(); }
bool paintingActive() const { return w->paintingActive(); }
virtual void setResolution( int r ) { w->setResolution(r); }
virtual int resolution() const { return w->resolution(); }
// Windows: get device context
// X-Windows: get drawable
#if defined(Q_WS_WIN)
virtual HDC handle() const { return w->handle(); }
#elif defined(Q_WS_X11)
virtual Qt::HANDLE handle() const { return w->handle(); }
virtual Qt::HANDLE x11RenderHandle() const { return w->x11RenderHandle(); }
#elif defined(Q_WS_MAC)
virtual Qt::HANDLE handle() const { return w->handle(); }
#elif defined(Q_WS_QWS)
virtual Qt::HANDLE handle() const { return w->handle(); }
#endif
#if defined(Q_WS_X11)
Display *x11Display() const { return w->x11Display(); }
int x11Screen() const { return w->x11Screen(); }
int x11Depth() const { return w->x11Depth(); }
int x11Cells() const { return w->x11Cells(); }
Qt::HANDLE x11Colormap() const { return w->x11Colormap(); }
bool x11DefaultColormap() const { return w->x11DefaultColormap(); }
void *x11Visual() const { return w->x11Visual(); }
bool x11DefaultVisual() const { return w->x11DefaultVisual(); }
#endif
#if defined(Q_WS_QWS)
virtual unsigned char * scanLine(int s) const { return w->scanLine(s); }
virtual int bytesPerLine() const { return w->bytesPerLine(); }
virtual QGfx * graphicsContext(bool clip_children=TRUE) const { return w->graphicsContext(clip_children); }
#endif
#ifdef Q_QDOC
virtual const char *className() const { return w->className(); }
virtual QMetaObject *metaObject() const { return w->metaObject(); }
#endif
virtual bool eventFilter( QObject *o, QEvent *e ) { return w->eventFilter(o,e); }
bool isA( const char *s ) const { return w->isA(s); }
bool inherits( const char *s ) const { return w->inherits(s); }
const char *name() const { return w->name(); }
const char *name( const char * defaultName ) const { return w->name(defaultName); }
bool isWidgetType() const { return w->isWidgetType(); }
bool highPriority() const { return w->highPriority(); }
bool signalsBlocked() const { return w->signalsBlocked(); }
void blockSignals( bool b ) { w->blockSignals(b); }
int startTimer( int interval ) { return w->startTimer(interval); }
void killTimer( int id ) { w->killTimer(id); }
void killTimers() { w->killTimers(); }
QObject *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = TRUE )
{ return w->child(objName,inheritsClass,recursiveSearch); }//### const in 4.0
const QObjectList *children() const { return w->children(); }
QObjectList *queryList( const char *inheritsClass = 0,
const char *objName = 0,
bool regexpMatch = TRUE,
bool recursiveSearch = TRUE ) const { return w->queryList(inheritsClass,objName,regexpMatch,recursiveSearch); }
virtual void insertChild( QObject *o ) { w->insertChild(o); }
virtual void removeChild( QObject *o ) { w->removeChild(o); }
void installEventFilter( const QObject *o ) { w->installEventFilter(o); }
void removeEventFilter( const QObject *o ) { w->removeEventFilter(o); }
bool connect( const QObject *sender, const char *signal,
const char *member ) const { return w->connect(sender,signal,member); }
bool disconnect( const char *signal=0,
const QObject *receiver=0, const char *member=0 ) { return w->disconnect(signal,receiver,member); }
bool disconnect( const QObject *receiver, const char *member=0 ) { return w->disconnect(receiver,member); }
void dumpObjectTree() { w->dumpObjectTree(); }
void dumpObjectInfo() { w->dumpObjectInfo(); }
#ifndef QT_NO_PROPERTIES
virtual bool setProperty( const char *name, const QVariant& value ) { return w->setProperty(name,value); }
virtual QVariant property( const char *name ) const { return w->property(name); }
#endif // QT_NO_PROPERTIES
#ifndef QT_NO_USERDATA
void setUserData( uint id, QObjectUserData* data) { return w->setUserData(id,data); }
QObjectUserData* userData( uint id ) const { return w->userData(id); }
#endif // QT_NO_USERDATA
public:
QObject *parent() const { return w->parent(); }
public slots:
void deleteLater() { return w->deleteLater(); }
// QWidget getWidget() { return w; }
ProxyQWidget(QWidget *wIn) { w = wIn; }
// Q_EXPLICIT ProxyQWidget( QWidget* parent=0, const char* name=0, WFlags f=0 ) { cout << "NOT POSSIBLE!!!" << endl; }
// ProxyQWidget(const ProxyQWidget& pw) { cout << "NOT IMPLEMENTED!!!" << endl; }
~ProxyQWidget(){ delete w; }
void* qt_cast( const char* clname ) { return w->qt_cast(clname); }
bool qt_invoke( int _id, QUObject* _o ) { return w->qt_invoke(_id,_o); }
bool qt_emit( int _id, QUObject* _o ) { return w->qt_emit(_id,_o); }
bool qt_property( int id, int f, QVariant* v) { return w->qt_property(id,f,v); }
QObject* qObject() { return w; }
WId winId() const { return w->winId(); }
void setName( const char *name ) { w->setName(name); }
#ifndef QT_NO_STYLE
// GUI style setting
QStyle &style() const { return w->style(); }
void setStyle( QStyle *s ) { w->setStyle(s); }
QStyle* setStyle( const QString& s ) { return w->setStyle(s); }
#endif
// Widget types and states
bool isTopLevel() const { return w->isTopLevel(); }
bool isDialog() const { return w->isDialog(); }
bool isPopup() const { return w->isPopup(); }
bool isDesktop() const { return w->isDesktop(); }
bool isModal() const { return w->isModal(); }
bool isEnabled() const { return w->isEnabled(); }
bool isEnabledTo(QWidget* widget) const { return w->isEnabledTo(widget); }
bool isEnabledToTLW() const { return w->isEnabledToTLW(); }
public slots:
virtual void setEnabled( bool b ) { return w->setEnabled(b); }
void setDisabled( bool b ) { setDisabled(b); }
// Widget coordinates
public:
QRect frameGeometry() const { return w->frameGeometry(); }
const QRect &geometry() const { return w->geometry(); }
int x() const { return w->x(); }
int y() const { return w->y(); }
QPoint pos() const { return w->pos(); }
QSize frameSize() const { return w->frameSize(); }
QSize size() const { return w->size(); }
int width() const { return w->width(); }
int height() const { return w->height(); }
QRect rect() const { return w->rect(); }
QRect childrenRect() const { return w->childrenRect(); }
QRegion childrenRegion() const { return w->childrenRegion(); }
QSize minimumSize() const { return w->minimumSize(); }
QSize maximumSize() const { return w->maximumSize(); }
int minimumWidth() const { return w->minimumWidth(); }
int minimumHeight() const { return w->minimumHeight(); }
int maximumWidth() const { return w->maximumWidth(); }
int maximumHeight() const { return w->maximumHeight(); }
void setMinimumSize( const QSize &s ) { w->setMinimumSize(s); }
virtual void setMinimumSize( int minw, int minh ) { w->setMinimumSize(minw,minh); }
void setMaximumSize( const QSize &s ) { w->setMaximumSize(s); }
virtual void setMaximumSize( int maxw, int maxh ) { w->setMaximumSize(maxw,maxh); }
void setMinimumWidth( int minw ) { w->setMinimumWidth(minw); }
void setMinimumHeight( int minh ) { w->setMinimumHeight(minh); }
void setMaximumWidth( int maxw ) { w->setMaximumWidth(maxw); }
void setMaximumHeight( int maxh ) { w->setMaximumHeight(maxh); }
QSize sizeIncrement() const { return w->sizeIncrement(); }
void setSizeIncrement( const QSize &s ) { w->setSizeIncrement(s); }
virtual void setSizeIncrement( int wi, int h ) { w->setSizeIncrement(wi,h); }
QSize baseSize() const { return w->baseSize(); }
void setBaseSize( const QSize &s ) { w->setBaseSize(s); }
void setBaseSize( int basew, int baseh ) { w->setBaseSize(basew,baseh); }
void setFixedSize( const QSize &s ) { w->setFixedSize(s); }
void setFixedSize( int wi, int h ) { w->setFixedSize(wi,h); }
void setFixedWidth( int wi ) { w->setFixedWidth(wi); }
void setFixedHeight( int h ) { w->setFixedHeight(h); }
// Widget coordinate mapping
QPoint mapToGlobal( const QPoint &p ) const { return w->mapToGlobal(p); }
QPoint mapFromGlobal( const QPoint &p ) const { return w->mapFromGlobal(p); }
QPoint mapToParent( const QPoint &p ) const { return w->mapToParent(p); }
QPoint mapFromParent( const QPoint &p ) const { return w->mapFromParent(p); }
QPoint mapTo( QWidget *wi, const QPoint &p ) const { return w->mapTo(wi,p); }
QPoint mapFrom( QWidget *wi, const QPoint &p ) const { return w->mapFrom(wi,p); }
QWidget *topLevelWidget() const { return w->topLevelWidget(); }
// Widget attribute functions
BackgroundMode backgroundMode() const { return w->backgroundMode(); }
virtual void setBackgroundMode( BackgroundMode bm) { w->setBackgroundMode(bm); }
void setBackgroundMode( BackgroundMode bm1, BackgroundMode bm2) { w->setBackgroundMode(bm1,bm2); }
const QColor & foregroundColor() const { return w->foregroundColor(); }
const QColor & eraseColor() const { return w->eraseColor(); }
virtual void setEraseColor( const QColor &c ) { w->setEraseColor(c); }
const QPixmap * erasePixmap() const { return w->erasePixmap(); }
virtual void setErasePixmap( const QPixmap &p ) { w->setErasePixmap(p); }
#ifndef QT_NO_PALETTE
const QColorGroup & colorGroup() const { return w->colorGroup(); }
const QPalette & palette() const { return w->palette(); }
bool ownPalette() const { return w->ownPalette(); }
virtual void setPalette( const QPalette &p ) { w->setPalette(p); }
void unsetPalette() { w->unsetPalette(); }
#endif
const QColor & paletteForegroundColor() const { return w->paletteForegroundColor(); }
void setPaletteForegroundColor( const QColor &c ) { w->setPaletteForegroundColor(c); }
const QColor & paletteBackgroundColor() const { return w->paletteBackgroundColor(); }
virtual void setPaletteBackgroundColor( const QColor &c ) { w->setPaletteBackgroundColor(c); }
const QPixmap * paletteBackgroundPixmap() const { return w->paletteBackgroundPixmap(); }
virtual void setPaletteBackgroundPixmap( const QPixmap &p ) { setPaletteBackgroundPixmap(p); }
const QBrush& backgroundBrush() const { return w->backgroundBrush(); }
QFont font() const { return w->font(); }
bool ownFont() const { return w->ownFont(); }
virtual void setFont( const QFont &f ) { w->setFont(f); }
void unsetFont() { w->unsetFont(); }
QFontMetrics fontMetrics() const { return w->fontMetrics(); }
QFontInfo fontInfo() const { return w->fontInfo(); }
#ifndef QT_NO_CURSOR
const QCursor &cursor() const { return w->cursor(); }
bool ownCursor() const { return w->ownCursor(); }
virtual void setCursor( const QCursor &c ) { w->setCursor(c); }
virtual void unsetCursor() { w->unsetCursor(); }
#endif
#ifndef QT_NO_WIDGET_TOPEXTRA
QString caption() const { return w->caption(); }
const QPixmap *icon() const { return w->icon(); }
QString iconText() const { return w->iconText(); }
#endif
bool hasMouseTracking() const { return w->hasMouseTracking(); }
bool hasMouse() const { return w->hasMouse(); }
virtual void setMask( const QBitmap &b ) { w->setMask(b); }
virtual void setMask( const QRegion &r ) { w->setMask(r); }
void clearMask() { w->clearMask(); }
const QColor & backgroundColor() const { return w->backgroundColor(); } // obsolete, use eraseColor()
virtual void setBackgroundColor( const QColor &c ) { w->setBackgroundColor(c); } // obsolete, use setEraseColor()
const QPixmap * backgroundPixmap() const { return w->backgroundPixmap(); } // obsolete, use erasePixmap()
virtual void setBackgroundPixmap( const QPixmap &p ) { w->setBackgroundPixmap(p); } // obsolete, use setErasePixmap()
public slots:
#ifndef QT_NO_WIDGET_TOPEXTRA
virtual void setCaption( const QString &s) { w->setCaption(s); }
virtual void setIcon( const QPixmap &p ) { w->setIcon(p); }
virtual void setIconText( const QString &s) { w->setIconText(s); }
#endif
virtual void setMouseTracking( bool enable ) { w->setMouseTracking(enable); }
// Keyboard input focus functions
virtual void setFocus() { w->setFocus(); }
void clearFocus() { w->clearFocus(); }
bool isActiveWindow() const { return w->isActiveWindow(); }
virtual void setActiveWindow() { w->setActiveWindow(); }
bool isFocusEnabled() const { return w->isFocusEnabled(); }
FocusPolicy focusPolicy() const { return w->focusPolicy(); }
virtual void setFocusPolicy( FocusPolicy f ) { return w->setFocusPolicy( f ); }
bool hasFocus() const { return w->hasFocus(); }
virtual void setFocusProxy( QWidget *wi ) { w->setFocusProxy(wi); }
QWidget * focusProxy() const { return w->focusProxy(); }
#if (QT_VERSION >= 0x030200)
void setInputMethodEnabled( bool b ) { w->setInputMethodEnabled(b); }
bool isInputMethodEnabled() const { return w->isInputMethodEnabled(); }
#endif
// Grab functions
void grabMouse() { w->grabMouse(); }
#ifndef QT_NO_CURSOR
void grabMouse( const QCursor &c ) { w->grabMouse(c); }
#endif
void releaseMouse() { w->releaseMouse(); }
void grabKeyboard() { w->grabKeyboard(); }
void releaseKeyboard() { w->releaseKeyboard(); }
// Update/refresh functions
bool isUpdatesEnabled() const { return w->isUpdatesEnabled(); }
#if 0 //def Q_WS_QWS
void repaintUnclipped( const QRegion &r, bool erase = TRUE ) { w->repaintUnclipped(r,erase); }
#endif
public slots:
virtual void setUpdatesEnabled( bool enable ) { w->setUpdatesEnabled(enable); }
void update() { w->update(); }
void update( int x, int y, int wi, int h ) { w->update(x,y,wi,h); }
void update( const QRect& r ) { w->update(r); }
void repaint() { w->repaint(); }
void repaint( bool erase ) { w->repaint(erase); }
void repaint( int x, int y, int wi, int h, bool erase=TRUE ) { w->repaint(x,y,wi,h,erase); }
void repaint( const QRect &r, bool erase = TRUE ) { w->repaint(r); }
void repaint( const QRegion &r, bool erase = TRUE ) { w->repaint(r); }
// Widget management functions
virtual void show() { w->show(); }
virtual void hide() { w->hide(); }
void setShown( bool show ) { w->setShown(show); }
void setHidden( bool hide ) { w->setHidden(hide); }
#ifndef QT_NO_COMPAT
void iconify() { w->iconify(); }
#endif
virtual void showMinimized() { w->showMinimized(); }
virtual void showMaximized() { w->showMaximized(); }
void showFullScreen() { w->showFullScreen(); }
virtual void showNormal() { w->showNormal(); }
virtual void polish() { w->polish(); }
void constPolish() const { w->constPolish(); }
bool close() { return w->close(); }
void raise() { w->raise(); }
void lower() { w->lower(); }
void stackUnder( QWidget* wi) { w->stackUnder(wi); }
virtual void move( int x, int y ) { w->move(x,y); }
void move( const QPoint &p ) { w->move(p); }
virtual void resize( int wi, int h ) { w->resize(wi,h); }
void resize( const QSize &s ) { w->resize(s); }
virtual void setGeometry( int x, int y, int wi, int h ) { w->setGeometry(x,y,wi,h); }
virtual void setGeometry( const QRect &r ) { w->setGeometry(r); } // ### make non virtual in Qt 4?
public:
virtual bool close( bool alsoDelete ) { return w->close(alsoDelete); }
bool isVisible() const { return w->isVisible(); }
bool isVisibleTo(QWidget* wi) const { return w->isVisibleTo(wi); }
bool isVisibleToTLW() const { return w->isVisibleToTLW(); } // obsolete
QRect visibleRect() const { return w->visibleRect(); } // obsolete
bool isHidden() const { return w->isHidden(); }
bool isShown() const { return w->isShown(); }
bool isMinimized() const { return w->isMinimized(); }
bool isMaximized() const { return w->isMaximized(); }
bool isFullScreen() const { return w->isFullScreen(); }
virtual QSize sizeHint() const { return w->sizeHint(); }
virtual QSize minimumSizeHint() const { return w->minimumSizeHint(); }
virtual QSizePolicy sizePolicy() const { return w->sizePolicy(); }
virtual void setSizePolicy( QSizePolicy sp) { w->setSizePolicy(sp); }
void setSizePolicy( QSizePolicy::SizeType hor, QSizePolicy::SizeType ver, bool hfw = FALSE )
{ w->setSizePolicy(hor,ver,hfw); }
virtual int heightForWidth(int h) const { return w->heightForWidth(h); }
#if (QT_VERSION >= 0x030200)
QRegion clipRegion() const { return w->clipRegion(); }
#endif
// ### move together with other slots in Qt 4.0
public slots:
virtual void adjustSize() { w->adjustSize(); }
public:
#ifndef QT_NO_LAYOUT
QLayout * layout() const { return w->layout(); }
#endif
void updateGeometry() { w->updateGeometry(); }
virtual void reparent( QWidget *parent, WFlags wf, const QPoint &p,
bool showIt=FALSE ) { w->reparent(parent,wf,p,showIt); }
void reparent( QWidget *parent, const QPoint &p,
bool showIt=FALSE ) { w->reparent(parent,p,showIt); }
#ifndef QT_NO_COMPAT
void recreate( QWidget *parent, WFlags f, const QPoint & p,
bool showIt=FALSE ) { w->recreate(parent,f,p,showIt); }
#endif
void erase() { w->erase(); }
void erase( int x, int y, int wi, int h ) { w->erase(x,y,wi,h); }
void erase( const QRect &r ) { w->erase(r); }
void erase( const QRegion &r ) { w->erase(r); }
void scroll( int dx, int dy ) { w->scroll(dx,dy); }
void scroll( int dx, int dy, const QRect& r ) { w->scroll(dx,dy,r); }
void drawText( int x, int y, const QString &s ) { w->drawText(x,y,s); }
void drawText( const QPoint & p, const QString &s ) { w->drawText(p,s); }
// Misc. functions
QWidget * focusWidget() const { return w->focusWidget(); }
QRect microFocusHint() const { return w->microFocusHint(); }
// drag and drop
bool acceptDrops() const { return w->acceptDrops(); }
virtual void setAcceptDrops( bool on ) { return w->setAcceptDrops(on); }
// transparency and pseudo transparency
virtual void setAutoMask(bool b) { w->setAutoMask(b); }
bool autoMask() const { return w->autoMask(); }
virtual void setBackgroundOrigin( BackgroundOrigin b ) { w->setBackgroundOrigin(b); }
BackgroundOrigin backgroundOrigin() const { return w->backgroundOrigin(); }
QPoint backgroundOffset() const { return w->backgroundOffset(); }
// whats this help
virtual bool customWhatsThis() const { return w->customWhatsThis(); }
QWidget * parentWidget( bool sameWindow = FALSE ) const { return w->parentWidget(sameWindow); }
WState testWState( WState s ) const { return w->testWState(s); }
WFlags testWFlags( WFlags f ) const { return w->testWFlags(f); }
QWidget *childAt( int x, int y, bool includeThis = FALSE ) const { return w->childAt(x,y,includeThis); }
QWidget *childAt( const QPoint &p, bool includeThis = FALSE ) const { return w->childAt(p,includeThis); }
#if defined(Q_WS_QWS)
virtual QGfx * graphicsContext(bool clip_children=TRUE) const { return w->graphicsContext(clip_children); }
#endif
#if defined(Q_WS_MAC)
QRegion clippedRegion(bool do_children=TRUE) { return w->clippedRegion(do_children); }
uint clippedSerial(bool do_children=TRUE) { return w->clippedSerial(do_children); }
#ifndef QMAC_NO_QUARTZ
CGContextRef macCGContext(bool clipped=TRUE) const { return w->macCGContext(clipped); }
#endif
#endif
};