# This file is generated by rbkconfig_compiler from test8b.kcfg.
# All changes you do to this file will be lost.

require 'singleton'

class Test8b < Test8a
  include Singleton

  #
  # Set Something
  #
  def setSomething(v)
    item = findItem("Something")
    if !item.immutable?
      item.property = @something = Qt::Variant.fromValue(v)
    end
  end

  def something=(v)
    setSomething(v)
  end

  #
  # Get Something
  #
  def something
    @something = findItem("Something").property
    return @something.value
  end

  #
  # Set FooBoo
  #
  def setFooBoo(v)
    item = findItem("FooBoo")
    if !item.immutable?
      item.property = @fooBoo = Qt::Variant.fromValue(v)
    end
  end

  def fooBoo=(v)
    setFooBoo(v)
  end

  #
  # Get FooBoo
  #
  def fooBoo
    @fooBoo = findItem("FooBoo").property
    return @fooBoo.value
  end

  #
  # Set Port
  #
  def setPort(v)
    item = findItem("Port")
    if !item.immutable?
      item.property = @port = Qt::Variant.fromValue(v)
    end
  end

  def port=(v)
    setPort(v)
  end

  #
  # Get Port
  #
  def port
    @port = findItem("Port").property
    return @port.value
  end

  def initialize()
    super()

    # Group8b1
    @something = Qt::Variant.fromValue(0)

    # Group8b2
    @fooBoo = Qt::Variant.fromValue(false)
    @port = Qt::Variant.fromValue(0)
    setCurrentGroup("Group8b1")

    itemSomething = ItemUInt.new(currentGroup(), "Something", @something.value, 60)
    itemSomething.property = @something
    addItem(itemSomething)

    setCurrentGroup("Group8b2")

    itemFooBoo = ItemBool.new(currentGroup(), "FooBoo", @fooBoo.value, false)
    itemFooBoo.property = @fooBoo
    addItem(itemFooBoo)
    itemPort = ItemUInt.new(currentGroup(), "Port", @port.value, 1000)
    itemPort.property = @port
    addItem(itemPort)
    readConfig
  end

end
