1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-24 23:53:52 +00:00
openmw/apps/opencs/view/doc/subview.hpp

68 lines
1.4 KiB
C++
Raw Normal View History

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
{
2022-09-22 18:26:05 +00:00
Q_OBJECT
2012-12-11 12:22:43 +00:00
2022-09-22 18:26:05 +00:00
CSMWorld::UniversalId mUniversalId;
2012-12-11 12:22:43 +00:00
2022-09-22 18:26:05 +00:00
// not implemented
SubView(const SubView&);
SubView& operator=(SubView&);
2022-09-22 18:26:05 +00:00
protected:
void setUniversalId(const CSMWorld::UniversalId& id);
2022-09-22 18:26:05 +00:00
bool event(QEvent* event) override;
2012-12-11 12:22:43 +00:00
2022-09-22 18:26:05 +00:00
public:
SubView(const CSMWorld::UniversalId& id);
2022-09-22 18:26:05 +00:00
CSMWorld::UniversalId getUniversalId() const;
2012-12-11 12:22:43 +00:00
2022-09-22 18:26:05 +00:00
virtual void setEditLock(bool locked) = 0;
2012-12-11 12:22:43 +00:00
2022-09-22 18:26:05 +00:00
virtual void setStatusBar(bool show);
///< Default implementation: ignored
2012-12-11 12:22:43 +00:00
2022-09-22 18:26:05 +00:00
virtual void useHint(const std::string& hint);
///< Default implementation: ignored
2022-09-22 18:26:05 +00:00
virtual std::string getTitle() const;
2013-07-25 12:29:56 +00:00
2022-09-22 18:26:05 +00:00
private:
void closeEvent(QCloseEvent* event) override;
2022-09-22 18:26:05 +00:00
signals:
2022-09-22 18:26:05 +00:00
void focusId(const CSMWorld::UniversalId& universalId, const std::string& hint);
2022-09-22 18:26:05 +00:00
void closeRequest(SubView* subView);
2022-09-22 18:26:05 +00:00
void updateTitle();
2022-09-22 18:26:05 +00:00
void updateSubViewIndices(SubView* view = nullptr);
2022-09-22 18:26:05 +00:00
void universalIdChanged(const CSMWorld::UniversalId& universalId);
2022-09-22 18:26:05 +00:00
protected slots:
2022-09-22 18:26:05 +00:00
void closeRequest();
2012-12-11 12:22:43 +00:00
};
}
#endif