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



368
369
370
# File 'lib/cosmos/gui/qt.rb', line 368

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

#checkState(column = 0) ⇒ Object



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

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

#childrenObject

Yields the children of the current node



361
362
363
364
365
# File 'lib/cosmos/gui/qt.rb', line 361

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

#font(column = 0) ⇒ Object



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

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

#foreground(column = 0) ⇒ Object



377
378
379
# File 'lib/cosmos/gui/qt.rb', line 377

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

#icon(column = 0) ⇒ Object



380
381
382
# File 'lib/cosmos/gui/qt.rb', line 380

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



339
340
341
342
343
344
# File 'lib/cosmos/gui/qt.rb', line 339

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

#sizeHint(column = 0) ⇒ Object



386
387
388
# File 'lib/cosmos/gui/qt.rb', line 386

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

#statusTip(column = 0) ⇒ Object



383
384
385
# File 'lib/cosmos/gui/qt.rb', line 383

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

#text(column = 0) ⇒ Object



389
390
391
# File 'lib/cosmos/gui/qt.rb', line 389

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

#toolTip(column = 0) ⇒ Object



392
393
394
# File 'lib/cosmos/gui/qt.rb', line 392

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.



349
350
351
352
353
354
355
356
357
358
# File 'lib/cosmos/gui/qt.rb', line 349

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



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

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