diff --git a/src/seaprintdbusadaptor.cpp b/src/seaprintdbusadaptor.cpp new file mode 100644 index 0000000..bcb9b54 --- /dev/null +++ b/src/seaprintdbusadaptor.cpp @@ -0,0 +1,21 @@ +#include "seaprintdbusadaptor.h" +#include + +SeaPrintDBusAdaptor::SeaPrintDBusAdaptor(QQuickView *view) + : QDBusAbstractAdaptor(view) + , DBusAdaptorBase(view) +{ +} + +SeaPrintDBusAdaptor::~SeaPrintDBusAdaptor() +{ +} + +void SeaPrintDBusAdaptor::Open(const QString& fileName) +{ + doOpen(fileName); +} +void SeaPrintDBusAdaptor::OpenPlaintext(const QString& fileContents, const QString& name) +{ + doCreateFileAndOpen(fileContents, name); +} diff --git a/src/seaprintdbusadaptor.h b/src/seaprintdbusadaptor.h new file mode 100644 index 0000000..a54923f --- /dev/null +++ b/src/seaprintdbusadaptor.h @@ -0,0 +1,21 @@ +#ifndef SEAPRINTDBUSADAPTOR_H +#define SEAPRINTDBUSADAPTOR_H + +#include "dbusadaptorbase.h" + +class SeaPrintDBusAdaptor : public QDBusAbstractAdaptor, public DBusAdaptorBase +{ + Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "net.attah.seaprint") + +public: + SeaPrintDBusAdaptor(QQuickView *view); + ~SeaPrintDBusAdaptor(); + +public Q_SLOTS: + Q_NOREPLY void Open(const QString& fileName); + Q_NOREPLY void OpenPlaintext(const QString& fileContents, const QString& name); + +}; + +#endif // SEAPRINTDBUSADAPTOR_H