LeechCraft Monocle 0.6.70-16373-g319c272718
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 public:
35 virtual ~ISaveableDocument () {}
36
41 {
45
52 QString Reason_;
53 };
54
63 virtual SaveQueryResult CanSave () const = 0;
64
74 virtual bool Save (const QString& path) = 0;
75 };
76}
77}
78
79Q_DECLARE_INTERFACE (LC::Monocle::ISaveableDocument,
80 "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 bool Save(const QString &path)=0
Saves the document at the given path.
virtual ~ISaveableDocument()
Virtual destructor.
Describes the result of check for the possibility of saving.
bool CanSave_
Whether the document can be saved.
QString Reason_
Human-readable reason string.