kalarm
sounddlg.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef SOUNDDLG_H
00022 #define SOUNDDLG_H
00023
00024 #include <qframe.h>
00025 #include <qstring.h>
00026 #include <kdialogbase.h>
00027
00028 class QHBox;
00029 class QPushButton;
00030 class LineEdit;
00031 class PushButton;
00032 class CheckBox;
00033 class SpinBox;
00034 class Slider;
00035
00036
00037 class SoundDlg : public KDialogBase
00038 {
00039 Q_OBJECT
00040 public:
00041 SoundDlg(const QString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
00042 const QString& caption, QWidget* parent, const char* name = 0);
00043 void setReadOnly(bool);
00044 bool isReadOnly() const { return mReadOnly; }
00045 QString getFile() const { return mFileName; }
00046 bool getSettings(float& volume, float& fadeVolume, int& fadeSeconds) const;
00047 QString defaultDir() const { return mDefaultDir; }
00048
00049 static QString i18n_SetVolume();
00050 static QString i18n_v_SetVolume();
00051 static QString i18n_Repeat();
00052 static QString i18n_p_Repeat();
00053
00054 protected:
00055 virtual void showEvent(QShowEvent*);
00056 virtual void resizeEvent(QResizeEvent*);
00057
00058 protected slots:
00059 virtual void slotOk();
00060
00061 private slots:
00062 void slotPickFile();
00063 void slotVolumeToggled(bool on);
00064 void slotFadeToggled(bool on);
00065 void playSound();
00066
00067 private:
00068 bool checkFile();
00069
00070 QPushButton* mFilePlay;
00071 LineEdit* mFileEdit;
00072 PushButton* mFileBrowseButton;
00073 CheckBox* mRepeatCheckbox;
00074 CheckBox* mVolumeCheckbox;
00075 Slider* mVolumeSlider;
00076 CheckBox* mFadeCheckbox;
00077 QHBox* mFadeBox;
00078 SpinBox* mFadeTime;
00079 QHBox* mFadeVolumeBox;
00080 Slider* mFadeSlider;
00081 QString mDefaultDir;
00082 QString mFileName;
00083 bool mReadOnly;
00084 };
00085
00086 #endif
|