1 /* 2 Copyright (C) 2017-2018 by the Battle for Wesnoth Project https://www.wesnoth.org/ 3 4 This program is free software; you can redistribute it and/or modify 5 it under the terms of the GNU General Public License as published by 6 the Free Software Foundation; either version 2 of the License, or 7 (at your option) any later version. 8 This program is distributed in the hope that it will be useful, 9 but WITHOUT ANY WARRANTY. 10 11 See the COPYING file for more details. 12 */ 13 14 #pragma once 15 16 #include "gui/dialogs/modal_dialog.hpp" 17 #include "gui/widgets/group.hpp" 18 #include <map> 19 20 namespace gui2 21 { 22 namespace dialogs 23 { 24 25 class log_settings : public modal_dialog 26 { 27 public: 28 /** Constructor. */ 29 log_settings(); 30 31 /** 32 * The display function. 33 * 34 * See @ref modal_dialog for more information. 35 */ 36 DEFINE_SIMPLE_DISPLAY_WRAPPER(log_settings) 37 38 private: 39 void set_logger(const std::basic_string<char> log_domain); 40 41 std::map<std::string, group<std::string>> groups_; 42 std::vector<std::string> domain_list_, widget_id_; 43 44 /** Inherited from modal_dialog, implemented by REGISTER_DIALOG. */ 45 virtual const std::string& window_id() const override; 46 47 /** Inherited from modal_dialog. */ 48 virtual void pre_show(window& window) override; 49 50 /** Inherited from modal_dialog. */ 51 virtual void post_show(window& window) override; 52 53 }; 54 55 } // namespace dialogs 56 } // end namespace gui2 57