Class: Qt::RectF
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
._load(str) ⇒ Object
273 274 275 276 |
# File 'lib/ruber/qt_sugar.rb', line 273 def self._load str l, t, w, h = str.split ';' self.new l.to_f, t.to_f, w.to_f, h.to_f end |
Instance Method Details
#_dump(_) ⇒ Object
263 264 265 266 267 268 269 270 271 |
# File 'lib/ruber/qt_sugar.rb', line 263 def _dump _ loc = Qt::Locale.c loc. = Qt::Locale::OmitGroupSeparator sl = loc.to_string left st = loc.to_string top sw = loc.to_string width sh = loc.to_string height "#{sl};#{st};#{sw};#{sh}" end |
#to_yaml(opts = {}) ⇒ Object
250 251 252 253 254 255 256 257 258 259 260 261 |
# File 'lib/ruber/qt_sugar.rb', line 250 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 'left', loc.to_string(left) map.add 'top', loc.to_string(top) map.add 'width', loc.to_string(width) map.add 'height', loc.to_string(height) end end end |