]> Some of my projects - localmylist.git/commitdiff
Add changes to OpenFileData to script interface
authorAPTX <marek321@gmail.com>
Thu, 4 Apr 2013 12:02:03 +0000 (14:02 +0200)
committerAPTX <marek321@gmail.com>
Thu, 4 Apr 2013 12:02:03 +0000 (14:02 +0200)
localmylist/scriptable.cpp
localmylist/scriptable.h

index 49c2f78d64d0913662e04ff1305644a050860439..e4a6e73b5c3e3bbec5850e02ef6299c395f71c7f 100644 (file)
@@ -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();
index cc22a629ee3d80195276fcb6093ca1532a0e17e9..3e994a9ecf6464eaa57238ea9c4ccb14ea5732a7 100644 (file)
@@ -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);
 };