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:
+23
-23
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef BLOCK_H
|
||||
#define BLOCK_H
|
||||
#ifndef OAK_BLOCK_H
|
||||
#define OAK_BLOCK_H
|
||||
|
||||
#include "node/node.h"
|
||||
#include "timeline/timelinecommon.h"
|
||||
@@ -38,31 +38,31 @@ class Block : public Node {
|
||||
public:
|
||||
Block();
|
||||
|
||||
virtual QVector<CategoryID> Category() const override;
|
||||
virtual QVector<CategoryID> category() const override;
|
||||
|
||||
const rational &in() const
|
||||
const Rational &in() const
|
||||
{
|
||||
return in_point_;
|
||||
}
|
||||
|
||||
const rational &out() const
|
||||
const Rational &out() const
|
||||
{
|
||||
return out_point_;
|
||||
}
|
||||
|
||||
void set_in(const rational &in)
|
||||
void set_in(const Rational &in)
|
||||
{
|
||||
in_point_ = in;
|
||||
}
|
||||
|
||||
void set_out(const rational &out)
|
||||
void set_out(const Rational &out)
|
||||
{
|
||||
out_point_ = out;
|
||||
}
|
||||
|
||||
rational length() const;
|
||||
virtual void set_length_and_media_out(const rational &length);
|
||||
virtual void set_length_and_media_in(const rational &length);
|
||||
Rational length() const;
|
||||
virtual void set_length_and_media_out(const Rational &length);
|
||||
virtual void set_length_and_media_in(const Rational &length);
|
||||
|
||||
TimeRange range() const
|
||||
{
|
||||
@@ -97,32 +97,32 @@ public:
|
||||
void set_track(Track *track)
|
||||
{
|
||||
track_ = track;
|
||||
emit TrackChanged(track_);
|
||||
emit track_changed(track_);
|
||||
}
|
||||
|
||||
bool is_enabled() const;
|
||||
void set_enabled(bool e);
|
||||
|
||||
virtual void Retranslate() override;
|
||||
virtual void retranslate() override;
|
||||
|
||||
virtual void InvalidateCache(
|
||||
virtual void invalidate_cache(
|
||||
const TimeRange &range, const QString &from, int element = -1,
|
||||
InvalidateCacheOptions options = InvalidateCacheOptions()) override;
|
||||
|
||||
static const QString kLengthInput;
|
||||
static const QString k_length_input;
|
||||
|
||||
static void set_previous_next(Block *previous, Block *next);
|
||||
|
||||
public slots:
|
||||
|
||||
signals:
|
||||
void EnabledChanged();
|
||||
void enabled_changed();
|
||||
|
||||
void LengthChanged();
|
||||
void length_changed();
|
||||
|
||||
void PreviewChanged();
|
||||
void preview_changed();
|
||||
|
||||
void TrackChanged(Track *track);
|
||||
void track_changed(Track *track);
|
||||
|
||||
protected:
|
||||
virtual void InputValueChangedEvent(const QString &input,
|
||||
@@ -132,15 +132,15 @@ protected:
|
||||
Block *next_;
|
||||
|
||||
private:
|
||||
void set_length_internal(const rational &length);
|
||||
void set_length_internal(const Rational &length);
|
||||
|
||||
rational in_point_;
|
||||
rational out_point_;
|
||||
Rational in_point_;
|
||||
Rational out_point_;
|
||||
Track *track_;
|
||||
|
||||
rational last_length_;
|
||||
Rational last_length_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // BLOCK_H
|
||||
#endif // OAK_BLOCK_H
|
||||
|
||||
Reference in New Issue
Block a user