2012-11-22 12:30:02 +00:00
|
|
|
#ifndef CSV_DOC_VIEW_H
|
|
|
|
#define CSV_DOC_VIEW_H
|
|
|
|
|
2012-11-22 13:49:58 +00:00
|
|
|
#include <QMainWindow>
|
|
|
|
|
|
|
|
class QAction;
|
2012-11-22 12:30:02 +00:00
|
|
|
|
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Document;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVDoc
|
|
|
|
{
|
2012-11-22 13:10:23 +00:00
|
|
|
class ViewManager;
|
|
|
|
|
2012-11-22 13:49:58 +00:00
|
|
|
class View : public QMainWindow
|
2012-11-22 12:30:02 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2012-11-22 13:10:23 +00:00
|
|
|
ViewManager& mViewManager;
|
2012-11-22 12:30:02 +00:00
|
|
|
CSMDoc::Document *mDocument;
|
2012-11-22 14:09:04 +00:00
|
|
|
int mViewIndex;
|
|
|
|
int mViewTotal;
|
2012-11-22 12:30:02 +00:00
|
|
|
|
|
|
|
// not implemented
|
|
|
|
View (const View&);
|
|
|
|
View& operator= (const View&);
|
|
|
|
|
2012-11-22 13:10:23 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
void closeEvent (QCloseEvent *event);
|
|
|
|
|
2012-11-22 14:54:31 +00:00
|
|
|
void setupEditMenu();
|
|
|
|
|
|
|
|
void setupViewMenu();
|
|
|
|
|
2012-11-22 13:49:58 +00:00
|
|
|
void setupUi();
|
|
|
|
|
2012-11-22 14:09:04 +00:00
|
|
|
void updateTitle();
|
|
|
|
|
2012-11-22 12:30:02 +00:00
|
|
|
public:
|
|
|
|
|
2012-11-22 14:09:04 +00:00
|
|
|
View (ViewManager& viewManager, CSMDoc::Document *document, int totalViews);
|
2012-11-22 12:30:02 +00:00
|
|
|
///< The ownership of \a document is not transferred to *this.
|
2012-11-22 13:10:23 +00:00
|
|
|
|
|
|
|
const CSMDoc::Document *getDocument() const;
|
|
|
|
|
|
|
|
CSMDoc::Document *getDocument();
|
2012-11-22 13:49:58 +00:00
|
|
|
|
2012-11-22 14:09:04 +00:00
|
|
|
void setIndex (int viewIndex, int totalViews);
|
|
|
|
|
2012-11-22 13:49:58 +00:00
|
|
|
private slots:
|
|
|
|
|
|
|
|
void newView();
|
2012-11-22 15:00:23 +00:00
|
|
|
|
|
|
|
void test();
|
2012-11-22 12:30:02 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|