kaddressbook
soundwidget.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef SOUNDWIDGET_H
00025 #define SOUNDWIDGET_H
00026
00027 #include <kabc/sound.h>
00028
00029 #include "contacteditorwidget.h"
00030
00031 class KURLRequester;
00032
00033 class QCheckBox;
00034 class QPushButton;
00035
00036 class SoundWidget : public KAB::ContactEditorWidget
00037 {
00038 Q_OBJECT
00039
00040 public:
00041 SoundWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
00042 ~SoundWidget();
00043
00044 void loadContact( KABC::Addressee *addr );
00045 void storeContact( KABC::Addressee *addr );
00046 void setReadOnly( bool readOnly );
00047
00048 private slots:
00049 void playSound();
00050 void loadSound();
00051 void updateGUI();
00052 void urlChanged( const QString& );
00053
00054 private:
00055 KURLRequester *mSoundUrl;
00056
00057 QCheckBox *mUseSoundUrl;
00058 QPushButton *mPlayButton;
00059
00060 KABC::Sound mSound;
00061 bool mReadOnly;
00062 };
00063
00064 class SoundWidgetFactory : public KAB::ContactEditorWidgetFactory
00065 {
00066 public:
00067 KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name )
00068 {
00069 return new SoundWidget( ab, parent, name );
00070 }
00071
00072 QString pageIdentifier() const { return "misc"; }
00073 };
00074
00075 #endif
|