Sha256: 7d065c12a51e415c674e44744fe9546f8d5f9c669ff92ab53ea7d1734a8e465a

Contents?: true

Size: 1.59 KB

Versions: 25

Compression:

Stored size: 1.59 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

# This file contains the implementation and TlmDetailsDialog class.   This class
# is used to view a telemetry items settings typically on a right click.

require 'cosmos'
require 'cosmos/gui/dialogs/details_dialog'

module Cosmos

  class CmdDetailsDialog < DetailsDialog
    def initialize(parent, target_name, packet_name, item_name)
      super(parent, target_name, packet_name, item_name)

      begin
        packet = System.commands.packet(target_name, packet_name)
        item = packet.get_item(item_name)

        setWindowTitle("#{@target_name} #{@packet_name} #{@item_name} Details")

        layout = Qt::VBoxLayout.new
        layout.addWidget(Qt::Label.new("#{target_name} #{packet_name} #{item_name}"))

        # Display the parameter details
        item_details = Qt::GroupBox.new("Parameter Details")
        item_details.setLayout(build_details_layout(item, :CMD))
        layout.addWidget(item_details)

        # Add the OK button
        ok = Qt::PushButton.new("Ok")
        connect(ok, SIGNAL('clicked()'), self, SLOT('accept()'))
        layout.addWidget(ok)

        self.setLayout(layout)
        self.show
        self.raise
      rescue DRb::DRbConnError
        # Just do nothing
      end

    end
  end # class CmdDetailsDialog

end # module Cosmos

Version data entries

25 entries across 25 versions & 1 rubygems

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