${CMAKE_CURRENT_SOURCE_DIR}/nativeui/aimodels/src/AiModelsPresenter.cpp
#音乐播放器
- ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/musicplayer/src/MusicPlayerControlView.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/musicplayer/src/MusicPlayerModel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/musicplayer/src/MusicPlayerPresenter.cpp
${CMAKE_CURRENT_SOURCE_DIR}/nativeui/musicplayer/src/MusicPlayerView.cpp
static constexpr const char *PNG_APPLIST_AIVOICE_IMAGE = APP_LIST_PATH "/aivoice.bin"; // AI Voice(人工智能语音)
static constexpr const char *PNG_APPLIST_SLEEP_IMAGE = APP_LIST_PATH "/sleeping.bin"; // 睡眠
static constexpr const char *PNG_APPLIST_INFORMATION_IMAGE = APP_LIST_PATH "/information.bin"; // 计算器
+ static constexpr const char *PNG_APPLIST_MUSIC_IMAGE = APP_LIST_PATH "/music.bin"; // 音乐
// AppList hexagon icon
static constexpr const char *PNG_APPLIST_DEFAULT_IMG = APP_RES_PATH "/regular_hexagon.bin";
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-03-16 14:43:44
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-26 14:53:43
+ * @LastEditTime: 2024-08-06 16:03:11
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativelauncher/include/ui_resource_image.h
*/
#ifndef UI_RESOURCE_IMAGE_H
static const int HEART_HEARTRATE_TOP = 0x100003;
/* -------------------------------------------------------------------------- */
static const int PLAYER_BACKGROUND = 0x200001; // 音乐背景
- static const int PLAYER_DECREASE_BUTTON = 0x200002; // 点击后声音减少
- static const int PLAYER_EARPHONE = 0x200003; // 大的蓝牙耳机的icon
- static const int PLAYER_EARPHONE_COLOR = 0x200004; // 蓝牙耳机模式绿色图片
- static const int PLAYER_EARPHONE_WHITE = 0x200005; // 蓝牙耳机模式白色图片
- static const int PLAYER_ELLIPSE = 0x200006; // 椭圆
- static const int PLAYER_INCREASE_BUTTON = 0x200007; // 点击后声音加
- static const int PLAYER_LOCAL_MUSIC_COLOR = 0x200008; // 本地音乐模式绿色图片,默认本地模式
- static const int PLAYER_LOCAL_MUSIC_WHITE = 0x200009; // 本地音乐模式白色图片
- static const int PLAYER_MUSIC_DELETE = 0x20000a; // 删除音乐
- static const int PLAYER_MUSIC_LIST = 0x20000b; // 音乐列表
- static const int PLAYER_MUSIC_NEXT = 0x20000c; // 下一首音乐
- static const int PLAYER_MUSIC_PROVE = 0x20000d; // 上一首音乐
- static const int PLAYER_MUSIC_VOICE = 0x20000e; // 音量
- static const int PLAYER_MUTE_BUTTON = 0x20000f; // 静音
- static const int PLAYER_PAUSE = 0x200010; // 播放暂停
- static const int PLAYER_PHONE_COLOR = 0x200011; // 手机音乐模式绿色图片
- static const int PLAYER_PHONE_WHITE = 0x200012; // 手机音乐模式白色图片
- static const int PLAYER_PLAY = 0x200013; // 播放音乐
- static const int PLAYER_PLAYERSMODEL_LOOP = 0x200014; // 播放模式:循环播放
- static const int PLAYER_PLAYERSMODEL_RANDOM = 0x200015; // 播放模式:随机播放
- static const int PLAYER_PLAYERSMODEL_REPEATS = 0x200016; // 播放模式:单曲循环
- static const int PLAYER_PLAYERSMODEL_SEQUENCE = 0x200017; // 播放模式循序播放
- static const int PLAYER_PLAYING = 0x200018; // 播放音乐中
+ static const int PLAYER_BLUETOOTH_COLOR = 0x200002; // 蓝牙图标蓝色图片
+ static const int PLAYER_BLUETOOTH_GRAY = 0x200003; // 蓝牙图标灰色图片
+ static const int PLAYER_DECREASE_BUTTON = 0x200004; // 点击后声音减少
+ static const int PLAYER_DOWM_66 = 0x200005; // 朝下的66图片
+ static const int PLAYER_EARPHONE = 0x200006; // 大的蓝牙耳机的icon
+ static const int PLAYER_EARPHONE_COLOR = 0x200007; // 蓝牙耳机模式绿色图片
+ static const int PLAYER_EARPHONE_WHITE = 0x200008; // 蓝牙耳机模式白色图片
+ static const int PLAYER_ELLIPSE = 0x200009; // 绿色椭圆
+ static const int PLAYER_INCREASE_BUTTON = 0x20000a; // 点击后声音加
+ static const int PLAYER_LOCAL_MUSIC_COLOR = 0x20000b; // 本地音乐模式绿色图片,默认本地模式
+ static const int PLAYER_LOCAL_MUSIC_WHITE = 0x20000c; // 本地音乐模式白色图片
+ static const int PLAYER_LOOK_CONNECTED_NOTE = 0x20000d; // 查看已连接蓝牙耳机提示图标
+ static const int PLAYER_MUSIC_DELETE = 0x20000e; // 删除音乐
+ static const int PLAYER_MUSIC_LIST = 0x20000f; // 音乐列表
+ static const int PLAYER_MUSIC_NEXT = 0x200010; // 下一首音乐
+ static const int PLAYER_MUSIC_PAUSE = 0x200011; // 播放暂停
+ static const int PLAYER_MUSIC_PLAY = 0x200012; // 播放音乐
+ static const int PLAYER_MUSIC_PLAYING = 0x200013; // 播放音乐中
+ static const int PLAYER_MUSIC_PROVE = 0x200014; // 上一首音乐
+ static const int PLAYER_MUSIC_VOICE = 0x200015; // 声音
+ static const int PLAYER_MUTE_BUTTON = 0x200016; // 静音
+ static const int PLAYER_PHONE_COLOR = 0x200017; // 手机音乐模式绿色图片
+ static const int PLAYER_PHONE_WHITE = 0x200018; // 手机音乐模式白色图片
+ static const int PLAYER_PLAYERSMODEL_LOOP = 0x200019; // 播放模式:循环播放
+ static const int PLAYER_PLAYERSMODEL_RANDOM = 0x20001a; // 播放模式:随机播放
+ static const int PLAYER_PLAYERSMODEL_REPEATS = 0x20001b; // 播放模式:单曲循环
+ static const int PLAYER_PLAYERSMODEL_SEQUENCE = 0x20001c; // 播放模式: 循序播放
+ static const int PLAYER_PLAYERSMODEL_UNUSABLE = 0x20001d; // 播放模型:不能使用
+ static const int PLAYER_PLAYING_GLARY = 0x20001e; // 播放音乐中大的灰色图片
+ static const int PLAYER_UP_66 = 0x20001f; // 朝上的66图片
+
/* -------------------------------------------------------------------------- */
static const int CLOCK_CLOCK0 = 0x300001;
static const int CLOCK_CLOCK1 = 0x300002;
{VIEW_SET_DIAL_STYLE, PNG_APPLIST_CHANGEDIAL_IMAGE, PNG_APPLIST_CHANGEDIAL_IMAGE, PNG_APPLIST_DEFAULT_IMG, "更换表盘", STR_WATCH_FACE, nullptr},
{VIEW_SAVEELE, PNG_APPLIST_SAVEELE_IMAGE, PNG_APPLIST_SAVEELE_IMAGE, PNG_APPLIST_DEFAULT_IMG, "省电模式", STR_POWER_SAVE_MODE, nullptr},
{VIEW_SLEEP, PNG_APPLIST_SLEEP_IMAGE, PNG_APPLIST_SLEEP_IMAGE, PNG_APPLIST_DEFAULT_IMG, "睡眠", STR_SLEEP, nullptr},
+ // {VIEW_MUSIC_PLAYER, PNG_APPLIST_MUSIC_IMAGE, PNG_APPLIST_MUSIC_IMAGE, PNG_APPLIST_DEFAULT_IMG, "音乐播放器", STR_MUSIC, nullptr},
{VIEW_SETTING, PNG_APPLIST_SETTING_IMAGE, PNG_APPLIST_SETTING_IMAGE, PNG_APPLIST_DEFAULT_IMG, "设置", STR_SETTINGS, nullptr},
#if 0
/*屏蔽Slice*/
#include "CompassControlView.h"
#include "DialViewGroup.h"
#include "MainClockView.h"
-#include "PlayersView.h"
+#include "player/include/PlayersView.h"
#include "MainPresenterSample.h"
#include "HeartRateView.h"
#include "components/ui_card_page.h"
/*
- * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
- * Description: VolumeSettingView view
- * Create: 2021-09-5
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-08-05 15:20:02
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-08-06 16:30:51
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingPresenter.h
*/
#ifndef VOLUME_SETTING_PRESENTER_H
#include "components/ui_view_group.h"
#include "components/ui_slider.h"
#include "VolumeSettingView.h"
-#include "PlayersView.h"
+#include "player/include/PlayersView.h"
#include "BaseView.h"
namespace OHOS {
/*
- * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
- * Description: VolemeSettingView view
- * Create: 2021-09-5
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-08-05 15:20:02
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-08-06 16:26:51
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/main/include/VolumeSettingView.h
*/
#ifndef VOLUME_SETTING_VIEW_H
#include "components/ui_button.h"
#include "components/ui_view_group.h"
#include "components/ui_slider.h"
-#include "PlayersView.h"
+#include "player/include/PlayersView.h"
#include "BaseView.h"
#include "wearable_log.h"
#include "VolumeSettingPresenter.h"
+++ /dev/null
-/*
- * @Author: luozheng 1732036298@qq.com
- * @Date: 2024-08-02 15:21:47
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-02 15:58:32
- * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerControlView.h
- */
-#include "components/ui_card_page.h"
-
-namespace OHOS
-{
- class MusicPlayerControlView : public UICardPage
- {
- public:
- MusicPlayerControlView();
- ~MusicPlayerControlView();
- static MusicPlayerControlView *GetInstance(void);
-
- private:
- };
-
-}
\ No newline at end of file
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-08-01 18:02:51
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-02 15:57:46
+ * @LastEditTime: 2024-08-06 15:09:50
* @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/musicplayer/include/MusicPlayerView.h
*/
#include "BaseView.h"
#include "View.h"
-#include "musicplayer/include/MusicPlayerControlView.h"
namespace OHOS
{
private:
void CreateMusicPlayerView(void);
void ClearAll(void);
- MusicPlayerControlView *musicPlayerControlView{nullptr};
bool viewInitStatus{false};
};
}
+++ /dev/null
-/*
- * @Author: luozheng 1732036298@qq.com
- * @Date: 2024-08-02 15:26:48
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-02 15:56:37
- * @FilePath: /xts_origin/FD230/code/sdk/application/wearable/fd230app/nativeui/musicplayer/src/MusicPlayerControlView.cpp
- */
-#include "musicplayer/include/MusicPlayerControlView.h"
-#include "wearable_log.h"
-namespace OHOS
-{
- static MusicPlayerControlView *g_pMusicPlayerControlView{nullptr};
- MusicPlayerControlView::MusicPlayerControlView()
- {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MusicPlayerControlView::MusicPlayerControlView");
- g_pMusicPlayerControlView = this;
- }
-
- MusicPlayerControlView::~MusicPlayerControlView()
- {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MusicPlayerControlView::~MusicPlayerControlView");
- g_pMusicPlayerControlView = nullptr;
- }
-
- MusicPlayerControlView *MusicPlayerControlView::GetInstance(void)
- {
- return g_pMusicPlayerControlView;
- }
-
-}
\ No newline at end of file
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-05-07 11:25:58
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-02 16:13:00
+ * @LastEditTime: 2024-08-06 15:10:00
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/MusicPlayer/src/MusicPlayerView.cpp
*/
#include "musicplayer/include/MusicPlayerPresenter.h"
void MusicPlayerView::CreateMusicPlayerView(void)
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MusicPlayerView::CreateMusicPlayerView");
- if (musicPlayerControlView == nullptr)
- {
- musicPlayerControlView = new MusicPlayerControlView();
- if (musicPlayerControlView == nullptr)
- {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "musicPlayerControlView new fail!!");
- return;
- }
- }
- container_->Add(musicPlayerControlView);
}
void MusicPlayerView::OnStart()
{
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MusicPlayerView::OnSetUpView");
View<MusicPlayerPresenter>::OnSetUpView();
- Draw();
return;
}
#include "font/ui_font.h"\r
#include "graphic_config.h"\r
#include "components/ui_card_page.h"\r
-#include "PlayersPresenter.h"\r
+#include "player/include/PlayersPresenter.h"\r
#include "components/ui_scroll_view.h"\r
#include "PlayerListDelSongView.h"\r
#include "common/image_cache_manager.h"\r
* Description: bluetooth view 设置页面\r
* Create: 2021-09-5\r
*/\r
-#include "BluetoothView.h"\r
-#include "PlayersView.h"\r
+#include "player/include/BluetoothView.h"\r
+#include "player/include/PlayersView.h"\r
#include "UiConfig.h"\r
#include "BluetoothEarPhoneView.h"\r
#include "PlayersPresenter.h"\r
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-06-12 14:15:45
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-06-28 09:47:26
+ * @LastEditTime: 2024-08-06 16:18:03
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/player/src/PlayerListitemView.cpp
*/
-#include "PlayerListitemView.h"
+#include "player/include/PlayerListitemView.h"
#include "ui_resource_image.h"
#include "common/image_cache_manager.h"
namespace OHOS
* Create: 2021-07-26\r
*/\r
#include <string>\r
-#include "PlayersCaseListAdapter.h"\r
+#include "player/include/PlayersCaseListAdapter.h"\r
#include "gfx_utils/list.h"\r
-#include "PlayersView.h"\r
-#include "PlayersPresenter.h"\r
+#include "player/include/PlayersView.h"\r
+#include "player/include/PlayersPresenter.h"\r
#include "wearable_log.h"\r
-#include "PlayersModel.h"\r
-#include "PlayerListitemView.h"\r
+#include "player/include/PlayersModel.h"\r
+#include "player/include/PlayerListitemView.h"\r
#include "ui_resource_image.h"\r
#include "common/image_cache_manager.h"\r
namespace OHOS {\r
\r
void BtnOnClickListListener::SongClick(PlayersCaseListAdapter *P_PlayersCaseListAdapter,int index)\r
{\r
- ImageInfo *imagePlaying = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PLAYING, PLAYER_IAMGES);\r
+ ImageInfo *imagePlaying = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PLAY, PLAYER_IAMGES);\r
P_PlayersCaseListAdapter->p_BtnOnClickListListener->m_label[index]->SetTextColor(Color::GetColorFromRGBA(0x4f, 0xc3, 0x4c, 0xff));\r
P_PlayersCaseListAdapter->p_BtnOnClickListListener->m_button[index]->SetImageSrc(imagePlaying,imagePlaying);\r
//P_PlayersCaseListAdapter->p_BtnOnClickListListener->m_button[index]->SetViewId("playing");\r
* Create: 2021-07-26
*/
-#include "PlayersModel.h"
+#include "player/include/PlayersModel.h"
#include "thread_adapter.h"
#include "UiConfig.h"
#include "bts_avrcp_controller.h"
#include "bts_avrcp_target.h"
#include "bts_a2dp_source.h"
-#include "BluetoothModel.h"
+#include "bluetooth/include/BluetoothModel.h"
namespace OHOS {
#include <iostream>\r
#include <cstdlib>\r
#include <time.h>\r
-#include "PlayersPresenter.h"\r
+#include "player/include/PlayersPresenter.h"\r
#include "wearable_log.h"\r
#include "common/image_cache_manager.h"\r
#include "UiConfig.h"\r
#include "ui_resource_image.h"\r
-#include "PlayersView.h"\r
-#include "PlayersModel.h"\r
+#include "player/include/PlayersView.h"\r
+#include "player/include/PlayersModel.h"\r
#include "BluetoothPresenter.h"\r
#include "graphic_service.h"\r
-#include "PhoneService.h"\r
+#include "phoneservice/include/PhoneService.h"\r
\r
#include "bts_avrcp_controller.h"\r
#include "bts_avrcp_target.h"\r
#include <unistd.h>\r
#include "common/image_cache_manager.h"\r
#include "ui_resource_image.h"\r
-#include "PlayersView.h"\r
+#include "player/include/PlayersView.h"\r
#include "UiConfig.h"\r
-#include "PlayersModel.h"\r
-#include "PlayersCaseListAdapter.h"\r
-#include "MainViewSample.h"\r
+#include "player/include/PlayersModel.h"\r
+#include "player/include/PlayersCaseListAdapter.h"\r
+#include "main/include/MainViewSample.h"\r
#include "traing/training_card/include/TraingCardView.h"\r
\r
namespace OHOS\r
{\r
static PlayersView *g_pPlayersView = nullptr;\r
-\r
-#define STEP_LABEL_X 166\r
-#define STEP_LABEL_Y 30\r
-#define TEXT_WIDTH 120\r
-#define TEXT_HEIGHT 30\r
-\r
PlayersView::PlayersView()\r
{\r
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "PlayersView::PlayersView");\r
}\r
playerButton->SetPosition(195, 195, 80, 80); // 140:x 139:y 172:width 172:height\r
playerButton->SetOnClickListener(playerlistener);\r
- // ImagePlay = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PLAY, PLAYER_IAMGES); // 播放图片\r
- // ImagerPause = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PAUSE, PLAYER_IAMGES); // 暂停图片\r
+ // ImagePlay = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PLAY, PLAYER_IAMGES); // 播放图片\r
+ // ImagerPause = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PAUSE, PLAYER_IAMGES); // 暂停图片\r
// playerButton->SetImages(ImagePlay, ImagerPause);\r
Add(playerButton);\r
\r
\r
ImageInfo *ImagePlay;\r
ImageInfo *ImagerPause;\r
- ImagePlay = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PLAY, PLAYER_IAMGES); // 播放图片\r
- ImagerPause = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_PAUSE, PLAYER_IAMGES); // 暂停图片\r
+ ImagePlay = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PLAY, PLAYER_IAMGES); // 播放图片\r
+ ImagerPause = ImageCacheManager::GetInstance().LoadOneInMultiRes(PLAYER_MUSIC_PAUSE, PLAYER_IAMGES); // 暂停图片\r
playerButton->SetImages(ImagePlay, ImagerPause);\r
\r
if(LoadPlayerButtonImage(nextButton,PLAYER_MUSIC_NEXT) == false)\r
ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_BACKGROUND,PLAYER_IAMGES);\r
ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_ELLIPSE,PLAYER_IAMGES);\r
\r
- ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_PLAY,PLAYER_IAMGES);\r
- ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_PAUSE,PLAYER_IAMGES);\r
+ ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_PLAY,PLAYER_IAMGES);\r
+ ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_PAUSE,PLAYER_IAMGES);\r
ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_NEXT,PLAYER_IAMGES);\r
ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_PROVE,PLAYER_IAMGES);\r
ImageCacheManager::GetInstance().UnloadOneInMultiRes(PLAYER_MUSIC_LIST,PLAYER_IAMGES);\r
-/***
- * @Date: 2024-04-15 10:55:58
- * @LastEditors: Caisking 3449750381@qq.com
- * @LastEditTime: 2024-05-10 11:05:32
- * @FilePath: /sdk/application/wearable/fd230app/nativeui/screensetting/src/ScreenModels.cpp
- */
/*
- * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved.
- * Description: ScreenModels
- * Author:
- * Create: 2022-01-22
+ * @Author: luozheng 1732036298@qq.com
+ * @Date: 2024-08-05 15:20:03
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-08-06 16:32:50
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/screensetting/src/ScreenModels.cpp
*/
#include "wearable_log.h"
void ScreenModels::PreLoadAppimages(void)
{
- LoadAppMultiImages(PLAYER_IAMGES, PLAYER_BACKGROUND, PLAYER_PLAYING);
+ LoadAppMultiImages(PLAYER_IAMGES, PLAYER_BACKGROUND, PLAYER_UP_66);
//LoadAppMultiImages(CLOCK_IAMGES, CLOCK_CLOCK0, CLOCK_SECOND);
LoadAppMultiImages(COMPASS_IAMGES, COMPASS_COMPASS0, COMPASS_COMPASS2);
LoadAppMultiImages(DROPDOWN_IAMGES, DROPDOWN_BLUETOOTHCONNECTED, DROPDOWN_SETTING);