Sha256: 608dd12746e81d67f541a607e9b477e84f6ce80390ed31ca3b206d70ec6c833b

Contents?: true

Size: 613 Bytes

Versions: 10

Compression:

Stored size: 613 Bytes

Contents

module Clevic

  # see swing clipboard if you need a stream with io/like

  # Clevic wrapper for Qt::Application::clipboard
  class Clipboard
    def system
      Qt::Application::clipboard
    end

    def text=( value )
      system.text = value
    end

    def text
      system.text
    end

    def text?
      system.mime_data.has_text
    end

    def html?
      system.mime_data.has_html
    end

    # TODO figure out why Qt never has anything other than text.
    # Could be because the event loop isn't running when testing
    # from irb.
    def html
      system.mime_data.html
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
clevic-0.14.6 lib/clevic/qt/clipboard.rb
clevic-0.14.5 lib/clevic/qt/clipboard.rb
clevic-0.14.4 lib/clevic/qt/clipboard.rb
clevic-0.14.3 lib/clevic/qt/clipboard.rb
clevic-0.14.2 lib/clevic/qt/clipboard.rb
clevic-0.14.1 lib/clevic/qt/clipboard.rb
clevic-0.14.0 lib/clevic/qt/clipboard.rb
clevic-0.13.0.b12 lib/clevic/qt/clipboard.rb
clevic-0.13.0.b11 lib/clevic/qt/clipboard.rb
clevic-0.13.0.b10 lib/clevic/qt/clipboard.rb