aboutsummaryrefslogtreecommitdiff
path: root/include/completion/CompleterDelegate.hpp
blob: 8de22de5dd2832ada67a5673d142ea6e235dc4aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <QStyledItemDelegate>
#include <QWidget>
#include <QtCore/qabstractitemmodel.h>
#include <QtCore>
#include <cstdint>

class CompleterDelegate : public QStyledItemDelegate {
  Q_OBJECT

public:
  explicit CompleterDelegate(QObject *parent = nullptr);

  void paint(QPainter *painter, const QStyleOptionViewItem &option,
             const QModelIndex &index) const override;
  void setCurrentRow(uint32_t);
  uint32_t currentRow();

private:
  uint32_t row;
};