Class: Ui_DataDisplays
- Defined in:
- lib/roby/log/gui/data_displays_ui.rb,
lib/roby/log/gui/data_displays.rb
Overview
** Form generated from reading ui file ‘data_displays.ui’ ** ** Created: Sat Jun 14 16:46:54 2008 ** by: Qt User Interface Compiler version 4.4.0 ** ** WARNING! All changes made in this file will be lost when recompiling ui file!
Direct Known Subclasses
Constant Summary collapse
- DISPLAYS =
{ 'Relations' => Ui::RelationsConfig, 'Chronicle' => Ui::ChronicleConfig, 'Notifications' => Ui::NotificationsConfig }
Instance Attribute Summary collapse
-
#add_stream ⇒ Object
readonly
Returns the value of attribute add_stream.
-
#display_add ⇒ Object
readonly
Returns the value of attribute display_add.
-
#display_configs ⇒ Object
readonly
Returns the value of attribute display_configs.
-
#display_types ⇒ Object
readonly
Returns the value of attribute display_types.
-
#displays ⇒ Object
readonly
Returns the value of attribute displays.
-
#displaysGroup ⇒ Object
readonly
Returns the value of attribute displaysGroup.
-
#groupBox ⇒ Object
readonly
Returns the value of attribute groupBox.
-
#hboxLayout ⇒ Object
readonly
Returns the value of attribute hboxLayout.
-
#hboxLayout1 ⇒ Object
readonly
Returns the value of attribute hboxLayout1.
-
#remove_stream ⇒ Object
readonly
Returns the value of attribute remove_stream.
-
#spacerItem ⇒ Object
readonly
Returns the value of attribute spacerItem.
-
#streams ⇒ Object
readonly
Returns the value of attribute streams.
-
#vboxLayout ⇒ Object
readonly
Returns the value of attribute vboxLayout.
-
#vboxLayout1 ⇒ Object
readonly
Returns the value of attribute vboxLayout1.
-
#vboxLayout2 ⇒ Object
readonly
Returns the value of attribute vboxLayout2.
Instance Method Summary collapse
- #add_display(streams, kind = nil) ⇒ Object
- #allocate_display_number ⇒ Object
-
#initialize ⇒ Ui_DataDisplays
constructor
A new instance of Ui_DataDisplays.
-
#retranslate_ui(dataDisplays) ⇒ Object
retranslateUi.
- #retranslateUi(dataDisplays) ⇒ Object
-
#setup_ui(dataDisplays) ⇒ Object
setupUi.
- #setupUi(dataDisplays) ⇒ Object
Constructor Details
#initialize ⇒ Ui_DataDisplays
Returns a new instance of Ui_DataDisplays.
124 125 126 127 128 129 |
# File 'lib/roby/log/gui/data_displays.rb', line 124 def initialize super() @displays = Hash.new @display_number = 0 end |
Instance Attribute Details
#add_stream ⇒ Object (readonly)
Returns the value of attribute add_stream.
17 18 19 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 17 def add_stream @add_stream end |
#display_add ⇒ Object (readonly)
Returns the value of attribute display_add.
23 24 25 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 23 def display_add @display_add end |
#display_configs ⇒ Object (readonly)
Returns the value of attribute display_configs.
24 25 26 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 24 def display_configs @display_configs end |
#display_types ⇒ Object (readonly)
Returns the value of attribute display_types.
22 23 24 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 22 def display_types @display_types end |
#displays ⇒ Object (readonly)
Returns the value of attribute displays.
122 123 124 |
# File 'lib/roby/log/gui/data_displays.rb', line 122 def displays @displays end |
#displaysGroup ⇒ Object (readonly)
Returns the value of attribute displaysGroup.
19 20 21 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 19 def displaysGroup @displaysGroup end |
#groupBox ⇒ Object (readonly)
Returns the value of attribute groupBox.
12 13 14 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 12 def groupBox @groupBox end |
#hboxLayout ⇒ Object (readonly)
Returns the value of attribute hboxLayout.
15 16 17 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 15 def hboxLayout @hboxLayout end |
#hboxLayout1 ⇒ Object (readonly)
Returns the value of attribute hboxLayout1.
21 22 23 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 21 def hboxLayout1 @hboxLayout1 end |
#remove_stream ⇒ Object (readonly)
Returns the value of attribute remove_stream.
18 19 20 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 18 def remove_stream @remove_stream end |
#spacerItem ⇒ Object (readonly)
Returns the value of attribute spacerItem.
16 17 18 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 16 def spacerItem @spacerItem end |
#streams ⇒ Object (readonly)
Returns the value of attribute streams.
14 15 16 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 14 def streams @streams end |
#vboxLayout ⇒ Object (readonly)
Returns the value of attribute vboxLayout.
11 12 13 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 11 def vboxLayout @vboxLayout end |
#vboxLayout1 ⇒ Object (readonly)
Returns the value of attribute vboxLayout1.
13 14 15 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 13 def vboxLayout1 @vboxLayout1 end |
#vboxLayout2 ⇒ Object (readonly)
Returns the value of attribute vboxLayout2.
20 21 22 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 20 def vboxLayout2 @vboxLayout2 end |
Instance Method Details
#add_display(streams, kind = nil) ⇒ Object
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/roby/log/gui/data_displays.rb', line 132 def add_display(streams, kind = nil) kind ||= display_types.current_text begin = DisplayConfigHandler.new config_ui = DISPLAYS[kind].new rescue Exception => e Qt::MessageBox.critical nil, "Cannot create display", "cannot create display #{kind}: #{e.message}" return end display = config_ui.setupUi(streams, ) name = "#{kind}##{allocate_display_number}" idx = display_configs.add_item(, name) display_configs.current_index = idx displays[config_ui] = display display.main.window_title = name display.main.show display.config_ui = config_ui main_window = display.main main_window.singleton_class.class_eval do define_method(:closeEvent) do |event| config_ui.close.clicked end end .setup(self, config_ui) display end |
#allocate_display_number ⇒ Object
131 |
# File 'lib/roby/log/gui/data_displays.rb', line 131 def allocate_display_number; @display_number += 1 end |
#retranslate_ui(dataDisplays) ⇒ Object
retranslateUi
136 137 138 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 136 def retranslate_ui(dataDisplays) retranslateUi(dataDisplays) end |
#retranslateUi(dataDisplays) ⇒ Object
124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 124 def retranslateUi(dataDisplays) dataDisplays.windowTitle = Qt::Application.translate("DataDisplays", "Form", nil, Qt::Application::UnicodeUTF8) @groupBox.title = Qt::Application.translate("DataDisplays", "Data sources", nil, Qt::Application::UnicodeUTF8) @add_stream.text = Qt::Application.translate("DataDisplays", "&Add", nil, Qt::Application::UnicodeUTF8) @remove_stream.text = Qt::Application.translate("DataDisplays", "Remove", nil, Qt::Application::UnicodeUTF8) @displaysGroup.title = Qt::Application.translate("DataDisplays", "Displays", nil, Qt::Application::UnicodeUTF8) @display_types.insertItems(0, [Qt::Application.translate("DataDisplays", "Relations", nil, Qt::Application::UnicodeUTF8), Qt::Application.translate("DataDisplays", "Chronicle", nil, Qt::Application::UnicodeUTF8), Qt::Application.translate("DataDisplays", "Notifications", nil, Qt::Application::UnicodeUTF8)]) @display_add.text = Qt::Application.translate("DataDisplays", "&Add", nil, Qt::Application::UnicodeUTF8) end |
#setup_ui(dataDisplays) ⇒ Object
setupUi
120 121 122 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 120 def setup_ui(dataDisplays) setupUi(dataDisplays) end |
#setupUi(dataDisplays) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/roby/log/gui/data_displays_ui.rb', line 26 def setupUi(dataDisplays) if dataDisplays.objectName.nil? dataDisplays.objectName = "dataDisplays" end dataDisplays.resize(548, 508) @vboxLayout = Qt::VBoxLayout.new(dataDisplays) @vboxLayout.spacing = 6 @vboxLayout.margin = 9 @vboxLayout.objectName = "vboxLayout" @groupBox = Qt::GroupBox.new(dataDisplays) @groupBox.objectName = "groupBox" @vboxLayout1 = Qt::VBoxLayout.new(@groupBox) @vboxLayout1.spacing = 6 @vboxLayout1.margin = 9 @vboxLayout1.objectName = "vboxLayout1" @streams = Qt::ListView.new(@groupBox) @streams.objectName = "streams" @vboxLayout1.addWidget(@streams) @hboxLayout = Qt::HBoxLayout.new() @hboxLayout.spacing = 6 @hboxLayout.margin = 0 @hboxLayout.objectName = "hboxLayout" @spacerItem = Qt::SpacerItem.new(40, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum) @hboxLayout.addItem(@spacerItem) @add_stream = Qt::PushButton.new(@groupBox) @add_stream.objectName = "add_stream" @hboxLayout.addWidget(@add_stream) @remove_stream = Qt::PushButton.new(@groupBox) @remove_stream.objectName = "remove_stream" @hboxLayout.addWidget(@remove_stream) @vboxLayout1.addLayout(@hboxLayout) @vboxLayout.addWidget(@groupBox) @displaysGroup = Qt::GroupBox.new(dataDisplays) @displaysGroup.objectName = "displaysGroup" @vboxLayout2 = Qt::VBoxLayout.new(@displaysGroup) @vboxLayout2.spacing = 6 @vboxLayout2.margin = 9 @vboxLayout2.objectName = "vboxLayout2" @hboxLayout1 = Qt::HBoxLayout.new() @hboxLayout1.spacing = 6 @hboxLayout1.margin = 0 @hboxLayout1.objectName = "hboxLayout1" @display_types = Qt::ComboBox.new(@displaysGroup) @display_types.objectName = "display_types" @sizePolicy = Qt::SizePolicy.new(5, 0) @sizePolicy.setHorizontalStretch(1) @sizePolicy.setVerticalStretch(0) @sizePolicy.heightForWidth = @display_types.sizePolicy.hasHeightForWidth @display_types.sizePolicy = @sizePolicy @hboxLayout1.addWidget(@display_types) @display_add = Qt::PushButton.new(@displaysGroup) @display_add.objectName = "display_add" @hboxLayout1.addWidget(@display_add) @vboxLayout2.addLayout(@hboxLayout1) @display_configs = Qt::ToolBox.new(@displaysGroup) @display_configs.objectName = "display_configs" @sizePolicy1 = Qt::SizePolicy.new(5, 3) @sizePolicy1.setHorizontalStretch(0) @sizePolicy1.setVerticalStretch(0) @sizePolicy1.heightForWidth = @display_configs.sizePolicy.hasHeightForWidth @display_configs.sizePolicy = @sizePolicy1 @vboxLayout2.addWidget(@display_configs) @vboxLayout.addWidget(@displaysGroup) retranslateUi(dataDisplays) @display_configs.setCurrentIndex(-1) Qt::MetaObject.connectSlotsByName(dataDisplays) end |