9 #ifndef _DATASOURCEMANAGER_
10 #define _DATASOURCEMANAGER_
12 #include <QtCore/QObject>
13 #include <QtCore/QMap>
14 #include <QtCore/QString>
static void addSource(const QString &sourcename, DataSource *source, bool setActive=true)
add a data source
DataSourceManager & operator=(const DataSourceManager &)
self assignment
QMap< QString, DataSource * > _sources
container for all data sources
QSignalMapper * _mapper
mapper for the signals of the signal group
static DataSourceManager * _instance
an instane of this
base class for data sources
void sourceChanged(QString newSource)
signal when a new source was chosen
QActionGroup * _actionGroup
the action group where the menue items will be grouped
singleton class to manage the available data sources
static DataSource * source(const QString &sourcename=QString())
retrieve an available source
static DataSourceManager * instance()
generate an instance of this, if not already existent
DataSourceManager()
constructor
static QStringList sourceNames()
retrieve the names of all current active sources
static void setMenu(QMenu *menu)
set the Menu where the data sources will be displayed in
static QString currentSourceName()
return the current source name
QMenu * _sourceMenu
the source menu