summaryrefslogtreecommitdiffstats
path: root/ksirc/objFinder.h
blob: 8777dd68919ba0637222017627e9679f42582e47 (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
#ifndef OBJFINGER_H
#define OBJFINGER_H

#include <qobject.h>
#include <qdict.h>
#include <qstringlist.h>

class objFinder : public QObject {
  Q_OBJECT
public:

  objFinder();
  virtual ~objFinder();
    
  static void insert(QObject *obj, const char *key = 0);
  static QObject *find(const char *name, const char *inherits);
  static void dumpTree();
  static QStringList allObjects();

signals:
  void inserted(QObject *obj);
  
protected slots:
  void objDest();

private:
  /*
   * Don't allow the object to be created, all it's members are static
   */

  static QString randString();

  
  static QDict<QObject> *objList;
    
};

extern objFinder *objFind;

#endif