• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kalarm

Signals | Public Member Functions | Static Public Member Functions | List of all members
SoundPicker Class Reference

#include <soundpicker.h>

Inheritance diagram for SoundPicker:
Inheritance graph
[legend]

Signals

void changed ()
 

Public Member Functions

 SoundPicker (QWidget *parent)
 
KUrl file () const
 
KUrl fileSetting () const
 
bool isReadOnly () const
 
int repeatPause () const
 
bool repeatPauseSetting () const
 
void set (Preferences::SoundType type, const QString &filename, float volume, float fadeVolume, int fadeSeconds, int repeatPause)
 
void setReadOnly (bool readOnly)
 
void showSpeak (bool show)
 
Preferences::SoundType sound () const
 
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 ()
 

Detailed Description

Definition at line 35 of file soundpicker.h.

Constructor & Destructor Documentation

SoundPicker::SoundPicker ( QWidget *  parent)
explicit

Constructor.

Parameters
parentThe parent object of this widget.

Definition at line 57 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
initialDirInitial directory to display if initialFile is null. If a file is chosen, this is updated to the directory containing the chosen file.
initialFileFull 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 321 of file soundpicker.cpp.

void SoundPicker::changed ( )
signal
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 173 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 52 of file soundpicker.cpp.

QString SoundPicker::i18n_combo_File ( )
static

Definition at line 54 of file soundpicker.cpp.

QString SoundPicker::i18n_combo_None ( )
static

Definition at line 51 of file soundpicker.cpp.

QString SoundPicker::i18n_combo_Speak ( )
static

Definition at line 53 of file soundpicker.cpp.

QString SoundPicker::i18n_label_Sound ( )
static

Definition at line 50 of file soundpicker.cpp.

bool SoundPicker::isReadOnly ( ) const
inline

Returns true if the widget is read only for the user.

Definition at line 63 of file soundpicker.h.

int SoundPicker::repeatPause ( ) const

Returns pause in seconds between repetitions of the sound file, or -1 if no repeat or 'file' option is not selected.

Definition at line 202 of file soundpicker.cpp.

bool SoundPicker::repeatPauseSetting ( ) 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,
int  repeatPause 
)

Initialises the widget's state.

Parameters
typeThe option to select.
filenameThe full path or URL of the sound file to select. If the 'file' option is not initially selected, filename provides the default should 'file' later be selected by the user.
volumeThe volume to play a sound file, or < 0 for no volume setting. If the 'file' option is not initially selected, volume provides the default should 'file' later be selected by the user.
fadeVolumeThe 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, fadeVolume provides the default should 'file' later be selected by the user.
fadeSecondsThe 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, fadeSeconds provides the default should 'file' later be selected by the user.
repeatPauseNumber of seconds to pause between sound file repetitions, or -1 for no repetition. If the 'file' option is not initially selected, repeatPause provides the default should 'file' later be selected by the user.

Definition at line 210 of file soundpicker.cpp.

void SoundPicker::setReadOnly ( bool  readOnly)

Sets whether the widget can be changed the user.

Parameters
readOnlyTrue to set the widget read-only, false to set it read-write.

Definition at line 111 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 122 of file soundpicker.cpp.

Preferences::SoundType SoundPicker::sound ( ) const

Returns the selected option.

Definition at line 160 of file soundpicker.cpp.

float SoundPicker::volume ( float &  fadeVolume,
int &  fadeSeconds 
) const

Returns the volume and fade characteristics for playing a sound file.

Parameters
fadeVolumeReceives the initial volume if the volume is to be faded, else -1.
fadeSecondsReceives 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 182 of file soundpicker.cpp.


The documentation for this class was generated from the following files:
  • soundpicker.h
  • soundpicker.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalarm

Skip menu "kalarm"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal