Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

TQMotif Class Reference

The TQMotif class provides the basis of the Motif Extension. More...

This class is part of the TQt Motif Extension.

#include <tqmotif.h>

Inherits TQEventLoop.

List of all member functions.

Public Members

Static Public Members


Detailed Description

This class is defined in the TQt Motif Extension, which can be found in the qt/extensions directory. It is not included in the main TQt API.

The TQMotif class provides the basis of the Motif Extension.

TQMotif only provides a few public functions, but it is at the heart of the integration. TQMotif is responsible for initializing the Xt toolkit and the Xt application context. It does not open a connection to the X server, that is done by TQApplication.

The only member function in TQMotif that depends on an X server connection is TQMotif::initialize(). TQMotif must be created before TQApplication.

Example usage of TQMotif and TQApplication:

    static char *resources[] = {
        ...
    };

    int main(int argc, char **argv)
    {
        TQMotif integrator( "AppClass" );
        XtAppSetFallbackResources( integrator.applicationContext(),
                                   resources );
        TQApplication app( argc, argv );

        ...

        return app.exec();
    }
    

Member Function Documentation

TQMotif::TQMotif ( const char * applicationClass, XtAppContext context = NULL, XrmOptionDescRec * options = 0, int numOptions = 0 )

Creates TQMotif, which allows TQt and Xt/Motif integration.

If context is 0, TQMotif creates a default application context itself. The context is accessible through applicationContext().

All arguments passed to this function (applicationClass, options and numOptions) are used to call XtDisplayInitialize() after TQApplication has been constructed.

TQMotif::~TQMotif ()

Destroys TQMotif.

XtAppContext TQMotif::applicationContext () const

Returns the application context.

Display * TQMotif::x11Display () [static]

Returns the X11 display connection used by the TQt Motif Extension.

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.


Copyright © 2007 TrolltechTrademarks
TQt 3.3.8