Class: Qt::TreeWidgetItem

Inherits:
Object show all
Defined in:
lib/cosmos/gui/qt.rb

Instance Method Summary collapse

Instance Method Details

#background(column = 0) ⇒ Object

Define the default column to be 0



400
401
402
# File 'lib/cosmos/gui/qt.rb', line 400

def background(column = 0)
  super(column)
end

#checkState(column = 0) ⇒ Object



403
404
405
# File 'lib/cosmos/gui/qt.rb', line 403

def checkState(column = 0)
  super(column)
end

#childrenObject

Yields the children of the current node



393
394
395
396
397
# File 'lib/cosmos/gui/qt.rb', line 393

def children
  childCount.times do |index|
    yield child(index)
  end
end

#font(column = 0) ⇒ Object



406
407
408
# File 'lib/cosmos/gui/qt.rb', line 406

def font(column = 0)
  super(column)
end

#foreground(column = 0) ⇒ Object



409
410
411
# File 'lib/cosmos/gui/qt.rb', line 409

def foreground(column = 0)
  super(column)
end

#icon(column = 0) ⇒ Object



412
413
414
# File 'lib/cosmos/gui/qt.rb', line 412

def icon(column = 0)
  super(column)
end

#setCheckStateAll(state = Qt::Checked) ⇒ Object

Sets the check state of this TreeWidgetItem as well as all its children recursively.

Parameters:

  • state (Integer) (defaults to: Qt::Checked)

    Must be Qt::Checked or Qt::Unchecked



371
372
373
374
375
376
# File 'lib/cosmos/gui/qt.rb', line 371

def setCheckStateAll(state = Qt::Checked)
  children() do |child|
    child.setCheckStateAll(state)
  end
  setCheckState(0, state)
end

#sizeHint(column = 0) ⇒ Object



418
419
420
# File 'lib/cosmos/gui/qt.rb', line 418

def sizeHint(column = 0)
  super(column)
end

#statusTip(column = 0) ⇒ Object



415
416
417
# File 'lib/cosmos/gui/qt.rb', line 415

def statusTip(column = 0)
  super(column)
end

#text(column = 0) ⇒ Object



421
422
423
# File 'lib/cosmos/gui/qt.rb', line 421

def text(column = 0)
  super(column)
end

#toolTip(column = 0) ⇒ Object



424
425
426
# File 'lib/cosmos/gui/qt.rb', line 424

def toolTip(column = 0)
  super(column)
end

#topLevelQt::TreeWidgetItem

Returns The top level item for this TreeWidgetItem. The top level item does not have a parent. Note that this could return itself.

Returns:

  • (Qt::TreeWidgetItem)

    The top level item for this TreeWidgetItem. The top level item does not have a parent. Note that this could return itself.



381
382
383
384
385
386
387
388
389
390
# File 'lib/cosmos/gui/qt.rb', line 381

def topLevel
  top = self
  if !top.parent.nil?
    while true
      top = top.parent
      break if top.parent.nil?
    end
  end
  top
end

#whatsThis(column = 0) ⇒ Object



427
428
429
# File 'lib/cosmos/gui/qt.rb', line 427

def whatsThis(column = 0)
  super(column)
end