1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
/*
* The TaskJuggler Project Management Software
*
* Copyright (c) 2001, 2002, 2003, 2004, 2005 by Chris Schlaeger <cs@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* $Id: ManagedFileInfo.h 1312 2006-07-22 14:28:45Z cs $
*/
#ifndef _ManagedFileInfo_h_
#define _ManagedFileInfo_h_
#include <qobject.h>
#include <kate/view.h>
#include <kate/document.h>
#include <kurl.h>
class KConfig;
class KListViewItem;
class FileManager;
class ManagedFileInfo : public QObject
{
Q_OBJECT
public:
ManagedFileInfo(FileManager* fm, const KURL& url);
~ManagedFileInfo();
void readProperties(KConfig* config);
void writeProperties(KConfig* config);
const KURL& getFileURL() const;
const QString getUniqueName() const;
bool isModified() { return modified; }
void setPartOfProject(bool p) { partOfProject = p; }
bool isPartOfProject() const { return partOfProject; }
void setEditor(KTextEditor::View* e);
KTextEditor::View* getEditor() const { return editor; }
void setBrowserEntry(KListViewItem* lvi) { browserEntry = lvi; }
KListViewItem* getBrowserEntry() const { return browserEntry; }
QString getWordUnderCursor() const;
void save(bool ask);
void saveAs(const KURL& url);
public slots:
void setModified();
void setModifiedOnDisc(Kate::Document*, bool modified,
unsigned char reason);
private slots:
void fileSaved();
private:
ManagedFileInfo() { }
FileManager* manager;
KURL fileURL;
bool partOfProject;
bool modified;
KListViewItem* browserEntry;
KTextEditor::View* editor;
} ;
#endif
|