summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-11 03:56:54 +0000
committerDavid Robillard <d@drobilla.net>2012-05-11 03:56:54 +0000
commit3dd4b42f3054f819c865e9415c4b86ba78d43aec (patch)
tree656d152cdffdd9196013fe9f35d46f4cf73c6927 /src/gui
parent7be6d5d05756a7dea20c494d56f364b4dc064c88 (diff)
downloadingen-3dd4b42f3054f819c865e9415c4b86ba78d43aec.tar.gz
ingen-3dd4b42f3054f819c865e9415c4b86ba78d43aec.tar.bz2
ingen-3dd4b42f3054f819c865e9415c4b86ba78d43aec.zip
"Connection" => "Edge"
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4345 a436a847-0d15-0410-975c-d299462d15a1
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.cpp20
-rw-r--r--src/gui/wscript2
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