Sha256: de6f7ea57c05846a2347816d7984837abc1bed81fbdb79f339ba07926567e849

Contents?: true

Size: 719 Bytes

Versions: 24

Compression:

Stored size: 719 Bytes

Contents

# encoding: ascii-8bit

# Copyright 2014 Ball Aerospace & Technologies Corp.
# All Rights Reserved.
#
# This program is free software; you can modify and/or redistribute it
# under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 3 with
# attribution addendums as found in the LICENSE.txt

module Cosmos

  # Class to take screenshots of COSMOS windows
  class Screenshot

    # Take a screenshot of the given window
    def self.screenshot_window (window, filename)
      # Create a Pixmap to save the screenshot into
      pixmap = Qt::Pixmap::grabWindow(window.winId())
      pixmap.save(filename)
      pixmap
    end
  end # class Screenshot

end # module Cosmos

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
cosmos-3.8.2 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.8.1 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.8.0 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.7.1 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.7.0 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.6.3 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.6.2 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.6.1 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.6.0 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.5.3 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.5.2 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.5.0 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.4.2 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.4.1 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.4.0 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.3.3 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.3.2 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.3.1 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.3.0 lib/cosmos/gui/utilities/screenshot.rb
cosmos-3.2.1 lib/cosmos/gui/utilities/screenshot.rb