Class: Cosmos::CmdDetailsDialog
- Inherits:
-
DetailsDialog
- Object
- Qt::Dialog
- DetailsDialog
- Cosmos::CmdDetailsDialog
- Defined in:
- lib/cosmos/gui/dialogs/cmd_details_dialog.rb
Instance Method Summary collapse
-
#initialize(parent, target_name, packet_name, item_name) ⇒ CmdDetailsDialog
constructor
A new instance of CmdDetailsDialog.
Methods inherited from DetailsDialog
#build_details_layout, #closeEvent, #reject, #show_conversion, #show_data_type, #show_endianness, #show_nil
Methods inherited from Qt::Dialog
Constructor Details
#initialize(parent, target_name, packet_name, item_name) ⇒ CmdDetailsDialog
Returns a new instance of CmdDetailsDialog.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/cosmos/gui/dialogs/cmd_details_dialog.rb', line 20 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 |