1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00
vcmi/mapeditor/inspector/messagewidget.h

45 lines
987 B
C++
Raw Normal View History

2022-10-08 22:32:02 +02:00
/*
* messagewidget.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
2022-10-16 13:37:01 +02:00
#include "../StdInc.h"
2022-09-18 01:23:17 +02:00
#include <QDialog>
namespace Ui {
class MessageWidget;
}
class MessageWidget : public QDialog
{
Q_OBJECT
public:
explicit MessageWidget(QWidget *parent = nullptr);
~MessageWidget();
void setMessage(const QString &);
QString getMessage() const;
private:
Ui::MessageWidget *ui;
};
class MessageDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
using QStyledItemDelegate::QStyledItemDelegate;
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
};