#ifndef VERSION_H_C757E53C #define VERSION_H_C757E53C #include #include struct Version { int major = 0; int minor = 0; int revision = 0; constexpr Version(int major_arg, int minor_arg, int rev_arg) : major(major_arg), minor(minor_arg), revision(rev_arg) {} Version(const std::string& ver_str) { const std::regex version_regex("v([0-9]*)\.([0-9]*)\.([0-9]*)"); std::smatch version_match; if (std::regex_match(ver_str, version_match, version_regex)) { major = std::atoi(version_match[1].str().c_str()); minor = std::atoi(version_match[2].str().c_str()); revision = std::atoi(version_match[3].str().c_str()); } } std::string ToString() const { std::ostringstream output; output << "v" << major << "." << minor << "." << revision; return output.str(); } bool operator<(const Version& rhs) const { return (major < rhs.major) || (major == rhs.major && (minor < rhs.minor || (minor == rhs.minor && revision < rhs.revision))); } }; constexpr const Version kTrackerVersion = Version(0, 10, 0); #endif /* end of include guard: VERSION_H_C757E53C */ation
about summary refs log tree commit diff stats
blob: d7c1ed3f5071e1eeda7385465df94b3fc6daaa94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef SETTINGS_DIALOG_H_D8635719
#define SETTINGS_DIALOG_H_D8635719

#include <wx/wxprec.h>

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

class SettingsDialog : public wxDialog {
 public:
  SettingsDialog();

  bool GetShouldCheckForUpdates() const {
    return should_check_for_updates_box_->GetValue();
  }
  bool GetHybridAreas() const { return hybrid_areas_box_->GetValue(); }
  bool GetShowHuntPanels() const { return show_hunt_panels_box_->GetValue(); }

 private:
  wxCheckBox* should_check_for_updates_box_;
  wxCheckBox* hybrid_areas_box_;
  wxCheckBox* show_hunt_panels_box_;
};

#endif /* end of include guard: SETTINGS_DIALOG_H_D8635719 */