Sha256: 9dc11383a1f5f6c31c4ca54fd7d6f198220370b6b48f492e46bc7ac8f9ce42a2
Contents?: true
Size: 1.15 KB
Versions: 52
Compression:
Stored size: 1.15 KB
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' require 'cosmos/tools/tlm_viewer/widgets/widget' require 'cosmos/tools/tlm_viewer/widgets/aging_widget' module Cosmos class ValueWidget < Qt::LineEdit include Widget include AgingWidget def initialize(parent_layout, target_name, packet_name, item_name, value_type = :WITH_UNITS, characters = 12) super(target_name, packet_name, item_name, value_type) setup_aging @characters = characters.to_i setReadOnly(true) setAlignment(Qt::AlignRight) setFixedWidth(fontMetrics.width('X') * @characters + 10) parent_layout.addWidget(self) if parent_layout end def value=(data) self.text = super(data) setColors(@foreground, @background) end def process_settings super process_aging_settings end end end # module Cosmos
Version data entries
52 entries across 52 versions & 1 rubygems