SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
externalclockdialog.cpp
Go to the documentation of this file.
1 // Copyright (C) 2017 F4EXB //
3 // written by Edouard Griffiths //
4 // //
5 // OpenGL interface modernization. //
6 // See: http://doc.qt.io/qt-5/qopenglshaderprogram.html //
7 // //
8 // This program is free software; you can redistribute it and/or modify //
9 // it under the terms of the GNU General Public License as published by //
10 // the Free Software Foundation as version 3 of the License, or //
11 // (at your option) any later version. //
12 // //
13 // This program is distributed in the hope that it will be useful, //
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
16 // GNU General Public License V3 for more details. //
17 // //
18 // You should have received a copy of the GNU General Public License //
19 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
21 
22 #include "externalclockdialog.h"
23 #include "ui_externalclockdialog.h"
24 
25 
26 ExternalClockDialog::ExternalClockDialog(qint64& externalClockFrequency, bool& externalClockFrequencyActive, QWidget* parent) :
27  QDialog(parent),
28  ui(new Ui::ExternalClockDialog),
29  m_externalClockFrequency(externalClockFrequency),
30  m_externalClockFrequencyActive(externalClockFrequencyActive)
31 {
32  ui->setupUi(this);
33  ui->externalClockFrequencyLabel->setText("f");
34  ui->externalClockFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
35  ui->externalClockFrequency->setValueRange(true, 9, 5000000L, 300000000L);
36  ui->externalClockFrequency->setValue(externalClockFrequency);
37  ui->externalClockFrequencyActive->setChecked(externalClockFrequencyActive);
38 }
39 
41 {
42  delete ui;
43 }
44 
46 {
47  m_externalClockFrequency = ui->externalClockFrequency->getValueNew();
48  m_externalClockFrequencyActive = ui->externalClockFrequencyActive->isChecked();
49  QDialog::accept();
50 }
ExternalClockDialog(qint64 &externalClockFrequency, bool &externalClockFrequencyActive, QWidget *parent=0)
Ui::ExternalClockDialog * ui