LeechCraft Monocle  0.6.70-16373-g319c272718
Modular document viewer for LeechCraft
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 
13 namespace LC
14 {
15 namespace Monocle
16 {
31  {
32  public:
35  virtual ~ISaveableDocument () {}
36 
41  {
44  bool CanSave_;
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 
79 Q_DECLARE_INTERFACE (LC::Monocle::ISaveableDocument,
80  "org.LeechCraft.Monocle.ISaveableDocument/1.0")
Interface for documents that can be saved.
QString Reason_
Human-readable reason string.
bool CanSave_
Whether the document can be saved.
Describes the result of check for the possibility of saving.
virtual ~ISaveableDocument()
Virtual destructor.
virtual bool Save(const QString &path)=0
Saves the document at the given path.
virtual SaveQueryResult CanSave() const =0
Checks whether this document can be saved.
Definition: iannotation.h:20