Limo
A simple mod manager
Loading...
Searching...
No Matches
backupnamedelegate.h
Go to the documentation of this file.
1
5
6#pragma once
7
9#include <QStyledItemDelegate>
10
11
16{
17 Q_OBJECT
18public:
24 explicit BackupNameDelegate(ModListProxyModel* proxy, QObject* parent);
25
33 QWidget* createEditor(QWidget* parent,
34 const QStyleOptionViewItem& option,
35 const QModelIndex& index) const override;
41 void setEditorData(QWidget* editor, const QModelIndex& index) const override;
48 void setModelData(QWidget* editor,
49 QAbstractItemModel* model,
50 const QModelIndex& index) const override;
57 void updateEditorGeometry(QWidget* editor,
58 const QStyleOptionViewItem& option,
59 const QModelIndex& index) const override;
60
61signals:
67 void backupTargetNameChanged(int target_id, QString name) const;
68};
BackupNameDelegate(ModListProxyModel *proxy, QObject *parent)
Constructor.
Definition backupnamedelegate.cpp:6
void backupTargetNameChanged(int target_id, QString name) const
Signals that a mod name has been changed by the user.
void setEditorData(QWidget *editor, const QModelIndex &index) const override
Sets the line edits data to the name of the mod in the given row.
Definition backupnamedelegate.cpp:17
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
Emits backupTargetNameChanged with the new mod name.
Definition backupnamedelegate.cpp:24
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Updates the given line edits geometry.
Definition backupnamedelegate.cpp:31
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
Creates a QLineEdit object at the given index in the given view.
Definition backupnamedelegate.cpp:10
Used to sort or filter the mod list.
Definition modlistproxymodel.h:16
TableCellDelegate(QSortFilterProxyModel *proxy, QObject *parent)
Constructor.
Definition tablecelldelegate.cpp:7
Header for the TableCellDelegate class.