Method: WorldMapDlg#initialize
- Defined in:
- lib/WorldMapDlg.rb
#initialize(parent = nil, name = nil, fl = 0) ⇒ WorldMapDlg
Returns a new instance of WorldMapDlg.
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 |
# File 'lib/WorldMapDlg.rb', line 34 def initialize(parent = nil, name = nil, fl = 0) super if name.nil? setName("WorldMapDlg") end setSizePolicy(Qt::SizePolicy.new(5, 5, 0, 0, self.sizePolicy().hasHeightForWidth())) @WorldMapDlgLayout = Qt::GridLayout.new(self, 1, 1, 11, 6, 'WorldMapDlgLayout') @mapFrame = Qt::GroupBox.new(self, "mapFrame") @WorldMapDlgLayout.addMultiCellWidget(@mapFrame, 0, 0, 0, 10) @spacer4 = Qt::SpacerItem.new(30, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum) @WorldMapDlgLayout.addItem(@spacer4, 1, 9) @textLabel2 = Qt::Label.new(self, "textLabel2") @WorldMapDlgLayout.addWidget(@textLabel2, 1, 8) @lastMinutes = Qt::SpinBox.new(self, "lastMinutes") @lastMinutes.setEnabled( false ) @lastMinutes.setMaxValue( 32767 ) @lastMinutes.setMinValue( 1 ) @WorldMapDlgLayout.addWidget(@lastMinutes, 1, 7) @spacer7 = Qt::SpacerItem.new(20, 21, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum) @WorldMapDlgLayout.addItem(@spacer7, 1, 5) @showRoutersCB = Qt::CheckBox.new(self, "showRoutersCB") @WorldMapDlgLayout.addWidget(@showRoutersCB, 1, 3) @showIPsCB = Qt::CheckBox.new(self, "showIPsCB") @WorldMapDlgLayout.addWidget(@showIPsCB, 1, 0) @showHostNamesCB = Qt::CheckBox.new(self, "showHostNamesCB") @WorldMapDlgLayout.addWidget(@showHostNamesCB, 1, 1) @showCitiesCB = Qt::CheckBox.new(self, "showCitiesCB") @WorldMapDlgLayout.addWidget(@showCitiesCB, 1, 2) @showRoutesCB = Qt::CheckBox.new(self, "showRoutesCB") @WorldMapDlgLayout.addWidget(@showRoutesCB, 1, 4) @showLastCB = Qt::CheckBox.new(self, "showLastCB") @WorldMapDlgLayout.addWidget(@showLastCB, 1, 6) @closeBtn = Qt::PushButton.new(self, "closeBtn") @WorldMapDlgLayout.addWidget(@closeBtn, 1, 10) languageChange() resize( Qt::Size.new(1033, 878).(minimumSizeHint()) ) clearWState( WState_Polished ) Qt::Object.connect(@showCitiesCB, SIGNAL("toggled(bool)"), self, SLOT("showCitiesCBToggled(bool)") ) Qt::Object.connect(@showIPsCB, SIGNAL("toggled(bool)"), self, SLOT("showIPsCBToggled(bool)") ) Qt::Object.connect(@showRoutesCB, SIGNAL("toggled(bool)"), self, SLOT("showRoutesCBToggled(bool)") ) Qt::Object.connect(@closeBtn, SIGNAL("clicked()"), self, SLOT("close()") ) Qt::Object.connect(@showHostNamesCB, SIGNAL("toggled(bool)"), self, SLOT("showHostNamesCBToggled(bool)") ) Qt::Object.connect(@showLastCB, SIGNAL("toggled(bool)"), self, SLOT("showLastCBToggled(bool)") ) Qt::Object.connect(@lastMinutes, SIGNAL("valueChanged(int)"), self, SLOT("lastMinutesValueChanged(int)") ) Qt::Object.connect(@showRoutersCB, SIGNAL("toggled(bool)"), self, SLOT("showRoutersCBToggled(bool)") ) setTabOrder(@showIPsCB, @showHostNamesCB) setTabOrder(@showHostNamesCB, @showCitiesCB) setTabOrder(@showCitiesCB, @showRoutersCB) setTabOrder(@showRoutersCB, @showRoutesCB) setTabOrder(@showRoutesCB, @showLastCB) setTabOrder(@showLastCB, @lastMinutes) setTabOrder(@lastMinutes, @closeBtn) end |