2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 2.1.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Author: Juhapekka Piiroinen <juhapekka.piiroinen@canonical.com>
19
#ifndef UBUNTUPROJECTFILE_H
20
#define UBUNTUPROJECTFILE_H
23
#include "ubuntuconstants.h"
24
#include "ubuntuproject.h"
25
#include "ubuntuprojectmanager.h"
27
#include <coreplugin/idocument.h>
29
#include <utils/qtcassert.h>
30
#include <coreplugin/actionmanager/command.h>
31
#include <coreplugin/actionmanager/actioncontainer.h>
32
#include <coreplugin/actionmanager/actionmanager.h>
33
#include <coreplugin/coreconstants.h>
34
#include <coreplugin/icontext.h>
35
#include <coreplugin/mimedatabase.h>
36
#include <coreplugin/messagemanager.h>
37
#include <coreplugin/icore.h>
38
#include <coreplugin/idocument.h>
39
#include <coreplugin/documentmanager.h>
43
class UbuntuProjectFile : public Core::IDocument
47
UbuntuProjectFile(UbuntuProject *parent, QString fileName);
48
~UbuntuProjectFile() {}
50
bool save(QString *errorString, const QString &fileName, bool autoSave);
51
QString fileName() const;
52
void rename(const QString &newName);
54
QString defaultPath() const;
55
QString suggestedFileName() const;
56
QString mimeType() const;
58
bool isModified() const;
59
bool isSaveAsAllowed() const;
61
ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const;
62
bool reload(QString *errorString, ReloadFlag flag, ChangeType);
65
UbuntuProject *m_project;
72
#endif // UBUNTUPROJECTFILE_H