Sha256: 5791b90452eb07f1ea55dd5e84ff2bc14384bf861a880dcc13056d9734b2dc75

Contents?: true

Size: 631 Bytes

Versions: 3

Compression:

Stored size: 631 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

3 entries across 3 versions & 1 rubygems

Version Path
clevic-0.13.0.b3 lib/clevic/qt/clipboard.rb
clevic-0.13.0.b2 lib/clevic/qt/clipboard.rb
clevic-0.13.0.b1 lib/clevic/qt/clipboard.rb