[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/lib
From: Matt Broadstone <mbroadst () gmail ! com>
Date: 2007-02-28 23:35:30
Message-ID: 1172705730.381563.30302.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 638147 by mbroadst:
Get things actually building here
M +3 -2 CMakeLists.txt
M +101 -4 dataengine.cpp
M +4 -2 dataengine.h
M +34 -4 interface.cpp
M +12 -4 interface.h
--- trunk/KDE/kdebase/workspace/plasma/lib/CMakeLists.txt #638146:638147
@@ -1,6 +1,5 @@
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-
-
########### next target ###############
set(plasma_LIB_SRCS
@@ -9,6 +8,7 @@
interface.cpp
runner.cpp
theme.cpp
+ dataengine.cpp
)
kde4_automoc(${plasma_LIB_SRCS})
@@ -29,5 +29,6 @@
runner.h
theme.h
interface.h
+ dataengine.h
DESTINATION ${INCLUDE_INSTALL_DIR}/plasma )
--- trunk/KDE/kdebase/workspace/plasma/lib/dataengine.cpp #638146:638147
@@ -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;
+}
+
+
--- trunk/KDE/kdebase/workspace/plasma/lib/dataengine.h #638146:638147
@@ -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 @@
Private* d;
};
-class DataEngine : public QObject
+class KDE_EXPORT DataEngine : public QObject
{
Q_OBJECT
--- trunk/KDE/kdebase/workspace/plasma/lib/interface.cpp #638146:638147
@@ -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";
+}
+
+}
--- trunk/KDE/kdebase/workspace/plasma/lib/interface.h #638146:638147
@@ -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;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic