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