Class: IRecSettings

Inherits:
SettingsBase show all
Defined in:
lib/settings.rb

Overview


IRecorder Settings

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from SettingsBase

#[], #addBoolItem, #addChoiceItem, #addIntItem, #addStringItem, #addStringListItem, #addUrlItem

Constructor Details

#initializeIRecSettings

Returns a new instance of IRecSettings.



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/settings.rb', line 114

def initialize
    super()

    setCurrentGroup("Preferences")

    # meta programed version.
    addStringItem(:rawDownloadDir, Qt::Dir::tempPath + '/RadioRaw')
    addStringItem(:downloadDir, KDE::GlobalSettings.musicPath)
    addBoolItem(:dirAddMediaName, true)
    addBoolItem(:dirAddChannelName, false)
    addBoolItem(:dirAddGenreName, true)
    addStringItem(:fileAddHeadStr, 'BBC ')
    addBoolItem(:fileAddMediaName, true)
    addBoolItem(:fileAddChannelName, false)
    addBoolItem(:fileAddGenreName, true)
    addBoolItem(:leaveRawFile, false)

    addBoolItem(:playerTypeSmall, false)
    addBoolItem(:playerTypeBeta, true)

    addBoolItem(:useInnerPlayer, true)
    addBoolItem(:useWebPlayer, false)
    addStringItem(:webPlayerName, 'Konqueror')
    addBoolItem(:useDirectPlayer, false)
    addStringItem(:directPlayerName, 'KMPlayer')
end

Class Method Details

.directPlayerCommandObject



153
154
155
# File 'lib/settings.rb', line 153

def self.directPlayerCommand
    self.instance.directPlayerCommand
end

.webPlayerCommandObject



145
146
147
# File 'lib/settings.rb', line 145

def self.webPlayerCommand
    self.instance.webPlayerCommand
end

Instance Method Details

#directPlayerCommandObject



149
150
151
# File 'lib/settings.rb', line 149

def directPlayerCommand
    @directPlayerCnv.commandFromName(self.directPlayerName)
end

#regConverter(webPlayerCnv, directPlayerCnv) ⇒ Object



157
158
159
160
# File 'lib/settings.rb', line 157

def regConverter(webPlayerCnv, directPlayerCnv)
    @webPlayerCnv = webPlayerCnv
    @directPlayerCnv = directPlayerCnv
end

#webPlayerCommandObject



141
142
143
# File 'lib/settings.rb', line 141

def webPlayerCommand
    @webPlayerCnv.commandFromName(self.webPlayerName)
end