change: change code style to Linux style except indent.

This commit is contained in:
Mike Solar
2025-08-03 03:09:40 +08:00
parent 65ab76edc8
commit 74f73ab3be
789 changed files with 77113 additions and 68888 deletions
+36 -30
View File
@@ -25,43 +25,49 @@
#include "common/define.h"
namespace olive {
namespace olive
{
class NodeViewCommon {
public:
enum FlowDirection {
kInvalidDirection = -1,
kTopToBottom,
kBottomToTop,
kLeftToRight,
kRightToLeft
};
enum FlowDirection {
kInvalidDirection = -1,
kTopToBottom,
kBottomToTop,
kLeftToRight,
kRightToLeft
};
static Qt::Orientation GetFlowOrientation(FlowDirection dir) {
if (dir == kTopToBottom || dir == kBottomToTop) {
return Qt::Vertical;
} else {
return Qt::Horizontal;
}
}
static Qt::Orientation GetFlowOrientation(FlowDirection dir)
{
if (dir == kTopToBottom || dir == kBottomToTop) {
return Qt::Vertical;
} else {
return Qt::Horizontal;
}
}
static bool IsFlowVertical(FlowDirection dir)
{
return dir == kTopToBottom || dir == kBottomToTop;
}
static bool IsFlowVertical(FlowDirection dir)
{
return dir == kTopToBottom || dir == kBottomToTop;
}
static bool IsFlowHorizontal(FlowDirection dir)
{
return dir == kLeftToRight || dir == kRightToLeft;
}
static bool DirectionsAreOpposing(FlowDirection a, FlowDirection b) {
return ((a == NodeViewCommon::kLeftToRight && b == NodeViewCommon::kRightToLeft)
|| (a == NodeViewCommon::kRightToLeft && b == NodeViewCommon::kLeftToRight)
|| (a == NodeViewCommon::kTopToBottom && b == NodeViewCommon::kBottomToTop)
|| (a == NodeViewCommon::kBottomToTop && b == NodeViewCommon::kTopToBottom));
}
static bool IsFlowHorizontal(FlowDirection dir)
{
return dir == kLeftToRight || dir == kRightToLeft;
}
static bool DirectionsAreOpposing(FlowDirection a, FlowDirection b)
{
return ((a == NodeViewCommon::kLeftToRight &&
b == NodeViewCommon::kRightToLeft) ||
(a == NodeViewCommon::kRightToLeft &&
b == NodeViewCommon::kLeftToRight) ||
(a == NodeViewCommon::kTopToBottom &&
b == NodeViewCommon::kBottomToTop) ||
(a == NodeViewCommon::kBottomToTop &&
b == NodeViewCommon::kTopToBottom));
}
};
}