Class: NodeinfoWidget

Inherits:
Qt::Widget
  • Object
show all
Defined in:
lib/fgmapping/nodeinfo-impl.rb

Overview

Class MainDlg ############################################

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent = nil) ⇒ NodeinfoWidget

Returns a new instance of NodeinfoWidget.



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/fgmapping/nodeinfo-impl.rb', line 16

def initialize parent=nil
	super()
	@w=Ui::NodeinfoWidget.new
	@w.setupUi(self)
	@parent=parent

	@hovertimer = Qt::Timer.new()
	@hovertimer.setSingleShot(true)
	Qt::Object.connect( @hovertimer, SIGNAL('timeout()'), self, SLOT('hoverTimer()') )

	@hover_on=false
	@hover_widget_pos=nil
end

Instance Attribute Details

#hover_onObject

Returns the value of attribute hover_on.



13
14
15
# File 'lib/fgmapping/nodeinfo-impl.rb', line 13

def hover_on
  @hover_on
end

#hover_widget_posObject

Returns the value of attribute hover_widget_pos.



13
14
15
# File 'lib/fgmapping/nodeinfo-impl.rb', line 13

def hover_widget_pos
  @hover_widget_pos
end

#hovertimerObject (readonly)

Returns the value of attribute hovertimer.



13
14
15
# File 'lib/fgmapping/nodeinfo-impl.rb', line 13

def hovertimer
  @hovertimer
end

#wObject (readonly)

Returns the value of attribute w.



13
14
15
# File 'lib/fgmapping/nodeinfo-impl.rb', line 13

def w
  @w
end

Instance Method Details

#hoverTimerObject



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/fgmapping/nodeinfo-impl.rb', line 30

def hoverTimer()
	p "timer fired"
	if @hover_on then
		@parent.scene.items.each {|item|
			if item.kind_of? Qt::GraphicsRectItem then
				if item == @parent then
					item.setVisible(false)
					break
				end
			end
			}
		@hover_widget_pos = nil
		@hover_on = false
	end
	p "timer fired out"
end