Get things actually building here

svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=638147
This commit is contained in:
Matt Broadstone 2007-02-28 23:35:26 +00:00
parent 13920a4cc1
commit b49680140c
5 changed files with 154 additions and 16 deletions

View File

@ -1,5 +1,4 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
########### next target ###############
@ -9,6 +8,7 @@ set(plasma_LIB_SRCS
interface.cpp
runner.cpp
theme.cpp
dataengine.cpp
)
kde4_automoc(${plasma_LIB_SRCS})
@ -29,5 +29,6 @@ install( FILES
runner.h
theme.h
interface.h
dataengine.h
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma )

View File

@ -16,27 +16,124 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kdebug.h>
#include "dataengine.h"
#include "dataengine.moc"
using namespace Plasma;
class DataSource::Private
{
public:
Private();
Private() {}
~Private() {}
};
DataSource(QObject* parent)
DataSource::DataSource(QObject* parent)
: QObject(parent)
{
d = new Private();
}
virtual ~DataSource()
DataSource::~DataSource()
{
delete d;
}
QString name()
QString DataSource::name()
{
kDebug() << k_funcinfo << " not implemented";
return QString();
}
DataEngine::DataEngine(QObject* parent)
: QObject(parent)
{
}
DataEngine::~DataEngine()
{
}
QStringList DataEngine::dataSources()
{
kDebug() << k_funcinfo << " not implemented";
return QStringList();
}
void DataEngine::connect(const QString& source, DataVisualization* visualization)
{
Q_UNUSED(source)
Q_UNUSED(visualization)
kDebug() << k_funcinfo << " not implemented";
}
DataSource::Data DataEngine::query(const QString& source)
{
Q_UNUSED(source)
kDebug() << k_funcinfo << " not implemented";
}
void DataEngine::init()
{
kDebug() << k_funcinfo << " not implemented";
}
void DataEngine::cleanup()
{
kDebug() << k_funcinfo << " not implemented";
}
void DataEngine::setDataSource(const QString& source, const QVariant& value)
{
Q_UNUSED(source)
Q_UNUSED(value)
kDebug() << k_funcinfo << " not implemented";
}
void DataEngine::createDataSource(const QString& source, const QString& domain)
{
Q_UNUSED(source)
Q_UNUSED(domain)
kDebug() << k_funcinfo << " not implemented";
}
void DataEngine::removeDataSource(const QString& source)
{
Q_UNUSED(source)
kDebug() << k_funcinfo << " not implemented";
}
void DataEngine::clearAllDataSources()
{
kDebug() << k_funcinfo << " not implemented";
}
void DataEngine::ref()
{
kDebug() << k_funcinfo << " not implemented";
}
void DataEngine::deref()
{
kDebug() << k_funcinfo << " not implemented";
}
bool DataEngine::isUsed()
{
kDebug() << k_funcinfo << " not implemented";
return false;
}

View File

@ -24,13 +24,15 @@
#include <QObject>
#include <QStringList>
#include <kdelibs_export.h>
namespace Plasma
{
class DataSource;
class DataVisualization;
class DataSource : public QObject
class KDE_EXPORT DataSource : public QObject
{
Q_OBJECT
@ -51,7 +53,7 @@ class DataSource : public QObject
Private* d;
};
class DataEngine : public QObject
class KDE_EXPORT DataEngine : public QObject
{
Q_OBJECT

View File

@ -16,14 +16,44 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <kdebug.h>
#include "interface.h"
namespace Plasma
{
Interface* Interface::m_interface;
Interface::Interface() {}
Interface::~Interface() {}
Interface* Interface::m_interface = 0;
} // Plasma namespace
Interface *Interface::self()
{
if (!m_interface)
m_interface = new Interface;
return m_interface;
}
Interface::Interface()
{
}
Interface::~Interface()
{
}
bool loadDataEngine(const QString& name)
{
Q_UNUSED(name)
kDebug() << k_funcinfo << " not implemented";
return false;
}
void unloadDataEngine(const QString& name)
{
Q_UNUSED(name)
kDebug() << k_funcinfo << " not implemented";
}
}

View File

@ -21,20 +21,28 @@
#include <QString>
#include <kdelibs_export.h>
namespace Plasma
{
class Interface
class KDE_EXPORT Interface
{
public:
static Interface* self() { return m_interface; }
// NOTE: Fix this stuff, not sure what the design was supposed to be,
// but, this thing can't be a singleton because we can't create
// an Interface object due to the pure virtuals. Maybe make them
// just virtual? -MB
virtual bool loadDataEngine(const QString& name) = 0;
virtual void unloadDataEngine(const QString& name) = 0;
static Interface* self();
virtual bool loadDataEngine(const QString &name);
virtual void unloadDataEngine(const QString &name);
protected:
Interface();
virtual ~Interface();
static Interface* m_interface;
};