Class: Qt::SizeF
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
._load(str) ⇒ Object
201 202 203 204 |
# File 'lib/ruber/qt_sugar.rb', line 201 def self._load str w, h = str.split ';' self.new w.to_f, h.to_f end |
Instance Method Details
#_dump(_) ⇒ Object
193 194 195 196 197 198 199 |
# File 'lib/ruber/qt_sugar.rb', line 193 def _dump _ loc = Qt::Locale.c loc. = Qt::Locale::OmitGroupSeparator sw = loc.to_string width sh = loc.to_string height "#{sw};#{sh}" end |
#to_yaml(opts = {}) ⇒ Object
182 183 184 185 186 187 188 189 190 191 |
# File 'lib/ruber/qt_sugar.rb', line 182 def to_yaml opts = {} YAML.quick_emit(self, opts) do |out| out.map(taguri, to_yaml_style) do |map| loc = Qt::Locale.c loc. = Qt::Locale::OmitGroupSeparator map.add 'width', loc.to_string(width) map.add 'height', loc.to_string(height) end end end |