File indexing completed on 2024-04-21 09:31:40

0001 /*
0002     SPDX-FileCopyrightText: 2011 Vishesh Yadav <vishesh3y@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef COMMITITEMDELEGATE_H
0008 #define COMMITITEMDELEGATE_H
0009 
0010 #include <QItemDelegate>
0011 
0012 /**
0013  * Custom Delegate to show Commit info in three lines
0014  *  - Revision:Changeset (branch)
0015  *  - Author
0016  *  - Commit Log | First Line
0017  */
0018 class CommitItemDelegate : public QItemDelegate
0019 {
0020     Q_OBJECT
0021 public:
0022     explicit CommitItemDelegate(QObject *parent = nullptr);
0023     void paint(QPainter *painter, const QStyleOptionViewItem &option,
0024                   const QModelIndex &index) const override;
0025     QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
0026 
0027 };
0028 
0029 #endif // COMMITITEMDELEGATE_H