Member functions changed to const

The following member functions and methods of SpotPicker changed to const:
- get_active()
- get_spot_half_width()
- selecterSetup()
- spotButtonTemplate().
This commit is contained in:
Dániel Battyányi
2023-08-20 13:38:24 +02:00
parent af22f4195d
commit 6b6200314f
2 changed files with 6 additions and 6 deletions

View File

@@ -1989,7 +1989,7 @@ Gtk::Label SpotPicker::labelSetup(Glib::ustring const &key) const
return label; return label;
} }
MyComboBoxText SpotPicker::selecterSetup() MyComboBoxText SpotPicker::selecterSetup() const
{ {
MyComboBoxText spotSize = MyComboBoxText(); MyComboBoxText spotSize = MyComboBoxText();
setExpandAlignProperties(&spotSize, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); setExpandAlignProperties(&spotSize, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
@@ -2025,7 +2025,7 @@ MyComboBoxText SpotPicker::selecterSetup()
return spotSize; return spotSize;
} }
Gtk::ToggleButton SpotPicker::spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip) Gtk::ToggleButton SpotPicker::spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip) const
{ {
Gtk::ToggleButton spotButton = Gtk::ToggleButton(key); Gtk::ToggleButton spotButton = Gtk::ToggleButton(key);
setExpandAlignProperties(&spotButton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); setExpandAlignProperties(&spotButton, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);

View File

@@ -728,7 +728,7 @@ class SpotPicker : public Gtk::Grid
Gtk::ToggleButton _spotButton; Gtk::ToggleButton _spotButton;
public: public:
SpotPicker(int const defaultValue, Glib::ustring const &buttonKey, Glib::ustring const &buttonTooltip, Glib::ustring const &labelKey); SpotPicker(int const defaultValue, Glib::ustring const &buttonKey, Glib::ustring const &buttonTooltip, Glib::ustring const &labelKey);
inline bool get_active() inline bool get_active() const
{ {
return _spotButton.get_active(); return _spotButton.get_active();
} }
@@ -736,7 +736,7 @@ class SpotPicker : public Gtk::Grid
{ {
_spotButton.set_active(b); _spotButton.set_active(b);
} }
int get_spot_half_width() int get_spot_half_width() const
{ {
return _spotHalfWidth; return _spotHalfWidth;
} }
@@ -751,8 +751,8 @@ class SpotPicker : public Gtk::Grid
protected: protected:
Gtk::Label labelSetup(Glib::ustring const &key) const; Gtk::Label labelSetup(Glib::ustring const &key) const;
MyComboBoxText selecterSetup(); MyComboBoxText selecterSetup() const;
static Gtk::ToggleButton spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip); Gtk::ToggleButton spotButtonTemplate(Glib::ustring const &key, const Glib::ustring &tooltip) const;
void spotSizeChanged(); void spotSizeChanged();
}; };