Class: NodeinfoWidget
- Inherits:
-
Qt::Widget
- Object
- Qt::Widget
- NodeinfoWidget
- Defined in:
- lib/fgmapping/nodeinfo-impl.rb
Overview
Class MainDlg ############################################
Instance Attribute Summary collapse
-
#hover_on ⇒ Object
Returns the value of attribute hover_on.
-
#hover_widget_pos ⇒ Object
Returns the value of attribute hover_widget_pos.
-
#hovertimer ⇒ Object
readonly
Returns the value of attribute hovertimer.
-
#w ⇒ Object
readonly
Returns the value of attribute w.
Instance Method Summary collapse
- #hoverTimer ⇒ Object
-
#initialize(parent = nil) ⇒ NodeinfoWidget
constructor
A new instance of NodeinfoWidget.
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_on ⇒ Object
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_pos ⇒ Object
Returns the value of attribute hover_widget_pos.
13 14 15 |
# File 'lib/fgmapping/nodeinfo-impl.rb', line 13 def @hover_widget_pos end |
#hovertimer ⇒ Object (readonly)
Returns the value of attribute hovertimer.
13 14 15 |
# File 'lib/fgmapping/nodeinfo-impl.rb', line 13 def hovertimer @hovertimer end |
#w ⇒ Object (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
#hoverTimer ⇒ Object
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 |