Class: Cosmos::CompletionLineEdit

Inherits:
CompletionTextEdit show all
Defined in:
lib/cosmos/gui/text/completion_line_edit.rb

Constant Summary

Constants inherited from CompletionTextEdit

Cosmos::CompletionTextEdit::SELECTION_DETAILS_POOL, Cosmos::CompletionTextEdit::TRUE_VARIANT

Constants inherited from Qt::PlainTextEdit

Qt::PlainTextEdit::AMP, Qt::PlainTextEdit::BLANK, Qt::PlainTextEdit::BREAK, Qt::PlainTextEdit::GT, Qt::PlainTextEdit::LT, Qt::PlainTextEdit::NBSP

Instance Method Summary collapse

Methods inherited from CompletionTextEdit

#dispose, #highlight_line, #indent_selection, #keyPressCallback=, #keyPressEvent, #rehighlight, #stop_highlight, #unindent_selection

Methods inherited from Qt::PlainTextEdit

#addText, #add_formatted_text, #appendText, #flush, #selected_lines, #selection_end_line, #selection_start_line

Constructor Details

#initialize(parent) ⇒ CompletionLineEdit

Returns a new instance of CompletionLineEdit.



18
19
20
21
22
23
24
25
26
27
# File 'lib/cosmos/gui/text/completion_line_edit.rb', line 18

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