diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/Edge.cpp (renamed from src/gui/Connection.cpp) | 17 | ||||
-rw-r--r-- | src/gui/Edge.hpp (renamed from src/gui/Connection.hpp) | 21 | ||||
-rw-r--r-- | src/gui/PatchCanvas.cpp | 20 | ||||
-rw-r--r-- | src/gui/wscript | 2 |
4 files changed, 28 insertions, 32 deletions
diff --git a/src/gui/Connection.cpp b/src/gui/Edge.cpp index 0e0093de..9916959e 100644 --- a/src/gui/Connection.cpp +++ b/src/gui/Edge.cpp @@ -14,21 +14,16 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ -#include "Connection.hpp" -#include "Port.hpp" - -#include "ingen/client/EdgeModel.hpp" - -using namespace std; +#include "Edge.hpp" namespace Ingen { namespace GUI { -Connection::Connection(Ganv::Canvas& canvas, - boost::shared_ptr<const Client::EdgeModel> model, - Ganv::Node* src, - Ganv::Node* dst, - uint32_t color) +Edge::Edge(Ganv::Canvas& canvas, + boost::shared_ptr<const Client::EdgeModel> model, + Ganv::Node* src, + Ganv::Node* dst, + uint32_t color) : Ganv::Edge(canvas, src, dst, color) , _edge_model(model) { diff --git a/src/gui/Connection.hpp b/src/gui/Edge.hpp index 17d80bc0..99b83cbb 100644 --- a/src/gui/Connection.hpp +++ b/src/gui/Edge.hpp @@ -14,11 +14,12 @@ along with Ingen. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef INGEN_GUI_CONNECTION_HPP -#define INGEN_GUI_CONNECTION_HPP +#ifndef INGEN_GUI_EDGE_HPP +#define INGEN_GUI_EDGE_HPP #include <cassert> #include <string> + #include "ganv/Edge.hpp" #include "raul/SharedPtr.hpp" @@ -28,18 +29,18 @@ namespace Client { class EdgeModel; } namespace GUI { -/** A Connection in a Patch. +/** An Edge in a Patch. * * \ingroup GUI */ -class Connection : public Ganv::Edge +class Edge : public Ganv::Edge { public: - Connection(Ganv::Canvas& canvas, - boost::shared_ptr<const Client::EdgeModel> model, - Ganv::Node* src, - Ganv::Node* dst, - uint32_t color); + Edge(Ganv::Canvas& canvas, + boost::shared_ptr<const Client::EdgeModel> model, + Ganv::Node* src, + Ganv::Node* dst, + uint32_t color); SharedPtr<const Client::EdgeModel> model() const { return _edge_model; } @@ -50,4 +51,4 @@ private: } // namespace GUI } // namespace Ingen -#endif // INGEN_GUI_CONNECTION_HPP +#endif // INGEN_GUI_EDGE_HPP diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp index c8347bcb..20e3e82a 100644 --- a/src/gui/PatchCanvas.cpp +++ b/src/gui/PatchCanvas.cpp @@ -35,7 +35,7 @@ #include "raul/log.hpp" #include "App.hpp" -#include "Connection.hpp" +#include "Edge.hpp" #include "LoadPluginWindow.hpp" #include "NewSubpatchWindow.hpp" #include "NodeModule.hpp" @@ -131,9 +131,9 @@ PatchCanvas::PatchCanvas(App& app, sigc::mem_fun(this, &PatchCanvas::add_port)); _patch->signal_removed_port().connect( sigc::mem_fun(this, &PatchCanvas::remove_port)); - _patch->signal_new_connection().connect( + _patch->signal_new_edge().connect( sigc::mem_fun(this, &PatchCanvas::connection)); - _patch->signal_removed_connection().connect( + _patch->signal_removed_edge().connect( sigc::mem_fun(this, &PatchCanvas::disconnection)); _app.store()->signal_new_plugin().connect( @@ -301,9 +301,9 @@ PatchCanvas::build() add_port(*i); } - // Create connections - for (PatchModel::Connections::const_iterator i = _patch->connections().begin(); - i != _patch->connections().end(); ++i) { + // Create edges + for (PatchModel::Edges::const_iterator i = _patch->edges().begin(); + i != _patch->edges().end(); ++i) { connection(PtrCast<EdgeModel>(i->second)); } } @@ -478,7 +478,7 @@ PatchCanvas::connection(SharedPtr<const EdgeModel> cm) Ganv::Port* const head = get_port_view(cm->head()); if (tail && head) { - new GUI::Connection(*this, cm, tail, head, tail->get_fill_color()); + new GUI::Edge(*this, cm, tail, head, tail->get_fill_color()); } else { LOG(error) << "Unable to find ports to connect " << cm->tail_path() << " -> " << cm->head_path() << endl; @@ -657,11 +657,11 @@ PatchCanvas::copy_selection() for (SelectedEdges::const_iterator c = selected_edges().begin(); c != selected_edges().end(); ++c) { - Connection* const connection = dynamic_cast<Connection*>(*c); - if (connection) { + Edge* const edge = dynamic_cast<Edge*>(*c); + if (edge) { const Sord::URI subject(*_app.world()->rdf_world(), base_uri); - serialiser.serialise_connection(subject, connection->model()); + serialiser.serialise_edge(subject, edge->model()); } } diff --git a/src/gui/wscript b/src/gui/wscript index f0893cbf..6aa80389 100644 --- a/src/gui/wscript +++ b/src/gui/wscript @@ -31,7 +31,7 @@ def build(bld): BreadCrumbs.cpp Configuration.cpp ConnectWindow.cpp - Connection.cpp + Edge.cpp LoadPatchWindow.cpp LoadPluginWindow.cpp MessagesWindow.cpp |