File indexing completed on 2024-05-12 16:43:54
0001 /* 0002 SPDX-FileCopyrightText: 2014 Christian Dávid <christian-david@web.de> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef PAYEEIDENTIFIERSELECTIONDELEGATE_H 0007 #define PAYEEIDENTIFIERSELECTIONDELEGATE_H 0008 0009 #include <QStyledItemDelegate> 0010 #include <QComboBox> 0011 0012 class payeeIdentifierSelectionDelegate : public QStyledItemDelegate 0013 { 0014 Q_OBJECT 0015 0016 public: 0017 explicit payeeIdentifierSelectionDelegate(QObject* parent = 0); 0018 QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const final override; 0019 void setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const final override; 0020 void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const final override; 0021 QSize sizeHint(const QStyleOptionViewItem& option, const QModelIndex& index) const final override; 0022 }; 0023 0024 class payeeIdentifierTypeSelectionWidget : public QComboBox 0025 { 0026 Q_OBJECT 0027 public: 0028 explicit payeeIdentifierTypeSelectionWidget(QWidget* parent = 0); 0029 0030 Q_SIGNALS: 0031 void commitData(QWidget* editor); 0032 0033 private Q_SLOTS: 0034 void itemSelected(int index); 0035 }; 0036 0037 #endif // PAYEEIDENTIFIERSELECTIONDELEGATE_H