/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ /* * zone-tab.h * Copyright (C) 2017 Unknown * * histodexc 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. * * histodexc 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 . */ #ifndef _ZONE_TAB_H_ #define _ZONE_TAB_H_ #include "tab.h" class GWindow; class ResourceTab; class MapViewer; class Area; class ZoneTab : public Tab { public: ZoneTab(GtkWidget *window, GtkBuilder *builder, ResourceTab* tab); virtual ~ZoneTab(); virtual void on_save_clicked(); void on_save(); void on_save_angle(); void on_delete(); void on_select(); void on_dev_res(); void on_rm_zone(); void on_add_zone(); void on_select_res(); void on_save_switch(bool state); virtual void write(const std::string& file); virtual Json::Value getJson(bool genFinal=false); virtual void setupTab(Data& a); virtual Data& getTab(bool& genFinal); virtual void open(Json::Value& val); void remove(std::string name); void insert(const std::string& name, Area* val=0); Area* findArea(const std::string& name); std::vector& getAreas() {return m_areas;} protected: GtkEntry* m_name; GtkEntry* m_resource; GtkSpinButton* m_angle; GtkSpinButton* m_field; GtkSpinButton* m_radius; GtkTreeView* m_list; GtkListStore* m_listStore; GtkTreeView* m_listRes; GtkListStore* m_listResStore; GtkSwitch* m_useAngle; GtkBox* m_root; GtkBox* m_rootMap; GtkButton* m_devRes; GtkButton* m_rmZone; GtkButton* m_add; GtkButton* m_delete; MapViewer* m_map; std::vector m_areas; bool m_isLoading; ResourceTab* m_resTab; private: }; #endif // _ZONE_TAB_H_