summaryrefslogtreecommitdiffstats
path: root/src/Project.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-22 03:26:33 +0000
committerDavid Robillard <d@drobilla.net>2008-08-22 03:26:33 +0000
commit4637ceb876904731d2628563e96a89961f9b7781 (patch)
treeb20bd41c8fcdee1b8a5e76a0aa4a3ca213f82473 /src/Project.hpp
parent503944e72ce146e5bed2556e7b2caa5a41edd7ea (diff)
downloadpatchage-4637ceb876904731d2628563e96a89961f9b7781.tar.gz
patchage-4637ceb876904731d2628563e96a89961f9b7781.tar.bz2
patchage-4637ceb876904731d2628563e96a89961f9b7781.zip
Lash D-Bus support and projects list from LADI Patchage, with improvements/cleanup/sanification/etc.
Remove liblash stuff (meh, what the hell... here's to new beginnings). Enable/disable/hide/etc patchage widgets better based on available (compiled in) functionality. git-svn-id: http://svn.drobilla.net/lad/patchage@1462 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Project.hpp')
-rw-r--r--src/Project.hpp73
1 files changed, 73 insertions, 0 deletions
diff --git a/src/Project.hpp b/src/Project.hpp
new file mode 100644
index 0000000..15e2b26
--- /dev/null
+++ b/src/Project.hpp
@@ -0,0 +1,73 @@
+// -*- Mode: C++ ; indent-tabs-mode: t -*-
+/* This file is part of Patchage.
+ * Copyright (C) 2008 Nedko Arnaudov <nedko@arnaudov.name>
+ *
+ * Patchage is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * Patchage is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef LASH_PROJECT_HPP
+#define LASH_PROJECT_HPP
+
+#include <string>
+#include <list>
+#include <boost/shared_ptr.hpp>
+#include <sigc++/signal.h>
+
+struct ProjectImpl;
+class LashProxy;
+class LashProxyImpl;
+class LashClient;
+
+class Project {
+public:
+ Project(LashProxy* proxy, const std::string& name);
+
+ ~Project();
+
+ void clear();
+
+ typedef std::list< boost::shared_ptr<LashClient> > Clients;
+
+ const std::string& get_name() const;
+ const std::string& get_description() const;
+ const std::string& get_notes() const;
+ const Clients& get_clients() const;
+ bool get_modified_status() const;
+
+ void do_rename(const std::string& name);
+ void do_change_description(const std::string& description);
+ void do_change_notes(const std::string& notes);
+
+ sigc::signal<void> _signal_renamed;
+ sigc::signal<void> _signal_modified_status_changed;
+ sigc::signal<void> _signal_description_changed;
+ sigc::signal<void> _signal_notes_changed;
+
+ sigc::signal< void, boost::shared_ptr<LashClient> > _signal_client_added;
+ sigc::signal< void, boost::shared_ptr<LashClient> > _signal_client_removed;
+
+private:
+ friend class LashProxyImpl;
+
+ void on_name_changed(const std::string& name);
+ void on_modified_status_changed(bool modified_status);
+ void on_description_changed(const std::string& description);
+ void on_notes_changed(const std::string& notes);
+ void on_client_added(boost::shared_ptr<LashClient> client);
+ void on_client_removed(const std::string& id);
+
+ ProjectImpl* _impl;
+};
+
+#endif // LASH_PROJECT_HPP