YggdrasilWM  0.1.1
A tiny window manager coded in C++
ConfigDataBar.hpp
Go to the documentation of this file.
1 
27 #ifndef YGGDRASILWM_CONFIGDATAGROUP_HPP
28 #define YGGDRASILWM_CONFIGDATAGROUP_HPP
30 #include "json/json.h"
31 #include <string>
32 #include <vector>
33 class ConfigDataWidget;
42 public:
47  ConfigDataBar();
48  ~ConfigDataBar() override = default;
56  void configInit(const Json::Value& root) override;
61  Json::Value configSave() override;
67  [[nodiscard]] int getBarSize() const;
72  [[nodiscard]] const std::string &getBarFont() const;
77  [[nodiscard]] unsigned int getBarFontColor() const;
82  [[nodiscard]] int getBarFontSize() const;
87  [[nodiscard]] unsigned int getBarBackgroundColor() const;
92  [[nodiscard]] int getBarBorderSize() const;
97  [[nodiscard]] unsigned int getBarBorderColor() const;
98  [[nodiscard]] const std::string &getBarPosition() const;
99  const std::vector<std::shared_ptr<ConfigDataWidget>> &getWidgets() const;
100 
101 private:
102  int barSize_;
103  std::string barFont_;
104  std::string barPosition_;
105  unsigned int barFontColor_;
107  unsigned int barBackgroundColor_;
109  unsigned int barBorderColor_;
110  std::vector<std::shared_ptr<ConfigDataWidget>> widgets;
111 
112 };
113 
114 #endif //YGGDRASILWM_CONFIGDATAGROUP_HPP
ConfigDataBase class header. This class is an interface for the ConfigData classes.
ConfigDataBar class Contains the configuration data for one bar in the window manager Inherits from C...
Definition: ConfigDataBar.hpp:41
int barBorderSize_
Definition: ConfigDataBar.hpp:108
~ConfigDataBar() override=default
std::vector< std::shared_ptr< ConfigDataWidget > > widgets
Definition: ConfigDataBar.hpp:110
unsigned int getBarBorderColor() const
Get the Bar Border Color.
Definition: ConfigDataBar.cpp:111
unsigned int getBarFontColor() const
Get the Bar Font Color.
Definition: ConfigDataBar.cpp:107
unsigned int barBorderColor_
Definition: ConfigDataBar.hpp:109
int getBarBorderSize() const
Get the Bar Border Size.
Definition: ConfigDataBar.cpp:110
Json::Value configSave() override
return a Json::Value object containing the Bar configuration data
Definition: ConfigDataBar.cpp:102
int getBarSize() const
Get the Bar Heightb.
Definition: ConfigDataBar.cpp:105
int barSize_
Definition: ConfigDataBar.hpp:102
int getBarFontSize() const
Get the Bar Font Size.
Definition: ConfigDataBar.cpp:108
int barFontSize_
Definition: ConfigDataBar.hpp:106
unsigned int barBackgroundColor_
Definition: ConfigDataBar.hpp:107
void configInit(const Json::Value &root) override
Initializes the configuration data for the bar You must call configInit() in each ConfigDataBase Chil...
Definition: ConfigDataBar.cpp:46
unsigned int getBarBackgroundColor() const
Get the Bar Background Color.
Definition: ConfigDataBar.cpp:109
const std::vector< std::shared_ptr< ConfigDataWidget > > & getWidgets() const
Definition: ConfigDataBar.cpp:114
ConfigDataBar()
ConfigDataBar class constructor.
Definition: ConfigDataBar.cpp:36
const std::string & getBarFont() const
Get the Bar Font.
Definition: ConfigDataBar.cpp:106
std::string barPosition_
Definition: ConfigDataBar.hpp:104
const std::string & getBarPosition() const
Definition: ConfigDataBar.cpp:112
std::string barFont_
Definition: ConfigDataBar.hpp:103
unsigned int barFontColor_
Definition: ConfigDataBar.hpp:105
ConfigDataBase class This class is an interface for the ConfigData classes This is a pure virtual cla...
Definition: ConfigDataBase.hpp:38
Definition: ConfigDataWidget.hpp:33