forked from CPP-Final-Project/Chat_Client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatWDelegate.h
More file actions
29 lines (22 loc) · 756 Bytes
/
ChatWDelegate.h
File metadata and controls
29 lines (22 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include <QItemDelegate>
#include <QPen>
#include <QPainter>
#include "ChatItem.h"
#include "ChatWModel.h"
#include "Styles.h"
class ChatItem;
class ChatWDelegate final : public QItemDelegate //ma ze final
{
Q_OBJECT
public:
explicit ChatWDelegate(QObject* parent);
~ChatWDelegate() override;
ChatWDelegate(const ChatWDelegate&) = delete;
ChatWDelegate(ChatWDelegate&&) = delete;
const ChatWDelegate& operator =(const ChatWDelegate&) = delete;
ChatWDelegate& operator = (ChatWDelegate&&) = delete;
protected:
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
[[nodiscard]] QSize sizeHint(QStyleOptionViewItem const& option, QModelIndex const& index) const override;
};