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:
@@ -19,8 +19,8 @@
|
||||
|
||||
***/
|
||||
|
||||
#ifndef VIEWERSIZER_H
|
||||
#define VIEWERSIZER_H
|
||||
#ifndef OAK_VIEWERSIZER_H
|
||||
#define OAK_VIEWERSIZER_H
|
||||
|
||||
#include <olive/core/core.h>
|
||||
#include <QScrollBar>
|
||||
@@ -50,12 +50,12 @@ public:
|
||||
*
|
||||
* ViewerSizer takes ownership of this widget. If a widget was previously set, it is destroyed.
|
||||
*/
|
||||
void SetWidget(QWidget *widget);
|
||||
void set_widget(QWidget *widget);
|
||||
|
||||
QSize GetContainerSize() const;
|
||||
QSize get_container_size() const;
|
||||
|
||||
static constexpr int kZoomLevelCount = 10;
|
||||
static constexpr double kZoomLevels[kZoomLevelCount] = {
|
||||
static constexpr int k_zoom_level_count = 10;
|
||||
static constexpr double k_zoom_levels[k_zoom_level_count] = {
|
||||
0.05, 0.1, 0.25, 0.5, 0.75, 1.0, 1.5, 2.0, 4.0, 8.0
|
||||
};
|
||||
|
||||
@@ -65,29 +65,29 @@ public slots:
|
||||
*
|
||||
* This is not the actual resolution of the viewer, it's used to calculate the aspect ratio
|
||||
*/
|
||||
void SetChildSize(int width, int height);
|
||||
void set_child_size(int width, int height);
|
||||
|
||||
/**
|
||||
* @brief Set pixel aspect ratio
|
||||
*/
|
||||
void SetPixelAspectRatio(const rational &pixel_aspect);
|
||||
void set_pixel_aspect_ratio(const Rational &pixel_aspect);
|
||||
|
||||
/**
|
||||
* @brief Set the zoom value of the child widget
|
||||
*
|
||||
* The number is an integer percentage (100 = 100%). Set to 0 to auto-fit.
|
||||
*/
|
||||
void SetZoom(double percent);
|
||||
void SetZoomAnchored(double percent, double cursor_x, double cursor_y);
|
||||
void set_zoom(double percent);
|
||||
void set_zoom_anchored(double percent, double cursor_x, double cursor_y);
|
||||
|
||||
void HandDragMove(int x, int y);
|
||||
void hand_drag_move(int x, int y);
|
||||
|
||||
virtual bool eventFilter(QObject *watched, QEvent *event) override;
|
||||
|
||||
signals:
|
||||
void RequestScale(const QMatrix4x4 &matrix);
|
||||
void request_scale(const QMatrix4x4 &matrix);
|
||||
|
||||
void RequestTranslate(const QMatrix4x4 &matrix);
|
||||
void request_translate(const QMatrix4x4 &matrix);
|
||||
|
||||
protected:
|
||||
/**
|
||||
@@ -99,11 +99,11 @@ private:
|
||||
/**
|
||||
* @brief Main sizing function, resizes widget_ to fit aspect_ratio_ (or hides if aspect ratio is 0)
|
||||
*/
|
||||
void UpdateSize();
|
||||
void update_size();
|
||||
|
||||
int GetZoomedValue(int value);
|
||||
int get_zoomed_value(int value);
|
||||
|
||||
double GetRealCurrentZoom() const;
|
||||
double get_real_current_zoom() const;
|
||||
|
||||
/**
|
||||
* @brief Reference to widget
|
||||
@@ -118,7 +118,7 @@ private:
|
||||
int width_;
|
||||
int height_;
|
||||
|
||||
rational pixel_aspect_;
|
||||
Rational pixel_aspect_;
|
||||
|
||||
/**
|
||||
* @brief Internal zoom value
|
||||
@@ -130,9 +130,9 @@ private:
|
||||
QScrollBar *vert_scrollbar_;
|
||||
|
||||
private slots:
|
||||
void ScrollBarMoved();
|
||||
void scroll_bar_moved();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // VIEWERSIZER_H
|
||||
#endif // OAK_VIEWERSIZER_H
|
||||
|
||||
Reference in New Issue
Block a user