Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

qxembed.h

Go to the documentation of this file.
00001 /****************************************************************************
00002     Definition of QXEmbed class
00003 
00004    Copyright (C) 1999-2000 Troll Tech AS
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 *****************************************************************************/
00021 
00022 #ifndef QXEMBED_H
00023 #define QXEMBED_H
00024 
00025 #include <qwidget.h>
00026 
00027 #ifdef Q_WS_X11
00028 
00029 class QXEmbedData;
00030 
00057 class QXEmbed : public QWidget
00058 {
00059     Q_OBJECT
00060 
00061 public:
00062 
00070     QXEmbed( QWidget *parent=0, const char *name=0, WFlags f = 0 );
00071 
00075     ~QXEmbed();
00076 
00084     static void initialize();
00085 
00086     enum Protocol { XEMBED, XPLAIN };
00087 
00102     void setProtocol( Protocol proto );
00103 
00110     Protocol protocol();
00111 
00124     void embed( WId w );
00125 
00132     WId embeddedWinId() const;
00133 
00142     static void embedClientIntoWindow( QWidget* client, WId window );
00143 
00154     static bool processClientCmdline( QWidget* client, int& argc, char ** argv );
00155 
00163     void sendDelete( void );
00164     
00174     void setAutoDelete( bool );
00175 
00182     bool autoDelete() const;
00183 
00184     /* Reimp */
00185     QSize sizeHint() const;
00186     QSize minimumSizeHint() const;
00187     QSizePolicy sizePolicy() const;
00188     bool eventFilter( QObject *, QEvent * );
00189     bool customWhatsThis() const;
00190     void enterWhatsThisMode(); // temporary, fix in Qt (Matthias, Mon Jul 17 15:20:55 CEST 2000  )
00191     virtual void reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt = false );
00192 
00196     void updateEmbeddedFocus( bool hasfocus );
00197 
00198 signals:
00204     // KDE4 rename to embeddedWindowLost()
00205     void embeddedWindowDestroyed();
00206 
00207 protected:
00208     bool event( QEvent * );
00209     void keyPressEvent( QKeyEvent * );
00210     void keyReleaseEvent( QKeyEvent * );
00211     void focusInEvent( QFocusEvent * );
00212     void focusOutEvent( QFocusEvent * );
00213     void resizeEvent(QResizeEvent *);
00214     void showEvent( QShowEvent * );
00215     bool x11Event( XEvent* );
00216 
00224     virtual void windowChanged( WId w );
00225 
00226     bool focusNextPrevChild( bool next );
00227 
00228 private:
00229     WId window;
00230     QXEmbedData* d;
00231     void checkGrab();
00232     void sendSyntheticConfigureNotifyEvent();
00233 };
00234 
00235 
00236 #endif
00237 #endif

Generated on Wed Sep 14 10:59:02 2005 for yast2-qt by  doxygen 1.4.4