From 49fb801ffc935b2f8c883ba91bcd55ae0d2d6a29 Mon Sep 17 00:00:00 2001 From: APTX Date: Thu, 4 Apr 2013 14:02:03 +0200 Subject: [PATCH] Add changes to OpenFileData to script interface --- localmylist/scriptable.cpp | 28 ++++++++++++++++++++++++++++ localmylist/scriptable.h | 8 ++++++++ 2 files changed, 36 insertions(+) diff --git a/localmylist/scriptable.cpp b/localmylist/scriptable.cpp index 49c2f78..e4a6e73 100644 --- a/localmylist/scriptable.cpp +++ b/localmylist/scriptable.cpp @@ -1930,6 +1930,34 @@ void OpenFileData::write_epno(int val) o->epno = val; } +int OpenFileData::read_hostId() const +{ + auto o = thisObj(); + if (!o) return int(); + return o->hostId; +} + +void OpenFileData::write_hostId(int val) +{ + auto o = thisObj(); + if (!o) return; + o->hostId = val; +} + +QString OpenFileData::read_localPath() const +{ + auto o = thisObj(); + if (!o) return QString(); + return o->localPath; +} + +void OpenFileData::write_localPath(QString val) +{ + auto o = thisObj(); + if (!o) return; + o->localPath = val; +} + QString OpenFileData::read_path() const { auto o = thisObj(); diff --git a/localmylist/scriptable.h b/localmylist/scriptable.h index cc22a62..3e994a9 100644 --- a/localmylist/scriptable.h +++ b/localmylist/scriptable.h @@ -635,6 +635,8 @@ class LOCALMYLISTSHARED_EXPORT OpenFileData : public QObject, protected QScripta Q_PROPERTY(QString animeTitle READ read_animeTitle WRITE write_animeTitle) Q_PROPERTY(QString episodeTitle READ read_episodeTitle WRITE write_episodeTitle) Q_PROPERTY(int epno READ read_epno WRITE write_epno) + Q_PROPERTY(int hostId READ read_hostId WRITE write_hostId) + Q_PROPERTY(QString localPath READ read_localPath WRITE write_localPath) Q_PROPERTY(QString path READ read_path WRITE write_path) ::LocalMyList::OpenFileData *thisObj() const; @@ -657,6 +659,12 @@ public: int read_epno() const; void write_epno(int val); + int read_hostId() const; + void write_hostId(int val); + + QString read_localPath() const; + void write_localPath(QString val); + QString read_path() const; void write_path(QString val); }; -- 2.52.0