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

class Test2 < MyPrefs
  StandardDestination = 0
  AskDestination = 1
  Argl1 = 2
  Argl2 = 3
  Argl3 = 4


  #
  # Set Enable automatic saving of calendar
  #
  def setAutoSave(v)
    item = findItem("AutoSave")
    if !item.immutable?
      item.property = @autoSave = Qt::Variant.fromValue(v)
    end
  end

  def autoSave=(v)
    setAutoSave(v)
  end

  #
  # Get Enable automatic saving of calendar
  #
  def autoSave
    @autoSave = findItem("AutoSave").property
    return @autoSave.value
  end

  #
  # Get Item object corresponding to AutoSave()
  #
  def autoSaveItem
    return @autoSaveItem
  end

  #
  # Set Auto Save Interval
  #
  def setAutoSaveInterval(v)
    item = findItem("AutoSaveInterval")
    if !item.immutable?
      item.property = @autoSaveInterval = Qt::Variant.fromValue(v)
    end
  end

  def autoSaveInterval=(v)
    setAutoSaveInterval(v)
  end

  #
  # Get Auto Save Interval
  #
  def autoSaveInterval
    @autoSaveInterval = findItem("AutoSaveInterval").property
    return @autoSaveInterval.value
  end

  #
  # Get Item object corresponding to AutoSaveInterval()
  #
  def autoSaveIntervalItem
    return @autoSaveIntervalItem
  end

  #
  # Set Confirm deletes
  #
  def setConfirm(v)
    item = findItem("Confirm")
    if !item.immutable?
      item.property = @confirm = Qt::Variant.fromValue(v)
    end
  end

  def confirm=(v)
    setConfirm(v)
  end

  #
  # Get Confirm deletes
  #
  def confirm
    @confirm = findItem("Confirm").property
    return @confirm.value
  end

  #
  # Get Item object corresponding to Confirm()
  #
  def confirmItem
    return @confirmItem
  end

  #
  # Set Archive File
  #
  def setArchiveFile(v)
    item = findItem("ArchiveFile")
    if !item.immutable?
      item.property = @archiveFile = Qt::Variant.fromValue(v)
    end
  end

  def archiveFile=(v)
    setArchiveFile(v)
  end

  #
  # Get Archive File
  #
  def archiveFile
    @archiveFile = findItem("ArchiveFile").property
    return @archiveFile.value
  end

  #
  # Get Item object corresponding to ArchiveFile()
  #
  def archiveFileItem
    return @archiveFileItem
  end

  #
  # Set New Events/Todos Should
  #
  def setDestination(v)
    item = findItem("Destination")
    if !item.immutable?
      item.property = @destination = Qt::Variant.fromValue(v)
    end
  end

  def destination=(v)
    setDestination(v)
  end

  #
  # Get New Events/Todos Should
  #
  def destination
    @destination = findItem("Destination").property
    return @destination.toInt
  end

  #
  # Get Item object corresponding to Destination()
  #
  def destinationItem
    return @destinationItem
  end

  #
  # Set Hour Size
  #
  def setHourSize(v)
    item = findItem("HourSize")
    if !item.immutable?
      item.property = @hourSize = Qt::Variant.fromValue(v)
    end
  end

  def hourSize=(v)
    setHourSize(v)
  end

  #
  # Get Hour Size
  #
  def hourSize
    @hourSize = findItem("HourSize").property
    return @hourSize.value
  end

  #
  # Get Item object corresponding to HourSize()
  #
  def hourSizeItem
    return @hourSizeItem
  end

  #
  # Set Time range selection in agenda view starts event editor
  #
  def setSelectionStartsEditor(v)
    item = findItem("SelectionStartsEditor")
    if !item.immutable?
      item.property = @selectionStartsEditor = Qt::Variant.fromValue(v)
    end
  end

  def selectionStartsEditor=(v)
    setSelectionStartsEditor(v)
  end

  #
  # Get Time range selection in agenda view starts event editor
  #
  def selectionStartsEditor
    @selectionStartsEditor = findItem("SelectionStartsEditor").property
    return @selectionStartsEditor.value
  end

  #
  # Get Item object corresponding to SelectionStartsEditor()
  #
  def selectionStartsEditorItem
    return @selectionStartsEditorItem
  end

  #
  # Set SelectedPlugins
  #
  def setSelectedPlugins(v)
    item = findItem("SelectedPlugins")
    if !item.immutable?
      item.property = @selectedPlugins = Qt::Variant.fromValue(v)
    end
  end

  def selectedPlugins=(v)
    setSelectedPlugins(v)
  end

  #
  # Get SelectedPlugins
  #
  def selectedPlugins
    @selectedPlugins = findItem("SelectedPlugins").property
    return @selectedPlugins.value
  end

  #
  # Get Item object corresponding to SelectedPlugins()
  #
  def selectedPluginsItem
    return @selectedPluginsItem
  end

  #
  # Set Highlight color
  #
  def setHighlightColor(v)
    item = findItem("HighlightColor")
    if !item.immutable?
      item.property = @highlightColor = Qt::Variant.fromValue(v)
    end
  end

  def highlightColor=(v)
    setHighlightColor(v)
  end

  #
  # Get Highlight color
  #
  def highlightColor
    @highlightColor = findItem("HighlightColor").property
    return @highlightColor.value
  end

  #
  # Get Item object corresponding to HighlightColor()
  #
  def highlightColorItem
    return @highlightColorItem
  end

  #
  # Set Agenda view background color
  #
  def setAgendaBgColor(v)
    item = findItem("AgendaBgColor")
    if !item.immutable?
      item.property = @agendaBgColor = Qt::Variant.fromValue(v)
    end
  end

  def agendaBgColor=(v)
    setAgendaBgColor(v)
  end

  #
  # Get Agenda view background color
  #
  def agendaBgColor
    @agendaBgColor = findItem("AgendaBgColor").property
    return @agendaBgColor.value
  end

  #
  # Get Item object corresponding to AgendaBgColor()
  #
  def agendaBgColorItem
    return @agendaBgColorItem
  end

  #
  # Set Time bar
  #
  def setTimeBarFont(v)
    item = findItem("TimeBarFont")
    if !item.immutable?
      item.property = @timeBarFont = Qt::Variant.fromValue(v)
    end
  end

  def timeBarFont=(v)
    setTimeBarFont(v)
  end

  #
  # Get Time bar
  #
  def timeBarFont
    @timeBarFont = findItem("TimeBarFont").property
    return @timeBarFont.value
  end

  #
  # Get Item object corresponding to TimeBarFont()
  #
  def timeBarFontItem
    return @timeBarFontItem
  end

  def initialize()
    super("korganizerrc")

    # General
    @autoSave = Qt::Variant.fromValue(false)
    @autoSaveInterval = Qt::Variant.fromValue(0)
    @confirm = Qt::Variant.fromValue(false)
    @archiveFile = Qt::Variant.fromValue("")
    @destination = Qt::Variant.fromValue(0)

    # Views
    @hourSize = Qt::Variant.fromValue(0)
    @selectionStartsEditor = Qt::Variant.fromValue(false)

    # KOrganizer Plugins
    @selectedPlugins = Qt::Variant.fromValue([])

    # Colors
    @highlightColor = Qt::Variant.fromValue(Qt::Color.new)
    @agendaBgColor = Qt::Variant.fromValue(Qt::Color.new)

    # Fonts
    @timeBarFont = Qt::Variant.fromValue(Qt::Font.new)
    setCurrentGroup("General")

    @autoSaveItem = ItemBool.new(currentGroup(), "Auto Save", @autoSave.value, false)
    @autoSaveItem.property = @autoSave
    @autoSaveItem.label = i18n("Enable automatic saving of calendar")
    @autoSaveItem.whatsThis = i18n("WhatsThis text for AutoSave option")
    addItem(@autoSaveItem, "AutoSave")
    @autoSaveIntervalItem = ItemInt.new(currentGroup(), "Auto Save Interval", @autoSaveInterval.value, 10)
    @autoSaveIntervalItem.property = @autoSaveInterval
    @autoSaveIntervalItem.label = i18n("Auto Save Interval")
    addItem(@autoSaveIntervalItem, "AutoSaveInterval")
    @confirmItem = ItemBool.new(currentGroup(), "Confirm Deletes", @confirm.value, true)
    @confirmItem.property = @confirm
    @confirmItem.label = i18n("Confirm deletes")
    addItem(@confirmItem, "Confirm")
    @archiveFileItem = ItemString.new(currentGroup(), "Archive File", @archiveFile.value)
    @archiveFileItem.property = @archiveFile
    @archiveFileItem.label = i18n("Archive File")
    addItem(@archiveFileItem, "ArchiveFile")
    valuesDestination = []
    choice = ItemEnum::Choice.new
    choice.name = "standardDestination"
    valuesDestination << choice
    choice = ItemEnum::Choice.new
    choice.name = "askDestination"
    valuesDestination << choice
    choice = ItemEnum::Choice.new
    choice.name = "argl1"
    choice.label = i18n("Argl1 Label")
    valuesDestination << choice
    choice = ItemEnum::Choice.new
    choice.name = "argl2"
    choice.whatsThis = i18n("Argl2 Whatsthis")
    valuesDestination << choice
    choice = ItemEnum::Choice.new
    choice.name = "argl3"
    choice.label = i18n("Argl3 Label")
    choice.whatsThis = i18n("Argl3 Whatsthis")
    valuesDestination << choice
    @destinationItem = ItemEnum.new(currentGroup(), "Destination", @destination.toInt, valuesDestination, StandardDestination)
    @destinationItem.property = @destination
    @destinationItem.label = i18n("New Events/Todos Should")
    addItem(@destinationItem)

    setCurrentGroup("Views")

    @hourSizeItem = ItemInt.new(currentGroup(), "Hour Size", @hourSize.value, 10)
    @hourSizeItem.property = @hourSize
    @hourSizeItem.label = i18n("Hour Size")
    addItem(@hourSizeItem, "HourSize")
    @selectionStartsEditorItem = ItemBool.new(currentGroup(), "SelectionStartsEditor", @selectionStartsEditor.value, false)
    @selectionStartsEditorItem.property = @selectionStartsEditor
    @selectionStartsEditorItem.label = i18n("Time range selection in agenda view starts event editor")
    addItem(@selectionStartsEditorItem)

    setCurrentGroup("KOrganizer Plugins")

    defaultSelectedPlugins = []
    defaultSelectedPlugins << "holidays"
    defaultSelectedPlugins << "webexport"

    @selectedPluginsItem = ItemStringList.new(currentGroup(), "SelectedPlugins", @selectedPlugins.value, defaultSelectedPlugins)
    @selectedPluginsItem.property = @selectedPlugins
    @selectedPluginsItem.label = i18n("SelectedPlugins")
    addItem(@selectedPluginsItem)

    setCurrentGroup("Colors")

    @highlightColorItem = ItemColor.new(currentGroup(), "Highlight Color", @highlightColor.value, Qt::Color.new(100, 100, 255))
    @highlightColorItem.property = @highlightColor
    @highlightColorItem.label = i18n("Highlight color")
    addItem(@highlightColorItem, "HighlightColor")
    @agendaBgColorItem = ItemColor.new(currentGroup(), "Agenda Background Color", @agendaBgColor.value, Qt::Color.new(255, 255, 255))
    @agendaBgColorItem.property = @agendaBgColor
    @agendaBgColorItem.label = i18n("Agenda view background color")
    addItem(@agendaBgColorItem, "AgendaBgColor")

    setCurrentGroup("Fonts")

    @timeBarFontItem = ItemFont.new(currentGroup(), "TimeBar Font", @timeBarFont.value)
    @timeBarFontItem.property = @timeBarFont
    @timeBarFontItem.label = i18n("Time bar")
    addItem(@timeBarFontItem, "TimeBarFont")
  end

end
