From 4265b9a78dac2b7f26f505c7b90b0d88494e93c2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 29 Nov 2020 18:11:08 +0100 Subject: Clean up Patchage class --- src/Patchage.cpp | 6 ++++++ src/Patchage.hpp | 24 ++++++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/Patchage.cpp b/src/Patchage.cpp index 94dfd34..1eaeb6c 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -767,6 +767,12 @@ Patchage::save() _conf.save(); } +void +Patchage::quit() +{ + _main_win->hide(); +} + void Patchage::on_quit() { diff --git a/src/Patchage.hpp b/src/Patchage.hpp index ef0e20a..cba8204 100644 --- a/src/Patchage.hpp +++ b/src/Patchage.hpp @@ -51,21 +51,18 @@ #include #include #include -#include #include class AudioDriver; class PatchageCanvas; class Configuration; -namespace Ganv { -class Module; -} // namespace Ganv - +/// Main application class class Patchage { public: explicit Patchage(Options options); + ~Patchage(); Patchage(const Patchage&) = delete; @@ -76,17 +73,10 @@ public: const std::unique_ptr& canvas() const { return _canvas; } - Gtk::Window* window() { return _main_win.get(); } - ILog& log() { return _log; } - Metadata& metadata() { return _metadata; } - const Configuration& conf() const { return _conf; } - Configuration& conf() { return _conf; } - void attach(); - void save(); - void quit() { _main_win->hide(); } - void refresh(); + void save(); + void quit(); void driver_attached(ClientType type); void driver_detached(ClientType type); @@ -101,6 +91,12 @@ public: bool sort_ports() const { return _menu_view_sort_ports->get_active(); } + Gtk::Window* window() { return _main_win.get(); } + ILog& log() { return _log; } + Metadata& metadata() { return _metadata; } + const Configuration& conf() const { return _conf; } + Configuration& conf() { return _conf; } + protected: class BufferSizeColumns : public Gtk::TreeModel::ColumnRecord { -- cgit v1.2.1