File indexing completed on 2024-04-21 05:43:54

0001 /***************************************************************************
0002  *   Copyright (C) 2005 by David Saxton                                    *
0003  *   david@bluehaze.org                                                    *
0004  *                                                                         *
0005  *   This program is free software; you can redistribute it and/or modify  *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  ***************************************************************************/
0010 
0011 #include "config.h"
0012 #ifndef NO_GPSIM
0013 
0014 #ifndef DEBUGMANAGER_H
0015 #define DEBUGMANAGER_H
0016 
0017 #include <QMap>
0018 #include <QObject>
0019 #include <QPointer>
0020 
0021 class GpsimProcessor;
0022 class TextDocument;
0023 
0024 typedef QList<QPointer<GpsimProcessor>> GpsimProcessorList;
0025 
0026 /**
0027 @author David Saxton
0028 */
0029 class DebugManager : public QObject
0030 {
0031     Q_OBJECT
0032 public:
0033     static DebugManager *self();
0034     ~DebugManager() override;
0035 
0036     void registerGpsim(GpsimProcessor *gpsim);
0037     /**
0038      * Called from TextDocument when it opens a URL so that it can be
0039      * connected up to any processors that refer to its url.
0040      */
0041     void urlOpened(TextDocument *td);
0042 
0043 protected:
0044     GpsimProcessorList m_processors;
0045 
0046 public:
0047     DebugManager();
0048 
0049 private:
0050     //      static DebugManager * m_pSelf;
0051 };
0052 
0053 #endif
0054 
0055 #endif