class Qt::TreeWidgetItem

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 2186
def initialize(*args)
  # There is not way to distinguish between the copy constructor
  # QTreeWidgetItem (const QTreeWidgetItem & other)
  # and
  # QTreeWidgetItem (QTreeWidgetItem * parent, const QStringList & strings, int type = Type)
  # when the latter has a single argument. So force the second variant to be called
  if args.length == 1 && args[0].kind_of?(Qt::TreeWidgetItem)
    super(args[0], Qt::TreeWidgetItem::Type)
  else
    super(*args)
  end
end

Public Instance Methods

clone(*args) click to toggle source
# File lib/Qt/qtruby4.rb, line 2220
def clone(*args)
  Qt::TreeWidgetItem.new(self)
end
each() { |current| ... } click to toggle source
# File lib/Qt/qtruby4.rb, line 2228
def each
  it = Qt::TreeWidgetItemIterator.new(self)
  while it.current
    yield it.current
    it += 1
  end
end
inspect() click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 2199
def inspect
  str = super
  str.sub!(/>$/, "")
  str << " parent=%s," % parent unless parent.nil?
  for i in 0..(columnCount - 1)
    str << " text%d='%s'," % [i, self.text(i)]
  end
  str.sub!(/,?$/, ">")
end
pretty_print(pp) click to toggle source
# File lib/Qt/qtruby4.rb, line 2209
def pretty_print(pp)
  str = to_s
  str.sub!(/>$/, "")
  str << " parent=%s," % parent unless parent.nil?
  for i in 0..(columnCount - 1)
    str << " text%d='%s'," % [i, self.text(i)]
  end
  str.sub!(/,?$/, ">")
  pp.text str
end
type(*args) click to toggle source
# File lib/Qt/qtruby4.rb, line 2224
def type(*args)
  method_missing(:type, *args)
end