Source Code (Use browser search to find items of interest.)

Class Index

qt'QXtApplication (./qt-2.1.0/include/qxt.h:33)

class QXtApplication : public QApplication {
    Q_OBJECT
    void init();
public:
    QXtApplication(int& argc, char** argv,
	const char* appclass=0,
	XrmOptionDescRec *options=0, int num_options=0,
	const char** resources=0);
    QXtApplication(Display*);
    ~QXtApplication();
};


qt'QXtApplication::QXtApplication() (./qt-2.1.0/extensions/xt/src/qxt.cpp:286)

QXtApplication::QXtApplication(int& argc, char** argv,
	const char* appclass, XrmOptionDescRec *options,
	int num_options,
	const char** resources) :
    QApplication(argc, argv)
{
    my_xt = TRUE;
    XtToolkitInitialize();
    appcon = XtCreateApplicationContext();
    if (resources)
	XtAppSetFallbackResources(appcon, (char**)resources);
    XtDisplayInitialize(appcon, qt_xdisplay(), name(),
	appclass, options, num_options, &argc, argv);
    init();
}

/*!
  Constructs a QApplication from the \a display of an already-initialized
  Xt application.

  Use this constructor when introducing Qt widgets into an existing
  Xt/Motif application.
*/

qt'QXtApplication::QXtApplication() (./qt-2.1.0/extensions/xt/src/qxt.cpp:309)

QXtApplication::QXtApplication(Display *display) :
    QApplication(display)
{
    my_xt = FALSE;
    init();
    appcon = XtDisplayToApplicationContext(display);
}

/*!
  Destructs the application.  Does not close the Xt toolkit.
*/

qt'QXtApplication::~QXtApplication() (./qt-2.1.0/extensions/xt/src/qxt.cpp:320)

QXtApplication::~QXtApplication()
{
    ASSERT(qxtapp==this);
    removeXtEventFilters();
    qxtapp = 0;

    // the manpage says: "or just exit", that's what we do to avoid
    // double closing of the display
//     if (my_xt) {
//  	XtDestroyApplicationContext(appcon);
//      }
}


qt'QXtApplication::init() (./qt-2.1.0/extensions/xt/src/qxt.cpp:333)

void QXtApplication::init()
{
    ASSERT(qxtapp==0);
    qxtapp = this;
    installXtEventFilters();
    qt_np_add_timeoutcb(np_do_timers);
    qt_np_add_timer_setter(np_set_timer);
    qt_np_add_event_proc(np_event_proc);
    qt_np_count++;
}


/*!
  \class QXtWidget qxt.h
  \brief Allows mixing of Xt/Motif and Qt widgets.

  \extension Xt/Motif

  QXtWidget acts as a bridge between Xt and Qt. For utilizing old
  Xt widgets, it can be a QWidget
  based on a Xt widget class. For including Qt widgets in an existing
  Xt/Motif application, it can be a special Xt widget class that is
  a QWidget.  See the constructors for the different behaviors.
*/