Sha256: b7b4fbac23121753bb0bf41221573757627476f141ef3c25bca24579ffc84c01

Contents?: true

Size: 721 Bytes

Versions: 12

Compression:

Stored size: 721 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
  # Creates a text field
  class TextfieldWidget < Qt::LineEdit
    include Widget

    def initialize(parent_layout, num_characters = 12, default_text = '')
      super()
      setText(default_text.to_s)
      setMaxLength(num_characters.to_i)
      parent_layout.addWidget(self) if parent_layout
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cosmos-4.5.2-java lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.5.2 lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.5.1-java lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.5.1 lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.5.0-java lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.5.0 lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.4.2-java lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.4.2 lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.4.1-java lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.4.1 lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.4.0-java lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb
cosmos-4.4.0 lib/cosmos/tools/tlm_viewer/widgets/textfield_widget.rb