diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/App.cpp | 2 | ||||
-rw-r--r-- | src/gui/App.hpp | 2 | ||||
-rw-r--r-- | src/gui/Arc.cpp | 11 | ||||
-rw-r--r-- | src/gui/Arc.hpp | 8 | ||||
-rw-r--r-- | src/gui/BreadCrumbs.cpp | 5 | ||||
-rw-r--r-- | src/gui/BreadCrumbs.hpp | 15 | ||||
-rw-r--r-- | src/gui/ConnectWindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/ConnectWindow.hpp | 2 | ||||
-rw-r--r-- | src/gui/GraphBox.cpp | 13 | ||||
-rw-r--r-- | src/gui/GraphBox.hpp | 15 | ||||
-rw-r--r-- | src/gui/GraphCanvas.cpp | 2 | ||||
-rw-r--r-- | src/gui/GraphCanvas.hpp | 2 | ||||
-rw-r--r-- | src/gui/LoadPluginWindow.cpp | 24 | ||||
-rw-r--r-- | src/gui/LoadPluginWindow.hpp | 21 |
14 files changed, 63 insertions, 61 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 92279906..fa48cb18 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -160,7 +160,7 @@ App::run() } void -App::attach(SPtr<ingen::Interface> client) +App::attach(const SPtr<ingen::Interface>& client) { assert(!_client); assert(!_store); diff --git a/src/gui/App.hpp b/src/gui/App.hpp index e9d83cfd..3149f169 100644 --- a/src/gui/App.hpp +++ b/src/gui/App.hpp @@ -75,7 +75,7 @@ public: void error_message(const std::string& str); - void attach(SPtr<ingen::Interface> client); + void attach(const SPtr<ingen::Interface>& client); void detach(); diff --git a/src/gui/Arc.cpp b/src/gui/Arc.cpp index d811bd22..b436dd26 100644 --- a/src/gui/Arc.cpp +++ b/src/gui/Arc.cpp @@ -24,12 +24,11 @@ namespace ingen { namespace gui { -Arc::Arc(Ganv::Canvas& canvas, - SPtr<const client::ArcModel> model, - Ganv::Node* src, - Ganv::Node* dst) - : Ganv::Edge(canvas, src, dst) - , _arc_model(model) +Arc::Arc(Ganv::Canvas& canvas, + const SPtr<const client::ArcModel>& model, + Ganv::Node* src, + Ganv::Node* dst) + : Ganv::Edge(canvas, src, dst), _arc_model(model) { SPtr<const client::ObjectModel> tparent = model->tail()->parent(); SPtr<const client::BlockModel> tparent_block; diff --git a/src/gui/Arc.hpp b/src/gui/Arc.hpp index 453985fc..7e33384b 100644 --- a/src/gui/Arc.hpp +++ b/src/gui/Arc.hpp @@ -35,10 +35,10 @@ namespace gui { class Arc : public Ganv::Edge { public: - Arc(Ganv::Canvas& canvas, - SPtr<const client::ArcModel> model, - Ganv::Node* src, - Ganv::Node* dst); + Arc(Ganv::Canvas& canvas, + const SPtr<const client::ArcModel>& model, + Ganv::Node* src, + Ganv::Node* dst); SPtr<const client::ArcModel> model() const { return _arc_model; } diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp index a4a1b2fb..5dbdab17 100644 --- a/src/gui/BreadCrumbs.cpp +++ b/src/gui/BreadCrumbs.cpp @@ -58,7 +58,7 @@ BreadCrumbs::view(const Raul::Path& path) * children preserved. */ void -BreadCrumbs::build(Raul::Path path, SPtr<GraphView> view) +BreadCrumbs::build(const Raul::Path& path, const SPtr<GraphView>& view) { bool old_enable_signal = _enable_signal; _enable_signal = false; @@ -156,8 +156,7 @@ BreadCrumbs::build(Raul::Path path, SPtr<GraphView> view) * match, otherwise ignoring `view`. */ BreadCrumbs::BreadCrumb* -BreadCrumbs::create_crumb(const Raul::Path& path, - SPtr<GraphView> view) +BreadCrumbs::create_crumb(const Raul::Path& path, const SPtr<GraphView>& view) { BreadCrumb* but = manage( new BreadCrumb(path, diff --git a/src/gui/BreadCrumbs.hpp b/src/gui/BreadCrumbs.hpp index 63872a78..f359b971 100644 --- a/src/gui/BreadCrumbs.hpp +++ b/src/gui/BreadCrumbs.hpp @@ -47,7 +47,7 @@ public: SPtr<GraphView> view(const Raul::Path& path); - void build(Raul::Path path, SPtr<GraphView> view); + void build(const Raul::Path& path, const SPtr<GraphView>& view); sigc::signal<void, const Raul::Path&, SPtr<GraphView> > signal_graph_selected; @@ -64,9 +64,10 @@ private: class BreadCrumb : public Gtk::ToggleButton { public: - BreadCrumb(const Raul::Path& path, SPtr<GraphView> view = SPtr<GraphView>()) - : _path(path) - , _view(view) + BreadCrumb(const Raul::Path& path, + const SPtr<GraphView>& view = SPtr<GraphView>()) + : _path(path) + , _view(view) { assert(!view || view->graph()->path() == path); set_border_width(0); @@ -75,7 +76,7 @@ private: show_all(); } - void set_view(SPtr<GraphView> view) { + void set_view(const SPtr<GraphView>& view) { assert(!view || view->graph()->path() == _path); _view = view; } @@ -100,8 +101,8 @@ private: SPtr<GraphView> _view; }; - BreadCrumb* create_crumb(const Raul::Path& path, - SPtr<GraphView> view = SPtr<GraphView>()); + BreadCrumb* create_crumb(const Raul::Path& path, + const SPtr<GraphView>& view = SPtr<GraphView>()); void breadcrumb_clicked(BreadCrumb* crumb); diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp index 209475e0..fc9e7cab 100644 --- a/src/gui/ConnectWindow.cpp +++ b/src/gui/ConnectWindow.cpp @@ -129,7 +129,7 @@ ConnectWindow::ingen_response(int32_t id, } void -ConnectWindow::set_connected_to(SPtr<ingen::Interface> engine) +ConnectWindow::set_connected_to(const SPtr<ingen::Interface>& engine) { _app->world().set_interface(engine); diff --git a/src/gui/ConnectWindow.hpp b/src/gui/ConnectWindow.hpp index 882e0142..481e4d83 100644 --- a/src/gui/ConnectWindow.hpp +++ b/src/gui/ConnectWindow.hpp @@ -57,7 +57,7 @@ public: ConnectWindow(BaseObjectType* cobject, Glib::RefPtr<Gtk::Builder> xml); - void set_connected_to(SPtr<ingen::Interface> engine); + void set_connected_to(const SPtr<ingen::Interface>& engine); void start(App& app, ingen::World& world); bool attached() const { return _finished_connecting; } diff --git a/src/gui/GraphBox.cpp b/src/gui/GraphBox.cpp index 7fe1a643..7856932d 100644 --- a/src/gui/GraphBox.cpp +++ b/src/gui/GraphBox.cpp @@ -195,7 +195,7 @@ GraphBox::~GraphBox() } SPtr<GraphBox> -GraphBox::create(App& app, SPtr<const GraphModel> graph) +GraphBox::create(App& app, const SPtr<const GraphModel>& graph) { GraphBox* result = nullptr; Glib::RefPtr<Gtk::Builder> xml = WidgetFactory::create("graph_win"); @@ -248,7 +248,8 @@ GraphBox::set_status_text(const std::string& text) } void -GraphBox::set_graph_from_path(const Raul::Path& path, SPtr<GraphView> view) +GraphBox::set_graph_from_path(const Raul::Path& path, + const SPtr<GraphView>& view) { if (view) { assert(view->graph()->path() == path); @@ -267,8 +268,8 @@ GraphBox::set_graph_from_path(const Raul::Path& path, SPtr<GraphView> view) * If `view` is null, a new view will be created. */ void -GraphBox::set_graph(SPtr<const GraphModel> graph, - SPtr<GraphView> view) +GraphBox::set_graph(const SPtr<const GraphModel>& graph, + const SPtr<GraphView>& view) { if (!graph || graph == _graph) { return; @@ -355,7 +356,7 @@ GraphBox::set_graph(SPtr<const GraphModel> graph, } void -GraphBox::graph_port_added(SPtr<const PortModel> port) +GraphBox::graph_port_added(const SPtr<const PortModel>& port) { if (port->is_input() && _app->can_control(port.get())) { _menu_view_control_window->property_sensitive() = true; @@ -363,7 +364,7 @@ GraphBox::graph_port_added(SPtr<const PortModel> port) } void -GraphBox::graph_port_removed(SPtr<const PortModel> port) +GraphBox::graph_port_removed(const SPtr<const PortModel>& port) { if (!(port->is_input() && _app->can_control(port.get()))) { return; diff --git a/src/gui/GraphBox.hpp b/src/gui/GraphBox.hpp index 93599e0b..e1f602b7 100644 --- a/src/gui/GraphBox.hpp +++ b/src/gui/GraphBox.hpp @@ -70,15 +70,15 @@ public: const Glib::RefPtr<Gtk::Builder>& xml); ~GraphBox(); - static SPtr<GraphBox> create( - App& app, SPtr<const client::GraphModel> graph); + static SPtr<GraphBox> + create(App& app, const SPtr<const client::GraphModel>& graph); void init_box(App& app); void set_status_text(const std::string& text); - void set_graph(SPtr<const client::GraphModel> graph, - SPtr<GraphView> view); + void set_graph(const SPtr<const client::GraphModel>& graph, + const SPtr<GraphView>& view); void set_window(GraphWindow* win) { _window = win; } @@ -91,14 +91,15 @@ public: void show_port_status(const client::PortModel* port, const Atom& value); - void set_graph_from_path(const Raul::Path& path, SPtr<GraphView> view); + void + set_graph_from_path(const Raul::Path& path, const SPtr<GraphView>& view); void object_entered(const client::ObjectModel* model); void object_left(const client::ObjectModel* model); private: - void graph_port_added(SPtr<const client::PortModel> port); - void graph_port_removed(SPtr<const client::PortModel> port); + void graph_port_added(const SPtr<const client::PortModel>& port); + void graph_port_removed(const SPtr<const client::PortModel>& port); void property_changed(const URI& predicate, const Atom& value); void show_status(const client::ObjectModel* model); diff --git a/src/gui/GraphCanvas.cpp b/src/gui/GraphCanvas.cpp index b89a2ddb..bb60caa5 100644 --- a/src/gui/GraphCanvas.cpp +++ b/src/gui/GraphCanvas.cpp @@ -841,7 +841,7 @@ GraphCanvas::menu_add_port(const string& sym_base, } void -GraphCanvas::load_plugin(WPtr<PluginModel> weak_plugin) +GraphCanvas::load_plugin(const WPtr<PluginModel>& weak_plugin) { SPtr<PluginModel> plugin = weak_plugin.lock(); if (!plugin) { diff --git a/src/gui/GraphCanvas.hpp b/src/gui/GraphCanvas.hpp index b2529845..5b379ec7 100644 --- a/src/gui/GraphCanvas.hpp +++ b/src/gui/GraphCanvas.hpp @@ -96,7 +96,7 @@ private: void menu_new_graph(); void menu_load_graph(); void menu_properties(); - void load_plugin(WPtr<client::PluginModel> weak_plugin); + void load_plugin(const WPtr<client::PluginModel>& weak_plugin); void build_menus(); diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index 870288ac..acc34842 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -125,8 +125,8 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, } void -LoadPluginWindow::present(SPtr<const GraphModel> graph, - Properties data) +LoadPluginWindow::present(const SPtr<const GraphModel>& graph, + const Properties& data) { set_graph(graph); _initial_data = data; @@ -164,7 +164,7 @@ LoadPluginWindow::name_cleared(Gtk::EntryIconPosition pos, const GdkEventButton* * This function MUST be called before using the window in any way! */ void -LoadPluginWindow::set_graph(SPtr<const GraphModel> graph) +LoadPluginWindow::set_graph(const SPtr<const GraphModel>& graph) { if (_graph) { _graph = graph; @@ -199,7 +199,7 @@ LoadPluginWindow::on_show() } void -LoadPluginWindow::set_plugins(SPtr<const ClientStore::Plugins> plugins) +LoadPluginWindow::set_plugins(const SPtr<const ClientStore::Plugins>& plugins) { _rows.clear(); _plugins_liststore->clear(); @@ -213,7 +213,7 @@ LoadPluginWindow::set_plugins(SPtr<const ClientStore::Plugins> plugins) } void -LoadPluginWindow::new_plugin(SPtr<const PluginModel> pm) +LoadPluginWindow::new_plugin(const SPtr<const PluginModel>& pm) { if (is_visible()) { add_plugin(pm); @@ -223,7 +223,7 @@ LoadPluginWindow::new_plugin(SPtr<const PluginModel> pm) } static std::string -get_project_name(SPtr<const PluginModel> plugin) +get_project_name(const SPtr<const PluginModel>& plugin) { std::string name; if (plugin->lilv_plugin()) { @@ -249,7 +249,7 @@ get_project_name(SPtr<const PluginModel> plugin) } static std::string -get_author_name(SPtr<const PluginModel> plugin) +get_author_name(const SPtr<const PluginModel>& plugin) { std::string name; if (plugin->lilv_plugin()) { @@ -263,8 +263,8 @@ get_author_name(SPtr<const PluginModel> plugin) } void -LoadPluginWindow::set_row(Gtk::TreeModel::Row& row, - SPtr<const PluginModel> plugin) +LoadPluginWindow::set_row(Gtk::TreeModel::Row& row, + const SPtr<const PluginModel>& plugin) { const URIs& uris = _app->uris(); const Atom& name = plugin->get_property(uris.doap_name); @@ -294,7 +294,7 @@ LoadPluginWindow::set_row(Gtk::TreeModel::Row& row, } void -LoadPluginWindow::add_plugin(SPtr<const PluginModel> plugin) +LoadPluginWindow::add_plugin(const SPtr<const PluginModel>& plugin) { if (plugin->lilv_plugin() && lilv_plugin_is_replaced(plugin->lilv_plugin())) { return; @@ -357,8 +357,8 @@ LoadPluginWindow::plugin_selection_changed() * sends the notification back. */ string -LoadPluginWindow::generate_module_name(SPtr<const PluginModel> plugin, - int offset) +LoadPluginWindow::generate_module_name(const SPtr<const PluginModel>& plugin, + int offset) { std::stringstream ss; ss << plugin->default_block_symbol(); diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp index 49c61c76..78c52eba 100644 --- a/src/gui/LoadPluginWindow.hpp +++ b/src/gui/LoadPluginWindow.hpp @@ -54,13 +54,14 @@ public: LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& xml); - void set_graph(SPtr<const client::GraphModel> graph); - void set_plugins(SPtr<const client::ClientStore::Plugins> plugins); + void set_graph(const SPtr<const client::GraphModel>& graph); - void add_plugin(SPtr<const client::PluginModel> plugin); + void set_plugins(const SPtr<const client::ClientStore::Plugins>& plugins); - void present(SPtr<const client::GraphModel> graph, - Properties data); + void add_plugin(const SPtr<const client::PluginModel>& plugin); + + void present(const SPtr<const client::GraphModel>& graph, + const Properties& data); protected: void on_show() override; @@ -109,10 +110,10 @@ private: void name_changed(); void name_cleared(Gtk::EntryIconPosition pos, const GdkEventButton* event); - void set_row(Gtk::TreeModel::Row& row, - SPtr<const client::PluginModel> plugin); + void set_row(Gtk::TreeModel::Row& row, + const SPtr<const client::PluginModel>& plugin); - void new_plugin(SPtr<const client::PluginModel> pm); + void new_plugin(const SPtr<const client::PluginModel>& pm); void plugin_property_changed(const URI& plugin, const URI& predicate, @@ -122,8 +123,8 @@ private: void plugin_selection_changed(); static std::string - generate_module_name(SPtr<const client::PluginModel> plugin, - int offset = 0); + generate_module_name(const SPtr<const client::PluginModel>& plugin, + int offset = 0); void load_plugin(const Gtk::TreeModel::iterator& iter); |