1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-23 03:53:53 +00:00
openmw/apps/opencs/view/world/idcompletiondelegate.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.2 KiB
C++
Raw Normal View History

#ifndef CSV_WORLD_IDCOMPLETIONDELEGATE_HPP
#define CSV_WORLD_IDCOMPLETIONDELEGATE_HPP
2015-05-30 12:51:33 +00:00
#include "util.hpp"
2022-10-19 17:02:00 +00:00
#include <apps/opencs/model/world/columnbase.hpp>
class QModelIndex;
class QObject;
class QWidget;
namespace CSMDoc
{
class Document;
}
namespace CSMWorld
{
class CommandDispatcher;
}
2015-05-30 12:51:33 +00:00
namespace CSVWorld
{
/// \brief Enables the Id completion for a column
class IdCompletionDelegate : public CommandDelegate
{
public:
IdCompletionDelegate(CSMWorld::CommandDispatcher* dispatcher, CSMDoc::Document& document, QObject* parent);
QWidget* createEditor(
QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
2015-05-30 12:51:33 +00:00
QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index,
CSMWorld::ColumnBase::Display display) const override;
2015-05-30 12:51:33 +00:00
};
class IdCompletionDelegateFactory : public CommandDelegateFactory
{
public:
CommandDelegate* makeDelegate(
CSMWorld::CommandDispatcher* dispatcher, CSMDoc::Document& document, QObject* parent) const override;
2015-05-30 12:51:33 +00:00
///< The ownership of the returned CommandDelegate is transferred to the caller.
};
}
#endif