initial edit dialog oc.

This commit is contained in:
Martin Rotter 2016-04-03 21:24:11 +02:00
parent 144f5beda2
commit ee9edebd29
2 changed files with 20 additions and 1 deletions

View File

@ -15,11 +15,15 @@
// You should have received a copy of the GNU General Public License
// along with RSS Guard. If not, see <http://www.gnu.org/licenses/>.
#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 <QPointer>
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<FormEditOwnCloudFeed> 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);

View File

@ -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);