Sha256: 167d03d085f1d30a3744a65889b71d15dfae6ffe6bb390d05c3566749a36e19d

Contents?: true

Size: 889 Bytes

Versions: 64

Compression:

Stored size: 889 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'
require 'cosmos/gui/qt'
require 'cosmos/gui/text/completion_text_edit'

module Cosmos

  class CompletionLineEdit < CompletionTextEdit
    def initialize(parent)
      super(parent)
      setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff)
      setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff)
      setMaximumBlockCount(1)
      # Create a temporary LineEdit to figure out a good height
      line = Qt::LineEdit.new("ASDF99")
      setMaximumHeight(line.sizeHint.height)
      line.dispose
    end
  end

end # module Cosmos

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
cosmos-4.5.2-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.5.2 lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.5.1-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.5.1 lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.5.0-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.5.0 lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.4.2-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.4.2 lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.4.1-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.4.1 lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.4.0-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.4.0 lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.3.0-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.3.0 lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.2.4-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.2.4 lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.2.3-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.2.3 lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.2.2-java lib/cosmos/gui/text/completion_line_edit.rb
cosmos-4.2.2 lib/cosmos/gui/text/completion_line_edit.rb