Sha256: 02f69454c43ef9d5bbd7cd521cbfa4266c6bde9aa168e94f029e00d0091e0894
Contents?: true
Size: 971 Bytes
Versions: 52
Compression:
Stored size: 971 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 require 'cosmos/tools/tlm_viewer/widgets/widget' module Cosmos class ProgressbarWidget < Qt::ProgressBar include Widget def initialize(parent_layout, target_name, packet_name, item_name, scale_factor = 1.0, width = 80, value_type = :CONVERTED) super(target_name, packet_name, item_name, value_type) @scale_factor = scale_factor.to_f self.setFixedWidth(width.to_i) parent_layout.addWidget(self) if parent_layout end def value=(value) setValue((value.to_f * @scale_factor).to_i) end def ProgressbarWidget.takes_value? return true end end end # module Cosmos
Version data entries
52 entries across 52 versions & 1 rubygems