QXEmbed Class Reference
The QXEmbed widget is a graphical socket that can embed an external X-Window.
More...
#include <qxembed.h>
List of all members.
|
Public Types |
enum | Protocol { XEMBED,
XPLAIN
} |
Signals |
void | embeddedWindowDestroyed () |
Public Member Functions |
| QXEmbed (QWidget *parent=0, const char *name=0, WFlags f=0) |
| ~QXEmbed () |
void | setProtocol (Protocol proto) |
Protocol | protocol () |
void | embed (WId w) |
WId | embeddedWinId () const |
QSize | sizeHint () const |
QSize | minimumSizeHint () const |
QSizePolicy | sizePolicy () const |
bool | eventFilter (QObject *, QEvent *) |
void | setAutoDelete (bool) |
bool | autoDelete () const |
bool | customWhatsThis () const |
void | enterWhatsThisMode () |
virtual void | reparent (QWidget *parent, WFlags f, const QPoint &p, bool showIt=false) |
Static Public Member Functions |
void | initialize () |
void | embedClientIntoWindow (QWidget *client, WId window) |
| processClientCmdline()
|
bool | processClientCmdline (QWidget *client, int &argc, char **argv) |
Protected Member Functions |
bool | event (QEvent *) |
void | keyPressEvent (QKeyEvent *) |
void | keyReleaseEvent (QKeyEvent *) |
void | focusInEvent (QFocusEvent *) |
void | focusOutEvent (QFocusEvent *) |
void | resizeEvent (QResizeEvent *) |
void | showEvent (QShowEvent *) |
bool | x11Event (XEvent *) |
virtual void | windowChanged (WId w) |
bool | focusNextPrevChild (bool next) |
Private Member Functions |
void | checkGrab () |
void | sendSyntheticConfigureNotifyEvent () |
Private Attributes |
WId | window |
QXEmbedData * | d |
Detailed Description
The QXEmbed widget is a graphical socket that can embed an external X-Window.
A QXEmbed widget serves as an embedder that can manage one single embedded X-window. These so-called client windows can be arbitrary QWidgets.
There are two different ways of using QXEmbed, from the embedder's or from the client's side. When using it from the embedder's side, you already know the window identifier of the window that should be embedded. Simply call embed() with this identifier as parameter.
Embedding from the client's side requires that the client knows the window identifier of the respective embedder widget. Use either embedClientIntoWindow() or the high-level wrapper processClientCmdline().
If a window has been embedded successfully, embeddedWinId() returns its id.
Reimplement the change handler windowChanged() to catch embedding or the destruction of embedded windows. In the latter case, the embedder also emits a signal embeddedWindowDestroyed() for convenience.
Member Enumeration Documentation
Constructor & Destructor Documentation
QXEmbed::QXEmbed |
( |
QWidget * |
parent = 0 , |
|
|
const char * |
name = 0 , |
|
|
WFlags |
f = 0 |
|
) |
|
|
|
Constructs a xembed widget.
The parent, name and f arguments are passed to the QFrame constructor. |
|
Destructor. Cleans up the focus if necessary. |
Member Function Documentation
bool QXEmbed::autoDelete |
( |
|
) |
const |
|
void QXEmbed::checkGrab |
( |
|
) |
[private] |
|
bool QXEmbed::customWhatsThis |
( |
|
) |
const |
|
void QXEmbed::embed |
( |
WId |
w |
) |
|
|
|
Embeds the window with the identifier w into this xembed widget.
This function is useful if the server knows about the client window that should be embedded. Often it is vice versa: the client knows about its target embedder. In that case, it is not necessary to call embed(). Instead, the client will call the static function embedClientIntoWindow().
- Parameters:
-
| w | the identifier of the window to embed |
- See also:
- embeddedWinId()
|
void QXEmbed::embedClientIntoWindow |
( |
QWidget * |
client, |
|
|
WId |
window |
|
) |
[static] |
|
|
processClientCmdline()
A function for clients that embed themselves. The widget client will be embedded in the window window. The application has to ensure that window is the handle of the window identifier of an QXEmbed widget. |
void QXEmbed::embeddedWindowDestroyed |
( |
|
) |
[signal] |
|
|
This signal is emitted when the embedded window has been destroyed.
- See also:
- embeddedWinId()
|
WId QXEmbed::embeddedWinId |
( |
|
) |
const |
|
|
Returns the window identifier of the embedded window, or 0 if no window is embedded yet.
- Returns:
- the id of the embedded window (0 if no window is embedded)
|
void QXEmbed::enterWhatsThisMode |
( |
|
) |
|
|
bool QXEmbed::event |
( |
QEvent * |
|
) |
[protected] |
|
bool QXEmbed::eventFilter |
( |
QObject * |
, |
|
|
QEvent * |
|
|
) |
|
|
void QXEmbed::focusInEvent |
( |
QFocusEvent * |
|
) |
[protected] |
|
bool QXEmbed::focusNextPrevChild |
( |
bool |
next |
) |
[protected] |
|
void QXEmbed::focusOutEvent |
( |
QFocusEvent * |
|
) |
[protected] |
|
void QXEmbed::initialize |
( |
|
) |
[static] |
|
void QXEmbed::keyPressEvent |
( |
QKeyEvent * |
|
) |
[protected] |
|
void QXEmbed::keyReleaseEvent |
( |
QKeyEvent * |
|
) |
[protected] |
|
QSize QXEmbed::minimumSizeHint |
( |
|
) |
const |
|
|
Returns the minimum size specified by the embedded window. |
bool QXEmbed::processClientCmdline |
( |
QWidget * |
client, |
|
|
int & |
argc, |
|
|
char ** |
argv |
|
) |
[static] |
|
|
A utility function for clients that embed theirselves. The widget client will be embedded in the window that is passed as -embed command line argument.
The function returns true on success or false if no such command line parameter is specified.
- See also:
- embedClientIntoWindow()
|
|
Returns the protocol used for embedding the current window.
- Returns:
- the protocol used by QXEmbed.
|
virtual void QXEmbed::reparent |
( |
QWidget * |
parent, |
|
|
WFlags |
f, |
|
|
const QPoint & |
p, |
|
|
bool |
showIt = false |
|
) |
[virtual] |
|
void QXEmbed::resizeEvent |
( |
QResizeEvent * |
|
) |
[protected] |
|
void QXEmbed::sendSyntheticConfigureNotifyEvent |
( |
|
) |
[private] |
|
void QXEmbed::setAutoDelete |
( |
bool |
|
) |
|
|
void QXEmbed::setProtocol |
( |
Protocol |
proto |
) |
|
|
|
Sets the protocol used for embedding windows. This function must be called before embedding a window. Protocol XEMBED provides maximal functionality (focus, tabs, etc) but requires explicit cooperation from the embedded window. Protocol XPLAIN provides maximal compatibility with embedded applications that do not support the XEMBED protocol. The default is XEMBED.
Future work: Create a protocol AUTO that selects the best option. This will be possible with the XEMBED v2 specification. |
void QXEmbed::showEvent |
( |
QShowEvent * |
|
) |
[protected] |
|
QSize QXEmbed::sizeHint |
( |
|
) |
const |
|
|
Returns a size sufficient for the embedded window |
QSizePolicy QXEmbed::sizePolicy |
( |
|
) |
const |
|
|
Specifies that this widget can use additional space, and that it can survive on less than sizeHint(). |
virtual void QXEmbed::windowChanged |
( |
WId |
w |
) |
[protected, virtual] |
|
|
A change handler that indicates that the embedded window has been changed. The window handle can also be retrieved with embeddedWinId().
- Parameters:
-
| w | the handle of the window that changed |
|
bool QXEmbed::x11Event |
( |
XEvent * |
|
) |
[protected] |
|
Member Data Documentation
The documentation for this class was generated from the following file:
Generated on Wed Nov 12 06:11:16 2008 for yast2-qt by
1.3.9.1