1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

88 lines
1.7 KiB
C++
Raw Normal View History

2012-11-22 13:30:02 +01:00
#ifndef CSV_DOC_VIEW_H
#define CSV_DOC_VIEW_H
#include <vector>
#include <QMainWindow>
class QAction;
2012-11-22 13:30:02 +01:00
namespace CSMDoc
{
class Document;
}
namespace CSVDoc
{
2012-11-22 14:10:23 +01:00
class ViewManager;
2012-11-23 12:20:35 +01:00
class Operations;
2012-11-22 14:10:23 +01:00
class View : public QMainWindow
2012-11-22 13:30:02 +01:00
{
Q_OBJECT
2012-11-22 14:10:23 +01:00
ViewManager& mViewManager;
2012-11-22 13:30:02 +01:00
CSMDoc::Document *mDocument;
2012-11-22 15:09:04 +01:00
int mViewIndex;
int mViewTotal;
QAction *mUndo;
QAction *mRedo;
QAction *mSave;
QAction *mVerify;
std::vector<QAction *> mEditingActions;
2012-11-23 12:20:35 +01:00
Operations *mOperations;
2012-11-22 13:30:02 +01:00
// not implemented
View (const View&);
View& operator= (const View&);
2012-11-22 14:10:23 +01:00
private:
void closeEvent (QCloseEvent *event);
void setupFileMenu();
2012-11-22 15:54:31 +01:00
void setupEditMenu();
void setupViewMenu();
void setupWorldMenu();
void setupUi();
2012-11-22 15:09:04 +01:00
void updateTitle();
void updateActions();
2012-11-22 13:30:02 +01:00
public:
2012-11-22 15:09:04 +01:00
View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews);
2012-11-22 13:30:02 +01:00
///< The ownership of \a document is not transferred to *this.
2012-11-22 14:10:23 +01:00
const CSMDoc::Document *getDocument() const;
CSMDoc::Document *getDocument();
2012-11-22 15:09:04 +01:00
void setIndex (int viewIndex, int totalViews);
void updateDocumentState();
2012-11-23 12:20:35 +01:00
void updateProgress (int current, int max, int type, int threads);
2012-11-23 10:25:34 +01:00
2012-11-23 14:05:49 +01:00
signals:
void newDocumentRequest();
private slots:
void newView();
2012-11-22 16:00:23 +01:00
void test();
void save();
void verify();
2012-11-22 13:30:02 +01:00
};
}
#endif