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

kalarm

sounddlg.h

Go to the documentation of this file.
00001 /*
00002  *  sounddlg.h  -  sound file selection and configuration dialog
00003  *  Program:  kalarm
00004  *  Copyright (c) 2005-2007 by David Jarvie <software@astrojar.org.uk>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License along
00017  *  with this program; if not, write to the Free Software Foundation, Inc.,
00018  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef SOUNDDLG_H
00022 #define SOUNDDLG_H
00023 
00024 #include <QString>
00025 #include <kurl.h>
00026 #include <kdialog.h>
00027 #include <kmessagebox.h>
00028 
00029 class QPushButton;
00030 class QShowEvent;
00031 class QResizeEvent;
00032 class KHBox;
00033 namespace Phonon { class MediaObject; }
00034 class PushButton;
00035 class CheckBox;
00036 class SpinBox;
00037 class Slider;
00038 class LineEdit;
00039 
00040 
00041 class SoundDlg : public KDialog
00042 {
00043         Q_OBJECT
00044     public:
00045         SoundDlg(const QString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
00046                  const QString& caption, QWidget* parent);
00047         ~SoundDlg();
00048         void           setReadOnly(bool);
00049         bool           isReadOnly() const    { return mReadOnly; }
00050         KUrl           getFile() const       { return mUrl; }
00051         bool           getSettings(float& volume, float& fadeVolume, int& fadeSeconds) const;
00052         QString        defaultDir() const    { return mDefaultDir; }
00053 
00054         static QString i18n_chk_Repeat();      // text of Repeat checkbox
00055 
00056     protected:
00057         virtual void   showEvent(QShowEvent*);
00058         virtual void   resizeEvent(QResizeEvent*);
00059 
00060     protected slots:
00061         virtual void   slotOk();
00062 
00063     private slots:
00064         void           slotPickFile();
00065         void           slotVolumeToggled(bool on);
00066         void           slotFadeToggled(bool on);
00067         void           playSound();
00068         void           playFinished();
00069 
00070     private:
00071         bool           checkFile();
00072 
00073         QPushButton*   mFilePlay;
00074         LineEdit*      mFileEdit;
00075         PushButton*    mFileBrowseButton;
00076         CheckBox*      mRepeatCheckbox;
00077         CheckBox*      mVolumeCheckbox;
00078         Slider*        mVolumeSlider;
00079         CheckBox*      mFadeCheckbox;
00080         KHBox*         mFadeBox;
00081         SpinBox*       mFadeTime;
00082         KHBox*         mFadeVolumeBox;
00083         Slider*        mFadeSlider;
00084         QString        mDefaultDir;     // current default directory for mFileEdit
00085         KUrl           mUrl;
00086         Phonon::MediaObject* mPlayer;
00087         bool           mReadOnly;
00088 };
00089 
00090 #endif

kalarm

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

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal