diff options
| author | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-04-07 19:02:45 +0200 |
| commit | f647d78463c1250ce9c99af664615fafccf5e959 (patch) | |
| tree | 5b00428cef68aef1c9d407e2d4535687422419b6 /item_delegates/CallsignDelegate.hpp | |
| parent | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (diff) | |
New upstream version 3.0.0upstream/3.0.0
Diffstat (limited to 'item_delegates/CallsignDelegate.hpp')
| -rw-r--r--[-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 aeecc520..b5bdce1c 100755..100644 --- 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 |
