style: unify identifier naming per updated conventions
Automated with clang-tidy readability-identifier-naming (config added to .clang-tidy) plus scripted passes, per the updated rules now documented in CONTRIBUTING.md: - types (class/struct/enum/alias/template params): PascalCase - functions, variables, members: snake_case (incl. rational -> Rational) - private/protected members: trailing underscore; static member variables likewise (instance_, available_themes_) - constants and enum values: snake_case (kLinear -> k_linear, F32P -> f32p); ALL_CAPS reserved for macros - macros: OAK_ prefix (OLIVE_ADD_TEST/OLIVE_ASSERT/OLIVE_CONFIG -> OAK_ADD_TEST/OAK_ASSERT/OAK_CONFIG, GL_PREAMBLE -> OAK_GL_PREAMBLE, include guards -> OAK_*) - file names: all lowercase (Current/Plugin/OliveHost/OliveClip/ OlivePluginInstance -> current/plugin/olivehost/oliveclip/ oliveplugininstance) - getters share the member name sans underscore, setters set_foo() - Qt and third-party (OpenFX) virtual overrides and framework callbacks keep their original names (exempt in .clang-tidy) Manual follow-ups required where automation could not reach: - string-based QMetaObject/SIGNAL/SLOT references updated to renamed methods (AddTask, CreatedFile, DeleteSpecificFile, moveSelectionUp, ...) - macro bodies referencing renamed methods (OLIVE_CONFIG, NODE_DEFAULT_DESTRUCTOR, MANAGEDDISPLAYWIDGET_*) - self-shadowing locals renamed where signals/methods became same-named (size_changed, worker_count, selected_items, import param, filters) - third_party OFX member/namespace usages restored (OFX::Host::*, _created, _clipPrefsDirty, createInstance, clearPersistentMessage) - STL protocol aliases restored (const_iterator) with .clang-tidy ignore rules; qHash overloads restored Full build and test suite pass: ctest 4/4, ~1960 gtest cases green.
This commit is contained in:
@@ -33,7 +33,7 @@ namespace olive
|
||||
{
|
||||
|
||||
AV1Section::AV1Section(QWidget *parent)
|
||||
: AV1Section(AV1CRFSection::kDefaultAV1CRF, parent)
|
||||
: AV1Section(AV1CRFSection::k_default_a_v1_crf, parent)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -89,15 +89,15 @@ AV1Section::AV1Section(int default_crf, QWidget *parent)
|
||||
compression_method_stack_, &QStackedWidget::setCurrentIndex);
|
||||
}
|
||||
|
||||
void AV1Section::AddOpts(EncodingParams *params)
|
||||
void AV1Section::add_opts(EncodingParams *params)
|
||||
{
|
||||
CompressionMethod method = static_cast<CompressionMethod>(
|
||||
compression_method_stack_->currentIndex());
|
||||
|
||||
if (method == kConstantRateFactor) {
|
||||
if (method == k_constant_rate_factor) {
|
||||
// Set Quantizer value
|
||||
params->set_video_option(QStringLiteral("qp"),
|
||||
QString::number(crf_section_->GetValue()));
|
||||
QString::number(crf_section_->get_value()));
|
||||
}
|
||||
|
||||
params->set_video_option(QStringLiteral("preset"),
|
||||
@@ -111,27 +111,27 @@ AV1CRFSection::AV1CRFSection(int default_crf, QWidget *parent)
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
crf_slider_ = new QSlider(Qt::Horizontal);
|
||||
crf_slider_->setMinimum(kMinimumCRF);
|
||||
crf_slider_->setMaximum(kMaximumCRF);
|
||||
crf_slider_->setMinimum(k_minimum_crf);
|
||||
crf_slider_->setMaximum(k_maximum_crf);
|
||||
crf_slider_->setValue(default_crf);
|
||||
layout->addWidget(crf_slider_);
|
||||
|
||||
IntegerSlider *crf_input = new IntegerSlider();
|
||||
crf_input->setMaximumWidth(QtUtils::QFontMetricsWidth(
|
||||
crf_input->setMaximumWidth(QtUtils::q_font_metrics_width(
|
||||
crf_input->fontMetrics(), QStringLiteral("HHHH")));
|
||||
crf_input->SetMinimum(kMinimumCRF);
|
||||
crf_input->SetMaximum(kMaximumCRF);
|
||||
crf_input->SetValue(default_crf);
|
||||
crf_input->set_minimum(k_minimum_crf);
|
||||
crf_input->set_maximum(k_maximum_crf);
|
||||
crf_input->set_value(default_crf);
|
||||
crf_input->SetDefaultValue(default_crf);
|
||||
layout->addWidget(crf_input);
|
||||
|
||||
connect(crf_slider_, &QSlider::valueChanged, crf_input,
|
||||
&IntegerSlider::SetValue);
|
||||
connect(crf_input, &IntegerSlider::ValueChanged, crf_slider_,
|
||||
&IntegerSlider::set_value);
|
||||
connect(crf_input, &IntegerSlider::value_changed, crf_slider_,
|
||||
&QSlider::setValue);
|
||||
}
|
||||
|
||||
int AV1CRFSection::GetValue() const
|
||||
int AV1CRFSection::get_value() const
|
||||
{
|
||||
return crf_slider_->value();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user