Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+33
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <LtsWidgets/lts_column_filter_proxy_model.h>
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QStyle>
|
||||
|
||||
|
||||
namespace LtsDataView
|
||||
{
|
||||
class TreeViewDelegate final : public QStyledItemDelegate // needed to tell the QLineEdit to be as compact as possible while editing
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using ComboBoxData = LtsWidgets::ComboboxFilterContent;
|
||||
using QStyledItemDelegate::QStyledItemDelegate;
|
||||
|
||||
void paint(QPainter *painter,
|
||||
const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
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;
|
||||
|
||||
static QString noFilterString() { return tr("<No filter>"); }
|
||||
private:
|
||||
static ComboBoxData comboBoxData(const QModelIndex &index);
|
||||
|
||||
private slots:
|
||||
void slotFinished();
|
||||
};
|
||||
} // namespace LtsDataView
|
||||
Reference in new issue
Block a user