diff --git a/src/services/owncloud/owncloudfeed.cpp b/src/services/owncloud/owncloudfeed.cpp index f9b73afc3..643b8f236 100755 --- a/src/services/owncloud/owncloudfeed.cpp +++ b/src/services/owncloud/owncloudfeed.cpp @@ -15,11 +15,15 @@ // You should have received a copy of the GNU General Public License // along with RSS Guard. If not, see . -#include "owncloudfeed.h" +#include "services/owncloud/owncloudfeed.h" #include "miscellaneous/iconfactory.h" #include "services/owncloud/owncloudserviceroot.h" #include "services/owncloud/network/owncloudnetworkfactory.h" +#include "services/owncloud/gui/formeditowncloudfeed.h" +#include "gui/dialogs/formmain.h" + +#include OwnCloudFeed::OwnCloudFeed(RootItem *parent) : Feed(parent) { @@ -37,6 +41,18 @@ OwnCloudFeed::OwnCloudFeed(const QSqlRecord &record) : Feed(NULL) { OwnCloudFeed::~OwnCloudFeed() { } +bool OwnCloudFeed::canBeEdited() const { + return true; +} + +bool OwnCloudFeed::editViaGui() { + QPointer form_pointer = new FormEditOwnCloudFeed(serviceRoot(), qApp->mainForm()); + + form_pointer.data()->execForEdit(this); + delete form_pointer.data(); + return false; +} + bool OwnCloudFeed::markAsReadUnread(RootItem::ReadStatus status) { QStringList ids = getParentServiceRoot()->customIDSOfMessagesForItem(this); QNetworkReply::NetworkError response = serviceRoot()->network()->markMessagesRead(status, ids); diff --git a/src/services/owncloud/owncloudfeed.h b/src/services/owncloud/owncloudfeed.h index 3ffbc585b..fd215095b 100755 --- a/src/services/owncloud/owncloudfeed.h +++ b/src/services/owncloud/owncloudfeed.h @@ -31,6 +31,9 @@ class OwnCloudFeed : public Feed { explicit OwnCloudFeed(const QSqlRecord &record); virtual ~OwnCloudFeed(); + bool canBeEdited() const; + bool editViaGui(); + bool markAsReadUnread(ReadStatus status); bool cleanMessages(bool clear_only_read);