You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
827 B
45 lines
827 B
// -*- c++ -*-
|
|
|
|
#ifndef KSPY_H
|
|
#define KSPY_H
|
|
|
|
#include <klibloader.h>
|
|
|
|
/**
|
|
* Loader for the TQObject debugging tool. The usage is simple, just call
|
|
* KSpy::invoke(), then use the spy window to examine the state of your
|
|
* TQObjects.
|
|
*
|
|
* @author Richard Moore, rich@kde.org
|
|
* @version $Id$
|
|
*/
|
|
class KSpy
|
|
{
|
|
public:
|
|
/**
|
|
* Loads and invokes the KSpy utility.
|
|
*/
|
|
static void invoke() {
|
|
KLibLoader *loader = KLibLoader::self();
|
|
KLibrary *lib = loader->library( "libkspy" );
|
|
|
|
if ( !lib ) {
|
|
tqWarning( "Unable to load KSpy library\n" );
|
|
return;
|
|
}
|
|
|
|
lib->factory(); // Ensure the factory is loaded
|
|
|
|
// We don't need to do any more, KSpy is fired up by the loader hook
|
|
// in the shared library.
|
|
}
|
|
|
|
private:
|
|
// Prevent instantiation.
|
|
KSpy() {}
|
|
~KSpy() {}
|
|
};
|
|
|
|
#endif // KSPY_H
|
|
|