diff options
| author | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
|---|---|---|
| committer | Christoph Berg <christoph.berg@credativ.de> | 2022-08-23 10:23:16 +0200 |
| commit | 2d1068e60bce7ae1fff11623454900e8cee956b1 (patch) | |
| tree | acebe276e30466ef0ab91bc3da5e379bec0d7dc5 /item_delegates/CallsignDelegate.hpp | |
| parent | 43bebfbad6e7ba026bd3d55720c7d9e12a7ef8ef (diff) | |
New upstream version 2.6.0~rc3+repackupstream/2.6.0_rc3+repack
Diffstat (limited to 'item_delegates/CallsignDelegate.hpp')
| -rwxr-xr-x | item_delegates/CallsignDelegate.hpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/item_delegates/CallsignDelegate.hpp b/item_delegates/CallsignDelegate.hpp index b5bdce1c..aeecc520 100755 --- a/item_delegates/CallsignDelegate.hpp +++ b/item_delegates/CallsignDelegate.hpp @@ -1,30 +1,30 @@ -#ifndef CALLSIGN_DELEGATE_HPP_ -#define CALLSIGN_DELEGATE_HPP_ - -#include <QStyledItemDelegate> - -class QValidator; - -// -// Class CallsignDelegate -// -// Item delegate for editing a callsign -// -class CallsignDelegate final - : public QStyledItemDelegate -{ -public: - explicit CallsignDelegate (QObject * parent = nullptr); - QWidget * createEditor (QWidget * parent, QStyleOptionViewItem const&, QModelIndex const&) const override; - void setEditorData (QWidget * editor, QModelIndex const&) const override; - void setModelData (QWidget * editor, QAbstractItemModel *, QModelIndex const&) const override; - void updateEditorGeometry (QWidget * editor, QStyleOptionViewItem const& option, QModelIndex const&) const override - { - editor->setGeometry (option.rect); - } - -private: - QScopedPointer<QValidator> validator_; -}; - -#endif +#ifndef CALLSIGN_DELEGATE_HPP_
+#define CALLSIGN_DELEGATE_HPP_
+
+#include <QStyledItemDelegate>
+
+class QValidator;
+
+//
+// Class CallsignDelegate
+//
+// Item delegate for editing a callsign
+//
+class CallsignDelegate final
+ : public QStyledItemDelegate
+{
+public:
+ explicit CallsignDelegate (QObject * parent = nullptr);
+ QWidget * createEditor (QWidget * parent, QStyleOptionViewItem const&, QModelIndex const&) const override;
+ void setEditorData (QWidget * editor, QModelIndex const&) const override;
+ void setModelData (QWidget * editor, QAbstractItemModel *, QModelIndex const&) const override;
+ void updateEditorGeometry (QWidget * editor, QStyleOptionViewItem const& option, QModelIndex const&) const override
+ {
+ editor->setGeometry (option.rect);
+ }
+
+private:
+ QScopedPointer<QValidator> validator_;
+};
+
+#endif
|
