2012-12-11 13:22:43 +01:00
|
|
|
#ifndef CSV_DOC_SUBVIEW_H
|
|
|
|
#define CSV_DOC_SUBVIEW_H
|
|
|
|
|
|
|
|
#include "../../model/doc/document.hpp"
|
|
|
|
|
|
|
|
#include "../../model/world/universalid.hpp"
|
|
|
|
|
|
|
|
#include "subviewfactory.hpp"
|
|
|
|
|
|
|
|
#include <QDockWidget>
|
|
|
|
|
|
|
|
class QUndoStack;
|
|
|
|
|
|
|
|
namespace CSMWorld
|
|
|
|
{
|
|
|
|
class Data;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace CSVDoc
|
|
|
|
{
|
2014-09-23 17:01:08 +10:00
|
|
|
class View;
|
|
|
|
|
2012-12-11 13:22:43 +01:00
|
|
|
class SubView : public QDockWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
CSMWorld::UniversalId mUniversalId;
|
|
|
|
|
|
|
|
// not implemented
|
|
|
|
SubView (const SubView&);
|
|
|
|
SubView& operator= (SubView&);
|
2014-10-27 09:51:55 +01:00
|
|
|
|
2014-03-12 13:04:40 +01:00
|
|
|
protected:
|
2014-10-27 09:51:55 +01:00
|
|
|
|
2014-03-12 13:04:40 +01:00
|
|
|
void setUniversalId(const CSMWorld::UniversalId& id);
|
2012-12-11 13:22:43 +01:00
|
|
|
|
2015-05-17 14:31:53 +02:00
|
|
|
bool event (QEvent *event);
|
|
|
|
|
2012-12-11 13:22:43 +01:00
|
|
|
public:
|
|
|
|
|
|
|
|
SubView (const CSMWorld::UniversalId& id);
|
|
|
|
|
|
|
|
CSMWorld::UniversalId getUniversalId() const;
|
|
|
|
|
|
|
|
virtual void setEditLock (bool locked) = 0;
|
2014-04-22 22:19:53 -05:00
|
|
|
|
2013-07-25 14:29:56 +02:00
|
|
|
virtual void setStatusBar (bool show);
|
|
|
|
///< Default implementation: ignored
|
|
|
|
|
2014-03-02 13:29:02 +01:00
|
|
|
virtual void useHint (const std::string& hint);
|
|
|
|
///< Default implementation: ignored
|
|
|
|
|
2014-10-27 08:57:18 +01:00
|
|
|
virtual std::string getTitle() const;
|
|
|
|
|
2014-09-23 17:01:08 +10:00
|
|
|
private:
|
|
|
|
|
|
|
|
void closeEvent (QCloseEvent *event);
|
|
|
|
|
2012-12-12 22:36:20 +01:00
|
|
|
signals:
|
|
|
|
|
2014-03-02 22:34:41 +01:00
|
|
|
void focusId (const CSMWorld::UniversalId& universalId, const std::string& hint);
|
2014-04-23 17:02:37 -05:00
|
|
|
|
2014-10-25 18:13:56 +02:00
|
|
|
void closeRequest (SubView *subView);
|
|
|
|
|
2014-10-27 08:57:18 +01:00
|
|
|
void updateTitle();
|
|
|
|
|
2018-10-09 10:21:12 +04:00
|
|
|
void updateSubViewIndices (SubView *view = nullptr);
|
2014-10-27 09:51:55 +01:00
|
|
|
|
2015-06-27 13:47:07 +02:00
|
|
|
void universalIdChanged (const CSMWorld::UniversalId& universalId);
|
|
|
|
|
2014-10-25 18:13:56 +02:00
|
|
|
protected slots:
|
|
|
|
|
|
|
|
void closeRequest();
|
2012-12-11 13:22:43 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2013-06-15 06:40:18 -05:00
|
|
|
#endif
|