kalarm
soundpicker.cpp
Go to the documentation of this file.
50 QString SoundPicker::i18n_label_Sound() { return i18nc("@label:listbox Listbox providing audio options", "Sound:"); }
100 mFilePicker->setWhatsThis(i18nc("@info:whatsthis", "Configure a sound file to play when the alarm is displayed."));
133 QString opt1 = i18nc("@info:whatsthis", "<interface>%1</interface>: the message is displayed silently.", i18n_combo_None());
134 QString opt2 = i18nc("@info:whatsthis", "<interface>%1</interface>: a simple beep is sounded.", i18n_combo_Beep());
135 QString opt3 = i18nc("@info:whatsthis", "<interface>%1</interface>: an audio file is played. You will be prompted to choose the file and set play options.", i18n_combo_File());
139 QString opt4 = i18nc("@info:whatsthis", "<interface>%1</interface>: the message text is spoken.", i18n_combo_Speak());
163 for (QMap<Preferences::SoundType, int>::ConstIterator it = indexes.constBegin(); it != indexes.constEnd(); ++it)
204 return mTypeCombo->currentIndex() == indexes[Preferences::Sound_File] && !mFile.isEmpty() ? mRepeatPause : -1;
210 void SoundPicker::set(Preferences::SoundType type, const QString& f, float volume, float fadeVolume, int fadeSeconds, int repeatPause)
231 for (QMap<Preferences::SoundType, int>::ConstIterator it = indexes.constBegin(); it != indexes.constEnd(); ++it)
269 AutoQPointer<SoundDlg> dlg = new SoundDlg(mFile.prettyUrl(), mVolume, mFadeVolume, mFadeSeconds, mRepeatPause, i18nc("@title:window", "Sound File"), this);
331 return KAlarm::browseFile(i18nc("@title:window", "Choose Sound File"), defaultDir, initialFile, filter, KFile::ExistingOnly, 0);
void changed()
KUrl file() const
If the 'file' option is selected, returns the URL of the chosen file.
Definition: soundpicker.cpp:173
void setReadOnly(bool readOnly)
Sets whether the widget can be changed the user.
Definition: soundpicker.cpp:111
const_iterator constBegin() const
float volume(float &fadeVolume, int &fadeSeconds) const
Returns the volume and fade characteristics for playing a sound file.
Definition: soundpicker.cpp:182
QString join(const QString &separator) const
QStringList availableMimeTypes()
static QString browseFile(QString &initialDir, const QString &initialFile=QString())
Display a dialog to choose a sound file, initially highlighting initialFile if non-null.
Definition: soundpicker.cpp:321
bool isNull() const
void getVolume(float &volume, float &fadeVolume, int &fadeSeconds) const
Definition: sounddlg.h:105
void setBuddy(QWidget *buddy)
the KAlarm application object
QSize size() const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
void set(Preferences::SoundType type, const QString &filename, float volume, float fadeVolume, int fadeSeconds, int repeatPause)
Initialises the widget's state.
Definition: soundpicker.cpp:210
bool isEmpty() const
const_iterator constEnd() const
void setMargin(int margin)
virtual void setReadOnly(bool readOnly)
Definition: sounddlg.h:96
void setFixedSize(const QSize &s)
int repeatPause() const
Returns pause in seconds between repetitions of the sound file, or -1 if no repeat or 'file' option i...
Definition: soundpicker.cpp:202
QString whatsThis() const
miscellaneous functions
virtual QSize sizeHint() const
void show()
bool isEmpty() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setSpacing(int spacing)
singleShot
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.