mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-01 08:07:10 -04:00
cb27e2c4b0
All message entry fields on the mainscreen and in the macro editing facilities are now restricted to valid characters in the JT65/JT9 free text message alphabet. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4362 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
#ifndef FREQUENCY_ITEM_DELEGATE_HPP_
|
|
#define FREQUENCY_ITEM_DELEGATE_HPP_
|
|
|
|
#include <QStyledItemDelegate>
|
|
|
|
class Bands;
|
|
|
|
//
|
|
// Class FrequencyItemDelegate
|
|
//
|
|
// Item delegate for displaying and editing a Frequency item in a
|
|
// view that uses a FrequencyLineEdit as an item delegate for the
|
|
// edit role.
|
|
//
|
|
class FrequencyItemDelegate final
|
|
: public QStyledItemDelegate
|
|
{
|
|
public:
|
|
explicit FrequencyItemDelegate (Bands const * bands, QObject * parent = nullptr)
|
|
: QStyledItemDelegate {parent}
|
|
, bands_ {bands}
|
|
{
|
|
}
|
|
|
|
QString displayText (QVariant const& value, QLocale const&) const override;
|
|
QWidget * createEditor (QWidget * parent, QStyleOptionViewItem const&, QModelIndex const&) const override;
|
|
|
|
private:
|
|
Bands const * bands_;
|
|
};
|
|
|
|
|
|
//
|
|
// Class FrequencyDeltaItemDelegate
|
|
//
|
|
// Item delegate for displaying and editing a FrequencyDelta item
|
|
// in a view that uses a FrequencyDeltaLineEdit as an item
|
|
// delegate for the edit role.
|
|
//
|
|
class FrequencyDeltaItemDelegate final
|
|
: public QStyledItemDelegate
|
|
{
|
|
public:
|
|
explicit FrequencyDeltaItemDelegate (QObject * parent = nullptr)
|
|
: QStyledItemDelegate {parent}
|
|
{
|
|
}
|
|
|
|
QString displayText (QVariant const& value, QLocale const&) const override;
|
|
QWidget * createEditor (QWidget * parent, QStyleOptionViewItem const&, QModelIndex const&) const override;
|
|
};
|
|
|
|
#endif
|