Skip to content

Commit

Permalink
complete clang-format, no content change
Browse files Browse the repository at this point in the history
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
  • Loading branch information
Ho-Ro committed Apr 19, 2020
1 parent 52c9236 commit f1b0ab8
Show file tree
Hide file tree
Showing 129 changed files with 6,511 additions and 6,302 deletions.
14 changes: 7 additions & 7 deletions openhantek/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
Expand Down Expand Up @@ -64,7 +64,7 @@ JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
Expand All @@ -86,8 +86,8 @@ SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInParentheses: true
SpacesInSquareBrackets: true
Standard: Cpp11
TabWidth: 8
UseTab: Never
Expand Down
2 changes: 1 addition & 1 deletion openhantek/src/OH_BUILD.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Do not edit, will be re-created at each commit!
#define OH_BUILD "20200414 build 642"
#define OH_BUILD "20200419 build 644"
20 changes: 10 additions & 10 deletions openhantek/src/OH_VERSION.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#define OH_VERSION "3.0.4b"


# ifdef OH_VERSION
# undef VERSION
# define VERSION OH_VERSION
# else
# include "OH_BUILD.h"
# ifdef OH_BUILD
# undef VERSION
# define VERSION OH_BUILD
# endif
# endif
#ifdef OH_VERSION
#undef VERSION
#define VERSION OH_VERSION
#else
#include "OH_BUILD.h"
#ifdef OH_BUILD
#undef VERSION
#define VERSION OH_BUILD
#endif
#endif
74 changes: 38 additions & 36 deletions openhantek/src/configdialog/DsoConfigAnalysisPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,66 @@

#include "DsoConfigAnalysisPage.h"

DsoConfigAnalysisPage::DsoConfigAnalysisPage(DsoSettings *settings, QWidget *parent)
: QWidget(parent), settings(settings) {
DsoConfigAnalysisPage::DsoConfigAnalysisPage( DsoSettings *settings, QWidget *parent )
: QWidget( parent ), settings( settings ) {
// Initialize lists for comboboxes
QStringList windowFunctionStrings;
windowFunctionStrings << tr("Rectangular") << tr("Hamming") << tr("Hann") << tr("Cosine") << tr("Lanczos")
<< tr("Bartlett") << tr("Triangular") << tr("Gauss") << tr("Bartlett-Hann") << tr("Blackman")
windowFunctionStrings << tr( "Rectangular" ) << tr( "Hamming" ) << tr( "Hann" ) << tr( "Cosine" ) << tr( "Lanczos" )
<< tr( "Bartlett" ) << tr( "Triangular" ) << tr( "Gauss" ) << tr( "Bartlett-Hann" )
<< tr( "Blackman" )
//<< tr("Kaiser")
<< tr("Nuttall") << tr("Blackman-Harris") << tr("Blackman-Nuttall") << tr("Flat top");
<< tr( "Nuttall" ) << tr( "Blackman-Harris" ) << tr( "Blackman-Nuttall" ) << tr( "Flat top" );

// Initialize elements
windowFunctionLabel = new QLabel(tr("<b>Window function</b>"));
windowFunctionLabel = new QLabel( tr( "<b>Window function</b>" ) );
windowFunctionComboBox = new QComboBox();
windowFunctionComboBox->addItems(windowFunctionStrings);
windowFunctionComboBox->setCurrentIndex(int(settings->post.spectrumWindow));
windowFunctionComboBox->addItems( windowFunctionStrings );
windowFunctionComboBox->setCurrentIndex( int( settings->post.spectrumWindow ) );

referenceLevelLabel = new QLabel(tr("<b>Reference level</b><br/>0 dBu = -2.2 dBV<br/>0 dBm (@600 &Omega;) = -2.2 dBV<br/>0 dBm (@50 &Omega;) = -13 dBV"));
referenceLevelLabel = new QLabel( tr( "<b>Reference level</b><br/>0 dBu = -2.2 dBV<br/>0 dBm (@600 &Omega;) = -2.2 "
"dBV<br/>0 dBm (@50 &Omega;) = -13 dBV" ) );
referenceLevelSpinBox = new QDoubleSpinBox();
referenceLevelSpinBox->setDecimals(1);
referenceLevelSpinBox->setMinimum(-100.0);
referenceLevelSpinBox->setMaximum(100.0);
referenceLevelSpinBox->setValue(settings->post.spectrumReference);
referenceLevelUnitLabel = new QLabel(tr("dBV"));
referenceLevelSpinBox->setDecimals( 1 );
referenceLevelSpinBox->setMinimum( -100.0 );
referenceLevelSpinBox->setMaximum( 100.0 );
referenceLevelSpinBox->setValue( settings->post.spectrumReference );
referenceLevelUnitLabel = new QLabel( tr( "dBV" ) );
referenceLevelLayout = new QHBoxLayout();
referenceLevelLayout->addWidget(referenceLevelSpinBox);
referenceLevelLayout->addWidget(referenceLevelUnitLabel);
referenceLevelLayout->addWidget( referenceLevelSpinBox );
referenceLevelLayout->addWidget( referenceLevelUnitLabel );

minimumMagnitudeLabel = new QLabel(tr("<b>Minimum magnitude</b>"));
minimumMagnitudeLabel = new QLabel( tr( "<b>Minimum magnitude</b>" ) );
minimumMagnitudeSpinBox = new QDoubleSpinBox();
minimumMagnitudeSpinBox->setDecimals(1);
minimumMagnitudeSpinBox->setMinimum(-100.0);
minimumMagnitudeSpinBox->setMaximum(100.0);
minimumMagnitudeSpinBox->setValue(settings->post.spectrumLimit);
minimumMagnitudeUnitLabel = new QLabel(tr("dBV"));
minimumMagnitudeSpinBox->setDecimals( 1 );
minimumMagnitudeSpinBox->setMinimum( -100.0 );
minimumMagnitudeSpinBox->setMaximum( 100.0 );
minimumMagnitudeSpinBox->setValue( settings->post.spectrumLimit );
minimumMagnitudeUnitLabel = new QLabel( tr( "dBV" ) );
minimumMagnitudeLayout = new QHBoxLayout();
minimumMagnitudeLayout->addWidget(minimumMagnitudeSpinBox);
minimumMagnitudeLayout->addWidget(minimumMagnitudeUnitLabel);
minimumMagnitudeLayout->addWidget( minimumMagnitudeSpinBox );
minimumMagnitudeLayout->addWidget( minimumMagnitudeUnitLabel );

spectrumLayout = new QGridLayout();
spectrumLayout->addWidget(windowFunctionLabel, 0, 0);
spectrumLayout->addWidget(windowFunctionComboBox, 0, 1);
spectrumLayout->addWidget(referenceLevelLabel, 1, 0);
spectrumLayout->addLayout(referenceLevelLayout, 1, 1);
spectrumLayout->addWidget(minimumMagnitudeLabel, 2, 0);
spectrumLayout->addLayout(minimumMagnitudeLayout, 2, 1);
spectrumLayout->addWidget( windowFunctionLabel, 0, 0 );
spectrumLayout->addWidget( windowFunctionComboBox, 0, 1 );
spectrumLayout->addWidget( referenceLevelLabel, 1, 0 );
spectrumLayout->addLayout( referenceLevelLayout, 1, 1 );
spectrumLayout->addWidget( minimumMagnitudeLabel, 2, 0 );
spectrumLayout->addLayout( minimumMagnitudeLayout, 2, 1 );

spectrumGroup = new QGroupBox(tr("Spectrum"));
spectrumGroup->setLayout(spectrumLayout);
spectrumGroup = new QGroupBox( tr( "Spectrum" ) );
spectrumGroup->setLayout( spectrumLayout );

mainLayout = new QVBoxLayout();
mainLayout->addWidget(spectrumGroup);
mainLayout->addStretch(1);
mainLayout->addWidget( spectrumGroup );
mainLayout->addStretch( 1 );

setLayout(mainLayout);
setLayout( mainLayout );
}

/// \brief Saves the new settings.
void DsoConfigAnalysisPage::saveSettings() {
settings->post.spectrumWindow = Dso::WindowFunction(windowFunctionComboBox->currentIndex());
settings->post.spectrumWindow = Dso::WindowFunction( windowFunctionComboBox->currentIndex() );
settings->post.spectrumReference = referenceLevelSpinBox->value();
settings->post.spectrumLimit = minimumMagnitudeSpinBox->value();
}
2 changes: 1 addition & 1 deletion openhantek/src/configdialog/DsoConfigAnalysisPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class DsoConfigAnalysisPage : public QWidget {
Q_OBJECT

public:
DsoConfigAnalysisPage(DsoSettings *settings, QWidget *parent = nullptr);
DsoConfigAnalysisPage( DsoSettings *settings, QWidget *parent = nullptr );

public slots:
void saveSettings();
Expand Down
Loading

0 comments on commit f1b0ab8

Please sign in to comment.