mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-05 15:34:57 -04:00
Freq Scanner: Add per-frequency settings. Fix freq > 2GHz.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <QLineEdit>
|
||||
|
||||
#include "frequencydelegate.h"
|
||||
#include "int64validator.h"
|
||||
|
||||
FrequencyDelegate::FrequencyDelegate(const QString& units, int precision, bool group) :
|
||||
m_units(units),
|
||||
@@ -112,13 +113,14 @@ QString FrequencyDelegate::displayText(const QVariant &value, const QLocale &loc
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QWidget* FrequencyDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option, const QModelIndex& index) const
|
||||
{
|
||||
(void) option;
|
||||
(void) index;
|
||||
|
||||
QLineEdit* editor = new QLineEdit(parent);
|
||||
QIntValidator* validator = new QIntValidator();
|
||||
Int64Validator* validator = new Int64Validator();
|
||||
validator->setBottom(0);
|
||||
editor->setValidator(validator);
|
||||
return editor;
|
||||
|
||||
Reference in New Issue
Block a user