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
+58 -58
View File
@@ -27,7 +27,8 @@
#include "nodeviewcommon.h"
#include "node/node.h"
namespace olive {
namespace olive
{
class NodeViewItem;
@@ -36,49 +37,47 @@ class NodeViewItem;
*
* A fairly simple line widget use to visualize a connection between two node parameters (a NodeEdge).
*/
class NodeViewEdge : public QGraphicsPathItem
{
class NodeViewEdge : public QGraphicsPathItem {
public:
NodeViewEdge(Node *output, const NodeInput& input,
NodeViewItem* from_item, NodeViewItem* to_item,
QGraphicsItem* parent = nullptr);
NodeViewEdge(Node *output, const NodeInput &input, NodeViewItem *from_item,
NodeViewItem *to_item, QGraphicsItem *parent = nullptr);
NodeViewEdge(QGraphicsItem* parent = nullptr);
NodeViewEdge(QGraphicsItem *parent = nullptr);
virtual ~NodeViewEdge() override;
virtual ~NodeViewEdge() override;
Node *output() const
{
return output_;
}
Node *output() const
{
return output_;
}
const NodeInput& input() const
{
return input_;
}
const NodeInput &input() const
{
return input_;
}
int element() const
{
return element_;
}
int element() const
{
return element_;
}
NodeViewItem* from_item() const
{
return from_item_;
}
NodeViewItem *from_item() const
{
return from_item_;
}
NodeViewItem* to_item() const
{
return to_item_;
}
NodeViewItem *to_item() const
{
return to_item_;
}
void set_from_item(NodeViewItem *i);
void set_from_item(NodeViewItem *i);
void set_to_item(NodeViewItem *i);
void set_to_item(NodeViewItem *i);
void Adjust();
void Adjust();
/**
/**
* @brief Set the connected state of this line
*
* When the edge is not connected, it visually depicts this by coloring the line grey. When an edge is connected or
@@ -88,59 +87,60 @@ public:
* Using SetEdge() automatically sets this to true. Under most circumstances this should be left alone, and only
* be set when an edge is being created/dragged.
*/
void SetConnected(bool c);
void SetConnected(bool c);
bool IsConnected() const
{
return connected_;
}
bool IsConnected() const
{
return connected_;
}
/**
/**
* @brief Set highlighted state
*
* Changes color of edge.
*/
void SetHighlighted(bool e);
void SetHighlighted(bool e);
/**
/**
* @brief Set points to create curve from
*/
void SetPoints(const QPointF& start, const QPointF& end);
void SetPoints(const QPointF &start, const QPointF &end);
/**
/**
* @brief Set whether edges should be drawn as curved or as straight lines
*/
void SetCurved(bool e);
void SetCurved(bool e);
protected:
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr) override;
virtual void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget = nullptr) override;
private:
void Init();
void Init();
void UpdateCurve();
void UpdateCurve();
Node *output_;
Node *output_;
NodeInput input_;
NodeInput input_;
int element_;
int element_;
NodeViewItem* from_item_;
NodeViewItem *from_item_;
NodeViewItem* to_item_;
NodeViewItem *to_item_;
int edge_width_;
int edge_width_;
bool connected_;
bool connected_;
bool highlighted_;
bool highlighted_;
bool curved_;
QPointF cached_start_;
QPointF cached_end_;
bool curved_;
QPointF cached_start_;
QPointF cached_end_;
};
}