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