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:
2026-07-19 16:10:54 +08:00
parent cb1718a103
commit bb40b4923e
1014 changed files with 44257 additions and 44220 deletions
+34 -34
View File
@@ -19,8 +19,8 @@
***/
#ifndef EXPORTVIDEOTAB_H
#define EXPORTVIDEOTAB_H
#ifndef OAK_EXPORTVIDEOTAB_H
#define OAK_EXPORTVIDEOTAB_H
#include <QCheckBox>
#include <QComboBox>
@@ -45,25 +45,25 @@ class ExportVideoTab : public QWidget {
public:
ExportVideoTab(ColorManager *color_manager, QWidget *parent = nullptr);
int SetFormat(ExportFormat::Format format);
int set_format(ExportFormat::Format format);
bool IsImageSequenceSet() const;
void SetImageSequence(bool e) const;
bool is_image_sequence_set() const;
void set_image_sequence(bool e) const;
rational GetStillImageTime() const
Rational get_still_image_time() const
{
return image_section_->GetTime();
return image_section_->get_time();
}
ExportCodec::Codec GetSelectedCodec() const
ExportCodec::Codec get_selected_codec() const
{
return static_cast<ExportCodec::Codec>(
codec_combobox()->currentData().toInt());
}
void SetSelectedCodec(ExportCodec::Codec c)
void set_selected_codec(ExportCodec::Codec c)
{
QtUtils::SetComboBoxData(codec_combobox(), c);
QtUtils::set_combo_box_data(codec_combobox(), c);
}
QComboBox *codec_combobox() const
@@ -91,33 +91,33 @@ public:
return scaling_method_combobox_;
}
rational GetSelectedFrameRate() const
Rational get_selected_frame_rate() const
{
return frame_rate_combobox_->GetFrameRate();
return frame_rate_combobox_->get_frame_rate();
}
void SetSelectedFrameRate(const rational &fr)
void set_selected_frame_rate(const Rational &fr)
{
frame_rate_combobox_->SetFrameRate(fr);
UpdateFrameRate(fr);
frame_rate_combobox_->set_frame_rate(fr);
update_frame_rate(fr);
}
QString CurrentOCIOColorSpace()
QString current_ocio_color_space()
{
return color_space_chooser_->input();
}
void SetOCIOColorSpace(const QString &s)
void set_ocio_color_space(const QString &s)
{
color_space_chooser_->set_input(s);
}
CodecSection *GetCodecSection() const
CodecSection *get_codec_section() const
{
return static_cast<CodecSection *>(codec_stack_->currentWidget());
}
void SetCodecSection(CodecSection *section)
void set_codec_section(CodecSection *section)
{
if (section) {
codec_stack_->setVisible(true);
@@ -147,7 +147,7 @@ public:
return threads_;
}
void SetThreads(int t)
void set_threads(int t)
{
threads_ = t;
}
@@ -156,7 +156,7 @@ public:
{
return pix_fmt_;
}
void SetPixFmt(const QString &s)
void set_pix_fmt(const QString &s)
{
pix_fmt_ = s;
}
@@ -165,27 +165,27 @@ public:
{
return color_range_;
}
void SetColorRange(VideoParams::ColorRange c)
void set_color_range(VideoParams::ColorRange c)
{
color_range_ = c;
}
public slots:
void VideoCodecChanged();
void video_codec_changed();
void SetTime(const rational &time);
void set_time(const Rational &time);
signals:
void ColorSpaceChanged(const QString &colorspace);
void color_space_changed(const QString &colorspace);
void ImageSequenceCheckBoxChanged(bool e);
void image_sequence_check_box_changed(bool e);
void TimeChanged(const rational &time);
void time_changed(const Rational &time);
private:
QWidget *SetupResolutionSection();
QWidget *SetupColorSection();
QWidget *SetupCodecSection();
QWidget *setup_resolution_section();
QWidget *setup_color_section();
QWidget *setup_codec_section();
QComboBox *codec_combobox_;
FrameRateComboBox *frame_rate_combobox_;
@@ -218,13 +218,13 @@ private:
ExportFormat::Format format_;
private slots:
void MaintainAspectRatioChanged(bool val);
void maintain_aspect_ratio_changed(bool val);
void OpenAdvancedDialog();
void open_advanced_dialog();
void UpdateFrameRate(rational r);
void update_frame_rate(Rational r);
};
}
#endif // EXPORTVIDEOTAB_H
#endif // OAK_EXPORTVIDEOTAB_H