[an error occurred while processing this directive]
Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

hugin_qtbase/qtappbase/QADocument.qt.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00032 namespace QtAppBase {
00033 
00034 class QADocument : public QObject
00035 {
00036     Q_OBJECT
00037     
00038 public:
00039     QADocument(QADocumentController* parent = NULL);
00040     virtual ~QADocument() {}
00041         
00042 public:
00043     virtual openFile(QString filePath, QAFiletype fileType = QADefaultFiletype());
00044     virtual show();
00045     
00046 public:
00047     virtual QADocumentTemplate* documentTemplate() =0;
00048     
00049 public:
00050     void setDocumentController(QADocumentController* controller);
00051     QADocumentController* documentController();
00052 private:
00053     QADocumentController* m_documentController;
00054     
00055 public:
00056     virtual QString filePath() const;
00057     virtual void setFilePath(QString newPath);
00058     virtual bool fileName() const;
00059     virtual bool fileExsists() const;
00060 private:
00061     QFileInfo m_fileInfo;
00062 
00063 public:
00064     virtual QAFiletype filetype() const;
00065     virtual void setFileType(const QAFiletype& filetype);
00066 private:
00067     QAFiletype m_fileType;
00068     
00069 public:
00070     virtual QWidget* mainDocumentWindow() =0;
00071     
00072 public slots:
00073     virtual bool save();
00074     virtual bool saveAs();
00075     virtual bool revert();
00076     virtual bool askAndClose(bool cancellable = true);
00077 protected:
00078     virtual bool isModified();
00079     virtual bool saveToPath(QString path, QAFiletype filetype);
00080     virtual void reset() =0;
00081     virtual bool revertDocumentToFile(QString path);
00082     virtual void close();
00083     
00084 protected:
00085     virtual void signalDataChange();
00086 public signal:
00087     virtual void documentDataChanged();
00088     virtual void modifiedStatusChanged(bool becomeModified);
00089     virtual void filepathChanged();
00090     virtual void filepathChangedTo(const QString& newPath);
00091 
00092 public:
00093     virtual AppBase::DocumentData* documentData() =0;
00094     virtual QAUndoStack* undoStack();
00095 private:
00096     QAUndoStack m_undoStack;
00097 };
00098 
00099 } //namespace

Generated on Mon Sep 20 01:01:27 2010 for Hugintrunk by doxygen 1.3.9.1