37 : QLabel(parent), incdec_position(2)
42 setTextFormat(Qt::RichText);
52 bool first_nonzero =
false;
53 for(num_digs = 0; num_digs < 6; num_digs++) {
56 if(num_digs == 3) ret =
" " + ret;
58 ret =
"<u>" + QString::number(dig) +
"</u>" + ret;
61 ret = QString::number(dig) + ret;
69 for(; num_digs < 11; num_digs++) {
73 if(((num_digs % 3) == 0) && (num_digs > 6)) {
77 ret =
"<u>" + QString::number(dig) +
"</u>" + ret;
80 ret = QString::number(dig) + ret;
84 while(ret.size() < 14) {
92 double freq = hzfreq * 1e-6;
96 double fr = freq - floor(freq);
103 QRect r = fontMetrics().boundingRect(flab);
115 unsigned long incr = 0;
116 if(event->button() == Qt::LeftButton) {
120 else if(py < (wh >> 1)) {
125 if(event->button() == Qt::RightButton) {
130 else if(px > (ww >> 1)) {
151 incdec_position -= 1;
void setFreq(double freq)
void mousePressEvent(QMouseEvent *event)
FreqLabel(QWidget *parent=Q_NULLPTR, Qt::WindowFlags f=Qt::WindowFlags())
void newFreq(double freq)