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

kalarm

  • sources
  • kde-4.12
  • kdepim
  • kalarm
sounddlg.cpp
Go to the documentation of this file.
1 /*
2  * sounddlg.cpp - sound file selection and configuration dialog and widget
3  * Program: kalarm
4  * Copyright © 2005-2012 by David Jarvie <djarvie@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #include "kalarm.h"
22 #include "sounddlg.moc"
23 
24 #include "checkbox.h"
25 #include "functions.h"
26 #include "groupbox.h"
27 #include "lineedit.h"
28 #include "pushbutton.h"
29 #include "slider.h"
30 #include "soundpicker.h"
31 #include "spinbox.h"
32 
33 #include <klocale.h>
34 #include <kstandarddirs.h>
35 #include <kiconloader.h>
36 #include <khbox.h>
37 #include <kio/netaccess.h>
38 #include <phonon/mediaobject.h>
39 #include <phonon/audiooutput.h>
40 #include <kdebug.h>
41 
42 #include <QLabel>
43 #include <QDir>
44 #include <QGroupBox>
45 #include <QApplication>
46 #include <QVBoxLayout>
47 #include <QGridLayout>
48 #include <QShowEvent>
49 #include <QResizeEvent>
50 
51 
52 // Collect these widget labels together to ensure consistent wording and
53 // translations across different modules.
54 QString SoundWidget::i18n_chk_Repeat() { return i18nc("@option:check", "Repeat"); }
55 
56 static const char SOUND_DIALOG_NAME[] = "SoundDialog";
57 
58 
59 SoundDlg::SoundDlg(const QString& file, float volume, float fadeVolume, int fadeSeconds, int repeatPause,
60  const QString& caption, QWidget* parent)
61  : KDialog(parent),
62  mReadOnly(false)
63 {
64  mSoundWidget = new SoundWidget(true, true, this);
65  setMainWidget(mSoundWidget);
66  setCaption(caption);
67  setButtons(Ok|Cancel);
68  setDefaultButton(Ok);
69 
70  // Restore the dialog size from last time
71  QSize s;
72  if (KAlarm::readConfigWindowSize(SOUND_DIALOG_NAME, s))
73  resize(s);
74 
75  // Initialise the control values
76  mSoundWidget->set(file, volume, fadeVolume, fadeSeconds, repeatPause);
77 }
78 
79 /******************************************************************************
80 * Set the read-only status of the dialog.
81 */
82 void SoundDlg::setReadOnly(bool readOnly)
83 {
84  if (readOnly != mReadOnly)
85  {
86  mSoundWidget->setReadOnly(readOnly);
87  mReadOnly = readOnly;
88  if (readOnly)
89  {
90  setButtons(Cancel);
91  setDefaultButton(Cancel);
92  }
93  else
94  {
95  setButtons(Ok|Cancel);
96  setDefaultButton(Ok);
97  }
98  }
99 }
100 
101 KUrl SoundDlg::getFile() const
102 {
103  KUrl url;
104  mSoundWidget->file(url);
105  return url;
106 }
107 
108 /******************************************************************************
109 * Called when the dialog's size has changed.
110 * Records the new size in the config file.
111 */
112 void SoundDlg::resizeEvent(QResizeEvent* re)
113 {
114  if (isVisible())
115  KAlarm::writeConfigWindowSize(SOUND_DIALOG_NAME, re->size());
116  KDialog::resizeEvent(re);
117 }
118 
119 /******************************************************************************
120 * Called when the OK or Cancel button is clicked.
121 */
122 void SoundDlg::slotButtonClicked(int button)
123 {
124  if (button == Ok)
125  {
126  if (mReadOnly)
127  reject();
128  else if (mSoundWidget->validate(true))
129  accept();
130  }
131  else
132  KDialog::slotButtonClicked(button);
133 }
134 
135 
136 /*=============================================================================
137 = Class SoundWidget
138 = Select a sound file and configure how to play it.
139 =============================================================================*/
140 QString SoundWidget::mDefaultDir;
141 
142 SoundWidget::SoundWidget(bool showPlay, bool showRepeat, QWidget* parent)
143  : QWidget(parent),
144  mFilePlay(0),
145  mRepeatGroupBox(0),
146  mRepeatPause(0),
147  mPlayer(0),
148  mReadOnly(false),
149  mEmptyFileAllowed(false)
150 {
151  QVBoxLayout* layout = new QVBoxLayout(this);
152  layout->setMargin(0);
153  layout->setSpacing(KDialog::spacingHint());
154 
155  QLabel* label = 0;
156  if (!showPlay)
157  {
158  label = new QLabel(i18nc("@label", "Sound file:"), this);
159  layout->addWidget(label);
160  }
161 
162  KHBox* box = new KHBox(this);
163  box->setMargin(0);
164  layout->addWidget(box);
165 
166  if (showPlay)
167  {
168  // File play button
169  mFilePlay = new QPushButton(box);
170  mFilePlay->setIcon(SmallIcon(QLatin1String("media-playback-start")));
171  connect(mFilePlay, SIGNAL(clicked()), SLOT(playSound()));
172  mFilePlay->setToolTip(i18nc("@info:tooltip", "Test the sound"));
173  mFilePlay->setWhatsThis(i18nc("@info:whatsthis", "Play the selected sound file."));
174  }
175 
176  // File name edit box
177  mFileEdit = new LineEdit(LineEdit::Url, box);
178  mFileEdit->setAcceptDrops(true);
179  mFileEdit->setWhatsThis(i18nc("@info:whatsthis", "Enter the name or URL of a sound file to play."));
180  if (label)
181  label->setBuddy(mFileEdit);
182  connect(mFileEdit, SIGNAL(textChanged(QString)), SIGNAL(changed()));
183 
184  // File browse button
185  mFileBrowseButton = new PushButton(box);
186  mFileBrowseButton->setIcon(KIcon(SmallIcon(QLatin1String("document-open"))));
187  int size = mFileBrowseButton->sizeHint().height();
188  mFileBrowseButton->setFixedSize(size, size);
189  connect(mFileBrowseButton, SIGNAL(clicked()), SLOT(slotPickFile()));
190  mFileBrowseButton->setToolTip(i18nc("@info:tooltip", "Choose a file"));
191  mFileBrowseButton->setWhatsThis(i18nc("@info:whatsthis", "Select a sound file to play."));
192 
193  if (mFilePlay)
194  {
195  int size = qMax(mFilePlay->sizeHint().height(), mFileBrowseButton->sizeHint().height());
196  mFilePlay->setFixedSize(size, size);
197  mFileBrowseButton->setFixedSize(size, size);
198  }
199 
200  if (showRepeat)
201  {
202  // Sound repetition checkbox
203  mRepeatGroupBox = new GroupBox(i18n_chk_Repeat(), this);
204  mRepeatGroupBox->setCheckable(true);
205  mRepeatGroupBox->setWhatsThis(i18nc("@info:whatsthis", "If checked, the sound file will be played repeatedly for as long as the message is displayed."));
206  connect(mRepeatGroupBox, SIGNAL(toggled(bool)), SIGNAL(changed()));
207  layout->addWidget(mRepeatGroupBox);
208  QVBoxLayout* glayout = new QVBoxLayout(mRepeatGroupBox);
209 
210  // Pause between repetitions
211  KHBox* box = new KHBox(mRepeatGroupBox);
212  box->setMargin(0);
213  box->setSpacing(KDialog::spacingHint());
214  glayout->addWidget(box);
215  label = new QLabel(i18nc("@label:spinbox Length of time to pause between repetitions", "Pause between repetitions:"), box);
216  label->setFixedSize(label->sizeHint());
217  mRepeatPause = new SpinBox(0, 999, box);
218  mRepeatPause->setSingleShiftStep(10);
219  mRepeatPause->setFixedSize(mRepeatPause->sizeHint());
220  label->setBuddy(mRepeatPause);
221  connect(mRepeatPause, SIGNAL(valueChanged(int)), SIGNAL(changed()));
222  label = new QLabel(i18nc("@label", "seconds"), box);
223  label->setFixedSize(label->sizeHint());
224  box->setWhatsThis(i18nc("@info:whatsthis", "Enter how many seconds to pause between repetitions."));
225  }
226 
227  // Volume
228  QGroupBox* group = new QGroupBox(i18nc("@title:group Sound volume", "Volume"), this);
229  layout->addWidget(group);
230  QGridLayout* grid = new QGridLayout(group);
231  grid->setMargin(KDialog::marginHint());
232  grid->setSpacing(KDialog::spacingHint());
233  grid->setColumnStretch(2, 1);
234  int indentWidth = 3 * KDialog::spacingHint();
235  grid->setColumnMinimumWidth(0, indentWidth);
236  grid->setColumnMinimumWidth(1, indentWidth);
237 
238  // 'Set volume' checkbox
239  box = new KHBox(group);
240  box->setMargin(0);
241  box->setSpacing(KDialog::spacingHint());
242  grid->addWidget(box, 1, 0, 1, 3);
243  mVolumeCheckbox = new CheckBox(i18nc("@option:check", "Set volume"), box);
244  mVolumeCheckbox->setFixedSize(mVolumeCheckbox->sizeHint());
245  connect(mVolumeCheckbox, SIGNAL(toggled(bool)), SLOT(slotVolumeToggled(bool)));
246  mVolumeCheckbox->setWhatsThis(i18nc("@info:whatsthis", "Select to choose the volume for playing the sound file."));
247 
248  // Volume slider
249  mVolumeSlider = new Slider(0, 100, 10, Qt::Horizontal, box);
250  mVolumeSlider->setTickPosition(QSlider::TicksBelow);
251  mVolumeSlider->setTickInterval(10);
252  mVolumeSlider->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
253  mVolumeSlider->setWhatsThis(i18nc("@info:whatsthis", "Choose the volume for playing the sound file."));
254  mVolumeCheckbox->setFocusWidget(mVolumeSlider);
255  connect(mVolumeSlider, SIGNAL(valueChanged(int)), SIGNAL(changed()));
256 
257  // Fade checkbox
258  mFadeCheckbox = new CheckBox(i18nc("@option:check", "Fade"), group);
259  mFadeCheckbox->setFixedSize(mFadeCheckbox->sizeHint());
260  connect(mFadeCheckbox, SIGNAL(toggled(bool)), SLOT(slotFadeToggled(bool)));
261  mFadeCheckbox->setWhatsThis(i18nc("@info:whatsthis", "Select to fade the volume when the sound file first starts to play."));
262  grid->addWidget(mFadeCheckbox, 2, 1, 1, 2, Qt::AlignLeft);
263 
264  // Fade time
265  mFadeBox = new KHBox(group);
266  mFadeBox->setMargin(0);
267  mFadeBox->setSpacing(KDialog::spacingHint());
268  grid->addWidget(mFadeBox, 3, 2, Qt::AlignLeft);
269  label = new QLabel(i18nc("@label:spinbox Time period over which to fade the sound", "Fade time:"), mFadeBox);
270  label->setFixedSize(label->sizeHint());
271  mFadeTime = new SpinBox(1, 999, mFadeBox);
272  mFadeTime->setSingleShiftStep(10);
273  mFadeTime->setFixedSize(mFadeTime->sizeHint());
274  label->setBuddy(mFadeTime);
275  connect(mFadeTime, SIGNAL(valueChanged(int)), SIGNAL(changed()));
276  label = new QLabel(i18nc("@label", "seconds"), mFadeBox);
277  label->setFixedSize(label->sizeHint());
278  mFadeBox->setWhatsThis(i18nc("@info:whatsthis", "Enter how many seconds to fade the sound before reaching the set volume."));
279 
280  // Fade slider
281  mFadeVolumeBox = new KHBox(group);
282  mFadeVolumeBox->setMargin(0);
283  mFadeVolumeBox->setSpacing(KDialog::spacingHint());
284  grid->addWidget(mFadeVolumeBox, 4, 2);
285  label = new QLabel(i18nc("@label:slider", "Initial volume:"), mFadeVolumeBox);
286  label->setFixedSize(label->sizeHint());
287  mFadeSlider = new Slider(0, 100, 10, Qt::Horizontal, mFadeVolumeBox);
288  mFadeSlider->setTickPosition(QSlider::TicksBelow);
289  mFadeSlider->setTickInterval(10);
290  mFadeSlider->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
291  label->setBuddy(mFadeSlider);
292  connect(mFadeSlider, SIGNAL(valueChanged(int)), SIGNAL(changed()));
293  mFadeVolumeBox->setWhatsThis(i18nc("@info:whatsthis", "Choose the initial volume for playing the sound file."));
294 
295  slotVolumeToggled(false);
296 }
297 
298 SoundWidget::~SoundWidget()
299 {
300  delete mPlayer; // this stops playing if not already stopped
301  mPlayer = 0;
302 }
303 
304 /******************************************************************************
305 * Set the controls' values.
306 */
307 void SoundWidget::set(const QString& file, float volume, float fadeVolume, int fadeSeconds, int repeatPause)
308 {
309  // Initialise the control values
310  mFileEdit->setText(KAlarm::pathOrUrl(file));
311  if (mRepeatGroupBox)
312  {
313  mRepeatGroupBox->setChecked(repeatPause >= 0);
314  mRepeatPause->setValue(repeatPause >= 0 ? repeatPause : 0);
315  }
316  mVolumeCheckbox->setChecked(volume >= 0);
317  mVolumeSlider->setValue(volume >= 0 ? static_cast<int>(volume*100) : 100);
318  mFadeCheckbox->setChecked(fadeVolume >= 0);
319  mFadeSlider->setValue(fadeVolume >= 0 ? static_cast<int>(fadeVolume*100) : 100);
320  mFadeTime->setValue(fadeSeconds);
321  slotVolumeToggled(volume >= 0);
322 }
323 
324 /******************************************************************************
325 * Set the read-only status of the widget.
326 */
327 void SoundWidget::setReadOnly(bool readOnly)
328 {
329  if (readOnly != mReadOnly)
330  {
331  mFileEdit->setReadOnly(readOnly);
332  mFileBrowseButton->setReadOnly(readOnly);
333  if (mRepeatGroupBox)
334  mRepeatGroupBox->setReadOnly(readOnly);
335  mVolumeCheckbox->setReadOnly(readOnly);
336  mVolumeSlider->setReadOnly(readOnly);
337  mFadeCheckbox->setReadOnly(readOnly);
338  mFadeTime->setReadOnly(readOnly);
339  mFadeSlider->setReadOnly(readOnly);
340  mReadOnly = readOnly;
341  }
342 }
343 
344 /******************************************************************************
345 * Return the file name typed in the edit field.
346 */
347 QString SoundWidget::fileName() const
348 {
349  return mFileEdit->text();
350 }
351 
352 /******************************************************************************
353 * Validate the entered file and return it.
354 */
355 bool SoundWidget::file(KUrl& url, bool showErrorMessage) const
356 {
357  bool result = validate(showErrorMessage);
358  url = mUrl;
359  return result;
360 }
361 
362 /******************************************************************************
363 * Return the entered repetition and volume settings:
364 * 'volume' is in range 0 - 1, or < 0 if volume is not to be set.
365 * 'fadeVolume is similar, with 'fadeTime' set to the fade interval in seconds.
366 */
367 void SoundWidget::getVolume(float& volume, float& fadeVolume, int& fadeSeconds) const
368 {
369  volume = mVolumeCheckbox->isChecked() ? (float)mVolumeSlider->value() / 100 : -1;
370  if (mFadeCheckbox->isChecked())
371  {
372  fadeVolume = (float)mFadeSlider->value() / 100;
373  fadeSeconds = mFadeTime->value();
374  }
375  else
376  {
377  fadeVolume = -1;
378  fadeSeconds = 0;
379  }
380 }
381 
382 /******************************************************************************
383 * Return the entered repetition setting.
384 * Reply = seconds to pause between repetitions, or -1 if no repeat.
385 */
386 int SoundWidget::repeatPause() const
387 {
388  return mRepeatGroupBox && mRepeatGroupBox->isChecked() ? mRepeatPause->value() : -1;
389 }
390 
391 /******************************************************************************
392 * Called when the dialog's size has changed.
393 * Records the new size in the config file.
394 */
395 void SoundWidget::resizeEvent(QResizeEvent* re)
396 {
397  mVolumeSlider->resize(mFadeSlider->size());
398  QWidget::resizeEvent(re);
399 }
400 
401 void SoundWidget::showEvent(QShowEvent* se)
402 {
403  mVolumeSlider->resize(mFadeSlider->size());
404  QWidget::showEvent(se);
405 }
406 
407 /******************************************************************************
408 * Called when the file browser button is clicked.
409 */
410 void SoundWidget::slotPickFile()
411 {
412  QString url = SoundPicker::browseFile(mDefaultDir, mFileEdit->text());
413  if (!url.isEmpty())
414  mFileEdit->setText(KAlarm::pathOrUrl(url));
415 }
416 
417 /******************************************************************************
418 * Called when the file play or stop button is clicked.
419 */
420 void SoundWidget::playSound()
421 {
422  if (mPlayer)
423  {
424  // The file is currently playing. Stop it.
425  playFinished();
426  return;
427  }
428  if (!validate(true))
429  return;
430 #if 0
431 #warning Phonon::createPlayer() does not work
432  mPlayer = Phonon::createPlayer(Phonon::MusicCategory, mUrl);
433  mPlayer->setParent(this);
434 #else
435  mPlayer = new Phonon::MediaObject(this);
436  Phonon::AudioOutput* output = new Phonon::AudioOutput(Phonon::MusicCategory, mPlayer);
437  mPlayer->setCurrentSource(mUrl);
438  Phonon::createPath(mPlayer, output);
439 #endif
440  connect(mPlayer, SIGNAL(finished()), SLOT(playFinished()));
441  mFilePlay->setIcon(SmallIcon(QLatin1String("media-playback-stop"))); // change the play button to a stop button
442  mFilePlay->setToolTip(i18nc("@info:tooltip", "Stop sound"));
443  mFilePlay->setWhatsThis(i18nc("@info:whatsthis", "Stop playing the sound"));
444  mPlayer->play();
445 }
446 
447 /******************************************************************************
448 * Called when playing the file has completed, or to stop playing.
449 */
450 void SoundWidget::playFinished()
451 {
452  delete mPlayer; // this stops playing if not already stopped
453  mPlayer = 0;
454  mFilePlay->setIcon(SmallIcon(QLatin1String("media-playback-start")));
455  mFilePlay->setToolTip(i18nc("@info:tooltip", "Test the sound"));
456  mFilePlay->setWhatsThis(i18nc("@info:whatsthis", "Play the selected sound file."));
457 }
458 
459 /******************************************************************************
460 * Check whether the specified sound file exists.
461 */
462 bool SoundWidget::validate(bool showErrorMessage) const
463 {
464  QString file = mFileEdit->text();
465  if (file == mValidatedFile && !file.isEmpty())
466  return true;
467  mValidatedFile = file;
468  if (file.isEmpty() && mEmptyFileAllowed)
469  {
470  mUrl.clear();
471  return true;
472  }
473  KAlarm::FileErr err = KAlarm::checkFileExists(file, mUrl);
474  if (err == KAlarm::FileErr_None)
475  return true;
476  if (err == KAlarm::FileErr_Nonexistent)
477  {
478  mUrl = KUrl(file);
479  if (mUrl.isLocalFile() && !file.startsWith(QLatin1String("/")))
480  {
481  // It's a relative path.
482  // Find the first sound resource that contains files.
483  QStringList soundDirs = KGlobal::dirs()->resourceDirs("sound");
484  if (!soundDirs.isEmpty())
485  {
486  QDir dir;
487  dir.setFilter(QDir::Files | QDir::Readable);
488  for (int i = 0, end = soundDirs.count(); i < end; ++i)
489  {
490  dir = soundDirs[i];
491  if (dir.isReadable() && dir.count() > 2)
492  {
493  mUrl.setPath(soundDirs[i]);
494  mUrl.addPath(file);
495  QString f = mUrl.toLocalFile();
496  err = KAlarm::checkFileExists(f, mUrl);
497  if (err == KAlarm::FileErr_None)
498  return true;
499  if (err != KAlarm::FileErr_Nonexistent)
500  {
501  file = f; // for inclusion in error message
502  break;
503  }
504  }
505  }
506  }
507  if (err == KAlarm::FileErr_Nonexistent)
508  {
509  mUrl.setPath(QDir::homePath());
510  mUrl.addPath(file);
511  QString f = mUrl.toLocalFile();
512  err = KAlarm::checkFileExists(f, mUrl);
513  if (err == KAlarm::FileErr_None)
514  return true;
515  if (err != KAlarm::FileErr_Nonexistent)
516  file = f; // for inclusion in error message
517  }
518  }
519  }
520  mFileEdit->setFocus();
521  if (showErrorMessage
522  && KAlarm::showFileErrMessage(file, err, KAlarm::FileErr_BlankPlay, const_cast<SoundWidget*>(this)))
523  return true;
524  mValidatedFile.clear();
525  mUrl.clear();
526  return false;
527 }
528 
529 /******************************************************************************
530 * Called when the Set Volume checkbox is toggled.
531 */
532 void SoundWidget::slotVolumeToggled(bool on)
533 {
534  mVolumeSlider->setEnabled(on);
535  mFadeCheckbox->setEnabled(on);
536  slotFadeToggled(on && mFadeCheckbox->isChecked());
537 }
538 
539 /******************************************************************************
540 * Called when the Fade checkbox is toggled.
541 */
542 void SoundWidget::slotFadeToggled(bool on)
543 {
544  mFadeBox->setEnabled(on);
545  mFadeVolumeBox->setEnabled(on);
546  emit changed();
547 }
548 
549 // vim: et sw=4:
SoundWidget::changed
void changed()
CheckBox::setReadOnly
virtual void setReadOnly(bool readOnly)
SOUND_DIALOG_NAME
static const char SOUND_DIALOG_NAME[]
Definition: sounddlg.cpp:56
SoundWidget::repeatPause
int repeatPause() const
Definition: sounddlg.cpp:386
SoundWidget::validate
bool validate(bool showErrorMessage) const
Definition: sounddlg.cpp:462
SoundWidget::getVolume
void getVolume(float &volume, float &fadeVolume, int &fadeSeconds) const
Definition: sounddlg.cpp:367
LineEdit::setText
virtual void setText(const QString &str)
SoundWidget::showEvent
virtual void showEvent(QShowEvent *)
Definition: sounddlg.cpp:401
SoundDlg::resizeEvent
virtual void resizeEvent(QResizeEvent *)
Definition: sounddlg.cpp:112
CheckBox::setFocusWidget
void setFocusWidget(QWidget *widget, bool enable=true)
QWidget
SoundDlg::getFile
KUrl getFile() const
Definition: sounddlg.cpp:101
PushButton::setReadOnly
virtual void setReadOnly(bool readOnly, bool noHighlight=false)
QPushButton
lineedit.h
SoundWidget::file
bool file(KUrl &, bool showErrorMessage=true) const
Definition: sounddlg.cpp:355
SoundWidget::resizeEvent
virtual void resizeEvent(QResizeEvent *)
Definition: sounddlg.cpp:395
KDialog
SoundWidget::i18n_chk_Repeat
static QString i18n_chk_Repeat()
Definition: sounddlg.cpp:54
checkbox.h
groupbox.h
LineEdit::text
QString text() const
SoundPicker::browseFile
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
PushButton
SoundDlg::SoundDlg
SoundDlg(const QString &file, float volume, float fadeVolume, int fadeSeconds, int repeatPause, const QString &caption, QWidget *parent)
Definition: sounddlg.cpp:59
pushbutton.h
SoundWidget::SoundWidget
SoundWidget(bool showPlay, bool showRepeat, QWidget *parent)
Definition: sounddlg.cpp:142
SoundWidget::set
void set(const QString &file, float volume, float fadeVolume=-1, int fadeSeconds=0, int repeatPause=-1)
Definition: sounddlg.cpp:307
LineEdit
CheckBox
SoundWidget::~SoundWidget
~SoundWidget()
Definition: sounddlg.cpp:298
QGroupBox
SoundWidget
Definition: sounddlg.h:41
GroupBox::setReadOnly
virtual void setReadOnly(bool readOnly)
SoundDlg::setReadOnly
void setReadOnly(bool)
Definition: sounddlg.cpp:82
SoundWidget::fileName
QString fileName() const
Definition: sounddlg.cpp:347
SpinBox
LineEdit::Url
GroupBox
slider.h
functions.h
miscellaneous functions
SoundWidget::setReadOnly
void setReadOnly(bool)
Definition: sounddlg.cpp:327
kalarm.h
QLabel
soundpicker.h
KHBox
Slider
spinbox.h
SoundDlg::slotButtonClicked
virtual void slotButtonClicked(int button)
Definition: sounddlg.cpp:122
Slider::setReadOnly
virtual void setReadOnly(bool readOnly)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:10 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