1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 18:15:45 -05:00

Use common delegate

This commit is contained in:
Jon Beniston 2022-03-01 17:19:53 +00:00
parent 5a14126549
commit cd2873dde8

View File

@ -33,6 +33,7 @@
#include "gui/basicchannelsettingsdialog.h"
#include "gui/devicestreamselectiondialog.h"
#include "gui/crightclickenabler.h"
#include "gui/decimaldelegate.h"
#include "maincore.h"
#include "noisefigure.h"
@ -40,26 +41,6 @@
#include "noisefigurecontroldialog.h"
#include "noisefigureenrdialog.h"
// Deligate for table to control precision used to display floating point values
class DecimalDelegate : public QStyledItemDelegate {
public:
DecimalDelegate(int precision = 2) :
m_precision(precision)
{
}
virtual QString displayText(const QVariant &value, const QLocale &locale) const override
{
(void) locale;
return QString::number(value.toDouble(), 'f', m_precision);
}
private:
int m_precision;
};
void NoiseFigureGUI::resizeTable()
{
// Fill table with a row of dummy data that will size the columns nicely