general-tab.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
  2. /*
  3. * general-tab.h
  4. * Copyright (C) 2017 Unknown <francois@gautrais.eu>
  5. *
  6. * histodexc is free software: you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License as published by the
  8. * Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * histodexc is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. * See the GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef _GENERAL_TAB_H_
  20. #define _GENERAL_TAB_H_
  21. #include "tab.h"
  22. #include "general.h"
  23. class StageTab;
  24. class GeneralTab : public Tab
  25. {
  26. public:
  27. GeneralTab(GtkWidget *window, GtkBuilder *builder, StageTab* st);
  28. virtual ~GeneralTab();
  29. virtual void write(const std::string& file);
  30. virtual Json::Value getJson(bool genFinal=false);
  31. virtual void open(Json::Value& val);
  32. virtual void on_save_clicked();
  33. int on_stage_changed();
  34. virtual void setupTab(Data& a);
  35. virtual void setLayout ();
  36. virtual Data& getTab(bool& genFinal);
  37. General getGeneral(){ bool b; return General::cast(getTab(b));}
  38. protected:
  39. GtkEntry* m_name;
  40. GtkSpinButton* m_stages;
  41. GtkFileChooserButton* m_dir;
  42. GtkFileChooserButton* m_map;
  43. GtkSwitch* m_useMap;
  44. StageTab* m_stage;
  45. };
  46. #endif // _GENERAL_TAB_H_