QGIS API Documentation  master-6227475
src/core/gps/qgsgpsconnectionregistry.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                           qgsgpsconnectionregistry.h  -  description
00003                           --------------------------
00004     begin                : December 27th, 2009
00005     copyright            : (C) 2009 by Marco Hugentobler
00006     email                : marco at hugis dot net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef QGSGPSCONNECTIONREGISTRY_H
00019 #define QGSGPSCONNECTIONREGISTRY_H
00020 
00021 #include <QList>
00022 #include <QSet>
00023 
00024 class QgsGPSConnection;
00025 
00028 class CORE_EXPORT QgsGPSConnectionRegistry
00029 {
00030   public:
00031     static QgsGPSConnectionRegistry* instance();
00032     ~QgsGPSConnectionRegistry();
00033 
00035     void registerConnection( QgsGPSConnection* c );
00037     void unregisterConnection( QgsGPSConnection* c );
00038 
00039     QList< QgsGPSConnection *> connectionList() const;
00040 
00041   protected:
00042     QgsGPSConnectionRegistry();
00043 
00044     static QgsGPSConnectionRegistry* mInstance;
00045 
00046     QSet<QgsGPSConnection*> mConnections;
00047 };
00048 
00049 #endif // QGSGPSCONNECTIONREGISTRY_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines