00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _ALERT_TONE_BROWSER_H_
00020 #define _ALERT_TONE_BROWSER_H_
00021
00022 #include <meegocontrolexport.h>
00023 #include "alerttonetoplevel.h"
00024 #include "alerttone.h"
00025
00026 class QString;
00027 class MTextEdit;
00028 class QGraphicsLinearLayout;
00029 class MCustomContentItem;
00030 class MAction;
00031 class RightArrowItem;
00032 class AlertTonePreview;
00033 class AlertToneDefaults;
00034 class MApplicationPage;
00035 class MLabel;
00036
00043 class MC_EXPORT AlertToneBrowser : public AlertToneToplevel
00044 {
00045 Q_OBJECT
00046
00047 public:
00048 AlertToneBrowser(AlertTone *tone, QGraphicsWidget *parent = 0);
00049 ~AlertToneBrowser();
00050
00051 void set (
00052 const QVariant &filename);
00053
00054 private slots:
00055 void defaultItemClicked (const QString &filename);
00056 void defaultsDisplayEntered();
00057 void setAlertTone (
00058 const QString &fname,
00059 bool setGui = false);
00060
00061 void launchMusicBrowser();
00062 void launchOviStore();
00063 void selectingMusicItem(const QString &item);
00064 void cancel();
00065 void accept();
00066 void textChanged ();
00067 void browserBackButtonClicked ();
00068 void stopPlayingSound ();
00069
00070 protected:
00071 virtual void retranslateUi();
00072 virtual void polishEvent ();
00073
00074 private:
00075 void startPlayingSound (const QString &filename);
00076 virtual void createContent();
00077
00078 AlertTone *m_tone;
00079 MLabel *m_TitleLabel;
00080 RightArrowItem *m_my_music;
00081 RightArrowItem *m_ovi_store;
00082
00083 QGraphicsLinearLayout *m_MainLayout;
00084 AlertToneDefaults *m_defaults;
00085 MTextEdit *m_LiveFilterEditor;
00086 QString currSelectedFile;
00087 AlertTonePreview *m_preview;
00088 MApplicationPage *m_MusicBrowser;
00089
00090 MAction *m_DoneAction;
00091 MAction *m_CancelAction;
00092
00093 #ifdef UNIT_TEST
00094 friend class Ut_AlertToneBrowserTests;
00095 #endif
00096 };
00097
00098 #endif