blob: b749fcbbd9b719d7c81afc78309453ddb2d2a221 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#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, [email protected]
* @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
|