-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AbstractConnectionPainter to enable custom connections
- Loading branch information
1 parent
4ac0857
commit de5fd0a
Showing
10 changed files
with
143 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "internal/AbstractConnectionPainter.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include <QPainter> | ||
|
||
#include "Export.hpp" | ||
|
||
class QPainter; | ||
|
||
namespace QtNodes { | ||
|
||
class ConnectionGraphicsObject; | ||
|
||
/// Class enables custom painting for connections. | ||
class NODE_EDITOR_PUBLIC AbstractConnectionPainter | ||
{ | ||
public: | ||
virtual ~AbstractConnectionPainter() = default; | ||
|
||
/** | ||
* Reimplement this function in order to have a custom connection painting. | ||
*/ | ||
virtual void paint(QPainter *painter, ConnectionGraphicsObject const &cgo) const = 0; | ||
|
||
virtual QPainterPath getPainterStroke(ConnectionGraphicsObject const &cgo) const = 0; | ||
}; | ||
} // namespace QtNodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.