kalarm
SoundPicker Class Reference
#include <soundpicker.h>

Detailed Description
Definition at line 35 of file soundpicker.h.
Public Member Functions | |
| KUrl | file () const |
| KUrl | fileSetting () const |
| bool | isReadOnly () const |
| bool | repeat () const |
| bool | repeatSetting () const |
| void | set (Preferences::SoundType type, const QString &filename, float volume, float fadeVolume, int fadeSeconds, bool repeat) |
| void | setReadOnly (bool readOnly) |
| void | showSpeak (bool show) |
| Preferences::SoundType | sound () const |
| SoundPicker (QWidget *parent) | |
| float | volume (float &fadeVolume, int &fadeSeconds) const |
Static Public Member Functions | |
| static QString | browseFile (QString &initialDir, const QString &initialFile=QString()) |
| static QString | i18n_combo_Beep () |
| static QString | i18n_combo_File () |
| static QString | i18n_combo_None () |
| static QString | i18n_combo_Speak () |
| static QString | i18n_label_Sound () |
Constructor & Destructor Documentation
| SoundPicker::SoundPicker | ( | QWidget * | parent | ) | [explicit] |
Constructor.
- Parameters:
-
parent The parent object of this widget.
Definition at line 56 of file soundpicker.cpp.
Member Function Documentation
| QString SoundPicker::browseFile | ( | QString & | initialDir, | |
| const QString & | initialFile = QString() | |||
| ) | [static] |
Display a dialog to choose a sound file, initially highlighting initialFile if non-null.
- Parameters:
-
initialDir Initial directory to display if initialFileis null. If a file is chosen, this is updated to the directory containing the chosen file.initialFile Full path name or URL of file to be highlighted initially. If null, no file will be highlighted.
- Returns:
- URL selected, in human readable format. If none is selected, URL.isEmpty() is true.
Definition at line 313 of file soundpicker.cpp.
| KUrl SoundPicker::file | ( | ) | const |
If the 'file' option is selected, returns the URL of the chosen file.
Otherwise returns an empty URL.
Definition at line 168 of file soundpicker.cpp.
| KUrl SoundPicker::fileSetting | ( | ) | const [inline] |
Returns the current file URL regardless of whether the 'file' option is selected.
Definition at line 89 of file soundpicker.h.
| QString SoundPicker::i18n_combo_Beep | ( | ) | [static] |
Definition at line 51 of file soundpicker.cpp.
| QString SoundPicker::i18n_combo_File | ( | ) | [static] |
Definition at line 53 of file soundpicker.cpp.
| QString SoundPicker::i18n_combo_None | ( | ) | [static] |
Definition at line 50 of file soundpicker.cpp.
| QString SoundPicker::i18n_combo_Speak | ( | ) | [static] |
Definition at line 52 of file soundpicker.cpp.
| QString SoundPicker::i18n_label_Sound | ( | ) | [static] |
Definition at line 49 of file soundpicker.cpp.
| bool SoundPicker::isReadOnly | ( | ) | const [inline] |
| bool SoundPicker::repeat | ( | ) | const |
Returns true if a sound file is to be played repeatedly.
If the 'file' option is not selected, returns false.
Definition at line 197 of file soundpicker.cpp.
| bool SoundPicker::repeatSetting | ( | ) | const [inline] |
Returns the current file repetition setting regardless of whether the 'file' option is selected.
Definition at line 91 of file soundpicker.h.
| void SoundPicker::set | ( | Preferences::SoundType | type, | |
| const QString & | filename, | |||
| float | volume, | |||
| float | fadeVolume, | |||
| int | fadeSeconds, | |||
| bool | repeat | |||
| ) |
Initialises the widget's state.
- Parameters:
-
type The option to select. filename The full path or URL of the sound file to select. If the 'file' option is not initially selected, filenameprovides the default should 'file' later be selected by the user.volume The volume to play a sound file, or < 0 for no volume setting. If the 'file' option is not initially selected, volumeprovides the default should 'file' later be selected by the user.fadeVolume The initial volume to play a sound file if fading is to be used, or < 0 for no fading. If the 'file' option is not initially selected, fadeVolumeprovides the default should 'file' later be selected by the user.fadeSeconds The number of seconds over which the sound file volume should be faded, or 0 for no fading. If the 'file' option is not initially selected, fadeSecondsprovides the default should 'file' later be selected by the user.repeat True to play the sound file repeatedly. If the 'file' option is not initially selected, repeatprovides the default should 'file' later be selected by the user.
Definition at line 205 of file soundpicker.cpp.
| void SoundPicker::setReadOnly | ( | bool | readOnly | ) |
Sets whether the widget can be changed the user.
- Parameters:
-
readOnly True to set the widget read-only, false to set it read-write.
Definition at line 107 of file soundpicker.cpp.
| void SoundPicker::showSpeak | ( | bool | show | ) |
Show or hide the 'speak' option.
If it is to be hidden and it is currently selected, sound is turned off.
Definition at line 117 of file soundpicker.cpp.
| Preferences::SoundType SoundPicker::sound | ( | ) | const |
| float SoundPicker::volume | ( | float & | fadeVolume, | |
| int & | fadeSeconds | |||
| ) | const |
Returns the volume and fade characteristics for playing a sound file.
- Parameters:
-
fadeVolume Receives the initial volume if the volume is to be faded, else -1. fadeSeconds Receives the number of seconds over which the volume is to be faded, else 0.
- Returns:
- Volume to play the sound file, or < 0 if the 'file' option is not selected.
Definition at line 177 of file soundpicker.cpp.
The documentation for this class was generated from the following files:
KDE 4.1 API Reference