Class: Qt::PointF
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
._load(str) ⇒ Object
136 137 138 139 |
# File 'lib/ruber/qt_sugar.rb', line 136 def self._load str x, y = str.split ';' self.new x.to_f, y.to_f end |
Instance Method Details
#_dump(_) ⇒ Object
128 129 130 131 132 133 134 |
# File 'lib/ruber/qt_sugar.rb', line 128 def _dump _ loc = Qt::Locale.c loc. = Qt::Locale::OmitGroupSeparator sx = loc.to_string( self.x ) sy = loc.to_string( self.y ) "#{sx};#{sy}" end |
#to_yaml(opts = {}) ⇒ Object
117 118 119 120 121 122 123 124 125 126 |
# File 'lib/ruber/qt_sugar.rb', line 117 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 'x', loc.to_string( self.x ) map.add 'y', loc.to_string( self.y ) end end end |