Module: Qt::KeySequenceCodec
- Defined in:
- lib/qt/key_sequence_codec.rb
Overview
Conversion helpers for QKeySequence bridge arguments.
Class Method Summary collapse
Class Method Details
.encode(value) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/qt/key_sequence_codec.rb', line 8 def encode(value) return '' if value.nil? return Qt::StringCodec.to_qt_text(value) if value.is_a?(String) if value.respond_to?(:to_string) return Qt::StringCodec.to_qt_text(value.to_string) end if value.respond_to?(:toString) return Qt::StringCodec.to_qt_text(value.toString) end Qt::StringCodec.to_qt_text(value.to_s) end |