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

require 'singleton'

class Settings < KDE::ConfigSkeleton
  include Singleton

  #
  # Set color of the background
  #
  def setCol_background(v)
    item = findItem("col_background")
    if !item.immutable?
      item.property = @col_background = Qt::Variant.fromValue(v)
    end
  end

  def col_background=(v)
    setCol_background(v)
  end

  #
  # Get color of the background
  #
  def col_background
    @col_background = findItem("col_background").property
    return @col_background.value
  end

  #
  # Set color of the foreground
  #
  def setCol_foreground(v)
    item = findItem("col_foreground")
    if !item.immutable?
      item.property = @col_foreground = Qt::Variant.fromValue(v)
    end
  end

  def col_foreground=(v)
    setCol_foreground(v)
  end

  #
  # Get color of the foreground
  #
  def col_foreground
    @col_foreground = findItem("col_foreground").property
    return @col_foreground.value
  end

  #
  # Get size of a ball
  #
  def val_time
    @val_time = findItem("val_time").property
    return @val_time.value
  end

  def initialize()
    super("TestKDErc")

    # Preferences
    @col_background = Qt::Variant.fromValue(Qt::Color.new)
    @col_foreground = Qt::Variant.fromValue(Qt::Color.new)
    @val_time = Qt::Variant.fromValue(0)
    setCurrentGroup("Preferences")

    itemCol_background = ItemColor.new(currentGroup(), "col_background", @col_background.value, Qt::Color.new("black"))
    itemCol_background.property = @col_background
    addItem(itemCol_background)
    itemCol_foreground = ItemColor.new(currentGroup(), "col_foreground", @col_foreground.value, Qt::Color.new("yellow"))
    itemCol_foreground.property = @col_foreground
    addItem(itemCol_foreground)
    itemVal_time = ItemInt.new(currentGroup(), "val_time", @val_time.value, 2)
    itemVal_time.property = @val_time
    addItem(itemVal_time)
    readConfig
  end

end
