LeechCraft Monocle 0.6.70-17335-ge406ffdcaf
Modular document viewer for LeechCraft
Loading...
Searching...
No Matches
isaveabledocument.h
Go to the documentation of this file.
1/**********************************************************************
2 * LeechCraft - modular cross-platform feature rich internet client.
3 * Copyright (C) 2006-2014 Georg Rudoy
4 *
5 * Distributed under the Boost Software License, Version 1.0.
6 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7 **********************************************************************/
8
9#pragma once
10
11#include <QtPlugin>
12
13namespace LC
14{
15namespace Monocle
16{
31 {
32 protected:
33 virtual ~ISaveableDocument () = default;
34 public:
39 {
43
50 QString Reason_;
51 };
52
61 virtual SaveQueryResult CanSave () const = 0;
62
72 virtual bool Save (const QString& path) = 0;
73 };
74}
75}
76
77Q_DECLARE_INTERFACE (LC::Monocle::ISaveableDocument,
78 "org.LeechCraft.Monocle.ISaveableDocument/1.0")
Interface for documents that can be saved.
virtual SaveQueryResult CanSave() const =0
Checks whether this document can be saved.
virtual ~ISaveableDocument()=default
virtual bool Save(const QString &path)=0
Saves the document at the given path.
Describes the result of check for the possibility of saving.
bool CanSave_
Whether the document can be saved.
QString Reason_
Human-readable reason string.