1 /* 2 * gnote 3 * 4 * Copyright (C) 2011-2013,2016,2019 Aurimas Cernius 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 21 #ifndef _REPLACETITLE_ADDIN_HPP_ 22 #define _REPLACETITLE_ADDIN_HPP_ 23 24 #include "sharp/dynamicmodule.hpp" 25 #include "note.hpp" 26 #include "noteaddin.hpp" 27 28 namespace replacetitle { 29 30 class ReplaceTitleModule 31 : public sharp::DynamicModule 32 { 33 public: 34 ReplaceTitleModule(); 35 }; 36 37 DECLARE_MODULE(ReplaceTitleModule); 38 39 class ReplaceTitleNoteAddin 40 : public gnote::NoteAddin 41 { 42 public: create()43 static ReplaceTitleNoteAddin * create() 44 { 45 return new ReplaceTitleNoteAddin; 46 } 47 virtual void initialize() override; 48 virtual void shutdown() override; 49 virtual void on_note_opened() override; 50 virtual std::vector<gnote::PopoverWidget> get_actions_popover_widgets() const override; 51 private: 52 void replacetitle_button_clicked(const Glib::VariantBase&); 53 }; 54 55 56 } 57 58 #endif 59