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 <tqframe.h>
00025 #include <tqstring.h>
00026 #include <kdialogbase.h>
00027
00028 class TQHBox;
00029 class TQPushButton;
00030 class KArtsDispatcher;
00031 namespace KDE { class PlayObject; }
00032 class LineEdit;
00033 class PushButton;
00034 class CheckBox;
00035 class SpinBox;
00036 class Slider;
00037
00038
00039 class SoundDlg : public KDialogBase
00040 {
00041 Q_OBJECT
00042 public:
00043 SoundDlg(const TQString& file, float volume, float fadeVolume, int fadeSeconds, bool repeat,
00044 const TQString& caption, TQWidget* parent, const char* name = 0);
00045 ~SoundDlg();
00046 void setReadOnly(bool);
00047 bool isReadOnly() const { return mReadOnly; }
00048 TQString getFile() const { return mFileName; }
00049 bool getSettings(float& volume, float& fadeVolume, int& fadeSeconds) const;
00050 TQString defaultDir() const { return mDefaultDir; }
00051
00052 static TQString i18n_SetVolume();
00053 static TQString i18n_v_SetVolume();
00054 static TQString i18n_Repeat();
00055 static TQString i18n_p_Repeat();
00056
00057 protected:
00058 virtual void showEvent(TQShowEvent*);
00059 virtual void resizeEvent(TQResizeEvent*);
00060
00061 protected slots:
00062 virtual void slotOk();
00063
00064 private slots:
00065 void slotPickFile();
00066 void slotVolumeToggled(bool on);
00067 void slotFadeToggled(bool on);
00068 void playSound();
00069 void checkAudioPlay();
00070
00071 private:
00072 void stopPlay();
00073 bool checkFile();
00074
00075 TQPushButton* mFilePlay;
00076 LineEdit* mFileEdit;
00077 PushButton* mFileBrowseButton;
00078 CheckBox* mRepeatCheckbox;
00079 CheckBox* mVolumeCheckbox;
00080 Slider* mVolumeSlider;
00081 CheckBox* mFadeCheckbox;
00082 TQHBox* mFadeBox;
00083 SpinBox* mFadeTime;
00084 TQHBox* mFadeVolumeBox;
00085 Slider* mFadeSlider;
00086 TQString mDefaultDir;
00087 TQString mFileName;
00088 bool mReadOnly;
00089
00090 KArtsDispatcher* mArtsDispatcher;
00091 KDE::PlayObject* mPlayObject;
00092 TQTimer* mPlayTimer;
00093 TQString mLocalAudioFile;
00094 bool mPlayStarted;
00095 };
00096
00097 #endif
|