/* $Id$ */ /* * Cantus Tag Editor * Copyright © 2002-2004 by Samuel Abels * Copyright © 2007 by Tim Huetz * * This program 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 3 of the License, or * (at your option) any later version. * * This program 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 more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see **/ #ifdef HAVE_CONFIG_H # include #endif class Controller; #ifndef HAVE_CONTROLLER_H #define HAVE_CONTROLLER_H #include #include #include #include #include #include class FileInfo; // from "fileinfo.h" class Controller : public sigc::trackable { protected: // Prevent copys. Controller(Controller &c) { g_assert_not_reached(); } // Prevent assignments. Controller& operator=(Controller &c) { g_assert_not_reached(); } public: Controller(); ~Controller(); /* Loads the preferences from the configfile. */ int configfile_load(void); /* Saves the preferences to the configfile. */ int configfile_save(void); PluginHandler *pluginhandler; FileInfoManager *fileinfomanager; Preferences *preferences; ConfigFile *configfile; EventBus *eventbus; private: /* Triggers eventbus events and queues the files to the FileInfoManager. */ void on_filelist_selection_changed(void *filenames); /* Whenever a new plugin has been registered, this updates the * FileInfoManager. */ void on_plugins_registered(CantusPlugin *plugin); /* This signal indicates that some file's data needs to be written to the * filesystem. May, for example, be triggered by a plugin when a "save" button * has been pressed. */ void on_filelist_save_request(void *list); /* Emits an eventbus event. */ void emit_file_read_finished_event(FileInfo *info); /* Emits an eventbus event. */ void emit_file_read_failed_event(FileInfo *info); /* Emits an eventbus event. */ void emit_file_write_failed_event(FileInfo *info); /* Emits an eventbus event. */ void emit_file_rename_finished_event(FileInfo *info); /* Emits an eventbus event. */ void emit_file_rename_failed_event(FileInfo *info); /* Emits an eventbus event. */ void emit_filenames_read_finished_event(void); /* Emits an eventbus event. */ void emit_preferences_changed_event(std::string key); }; #endif