Sha256: c61782572275b9bc44e822477429bf2077539f66fa2c6fb75f9bc7afd048780d

Contents?: true

Size: 1.01 KB

Versions: 25

Compression:

Stored size: 1.01 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/gui/qt'

module Cosmos

  class ScrollTextDialog < Qt::Dialog
    def initialize(parent, title, text)
      super(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint)
      setMinimumWidth(700)
      setMinimumHeight(400)

      setWindowTitle(title)
      # Intentionally don't load icon as this can cause loop of unexpected output running with --debug

      layout = Qt::VBoxLayout.new
      text.gsub!("\n","<br>")
      @text_edit = Qt::TextEdit.new(text, self)
      @text_edit.setReadOnly(true)
      layout.addWidget(@text_edit)

      self.setLayout(layout)
      self.raise
      self.exec
      self.dispose
    end
  end # class ScrollTextDialog

end # module Cosmos

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
cosmos-3.8.3 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.8.2 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.8.1 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.8.0 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.7.1 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.7.0 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.6.3 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.6.2 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.6.1 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.6.0 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.5.3 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.5.2 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.5.0 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.4.2 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.4.1 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.4.0 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.3.3 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.3.2 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.3.1 lib/cosmos/gui/dialogs/scroll_text_dialog.rb
cosmos-3.3.0 lib/cosmos/gui/dialogs/scroll_text_dialog.rb