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.
sdrgui
gui
transverterbutton.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 "
transverterdialog.h
"
23
#include "
transverterbutton.h
"
24
25
TransverterButton::TransverterButton
(QWidget* parent) :
26
QPushButton(parent),
27
m_deltaFrequency(0),
28
m_deltaFrequencyActive(false)
29
{
30
setObjectName(
"TransverterButton"
);
31
connect(
this
, SIGNAL(clicked()),
this
, SLOT(
onClicked
()));
32
}
33
34
void
TransverterButton::onClicked
()
35
{
36
TransverterDialog
transverterDialog(
m_deltaFrequency
,
m_deltaFrequencyActive
,
this
);
37
transverterDialog.exec();
38
updateState
();
39
}
40
41
void
TransverterButton::updateState
()
42
{
43
setToolTip(tr(
"Transverter frequency translation dialog. Delta frequency %1 MHz %2"
)
44
.
arg
(
m_deltaFrequency
/1000000.0)
45
.
arg
(
m_deltaFrequencyActive
?
"enabled"
:
"disabled"
));
46
47
if
(
m_deltaFrequencyActive
)
48
{
49
setStyleSheet(
"TransverterButton { background:rgb(128, 70, 0); }"
);
50
}
51
else
52
{
53
setStyleSheet(
"TransverterButton { background:rgb(48, 48, 48); }"
);
54
}
55
56
}
TransverterButton::updateState
void updateState()
Definition:
transverterbutton.cpp:41
TransverterButton::onClicked
void onClicked()
Definition:
transverterbutton.cpp:34
TransverterButton::m_deltaFrequencyActive
bool m_deltaFrequencyActive
Definition:
transverterbutton.h:54
arg
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition:
fixed.h:2401
TransverterDialog
Definition:
transverterdialog.h:33
transverterdialog.h
TransverterButton::TransverterButton
TransverterButton(QWidget *parent=0)
Definition:
transverterbutton.cpp:25
TransverterButton::m_deltaFrequency
qint64 m_deltaFrequency
Definition:
transverterbutton.h:53
transverterbutton.h
Generated on Fri Aug 2 2019 17:56:34 for SDRAngel by
1.8.13