#ifndef CSV_DOC_VIEW_H #define CSV_DOC_VIEW_H #include #include class QAction; namespace CSMDoc { class Document; } namespace CSVDoc { class ViewManager; class Operations; class View : public QMainWindow { Q_OBJECT ViewManager& mViewManager; CSMDoc::Document *mDocument; int mViewIndex; int mViewTotal; QAction *mUndo; QAction *mRedo; QAction *mSave; std::vector mEditingActions; Operations *mOperations; // not implemented View (const View&); View& operator= (const View&); private: void closeEvent (QCloseEvent *event); void setupFileMenu(); void setupEditMenu(); void setupViewMenu(); void setupUi(); void updateTitle(); void updateActions(); public: View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews); ///< The ownership of \a document is not transferred to *this. const CSMDoc::Document *getDocument() const; CSMDoc::Document *getDocument(); void setIndex (int viewIndex, int totalViews); void updateDocumentState(); void updateProgress (int current, int max, int type, int threads); private slots: void newView(); void test(); void save(); }; } #endif