Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem_Warning_Fixed
Diff: FileSelectorWav.hpp
- Revision:
- 18:6631cd0fbbcd
- Parent:
- 17:abfd6af9a236
--- a/FileSelectorWav.hpp Thu Mar 23 02:58:48 2017 +0000
+++ b/FileSelectorWav.hpp Tue Jun 04 21:35:59 2019 +0000
@@ -1,8 +1,4 @@
-//--------------------------------------------------------------
-// FileSelector class ---- Header ----
-// SD カード内のファイル名の一覧を表示し,ファイルを選択する
-//
-// 2017/03/23, Copyright (c) 2017 MIKAMI, Naoki
+
//--------------------------------------------------------------
#ifndef FILE_SELECTOR_HPP
@@ -10,7 +6,7 @@
#include "F746_GUI.hpp"
#include "SD_WavReader.hpp"
-#include <algorithm> // sort() で使用
+#include <algorithm> // Được sử dụng bởi sort()
#include <string>
namespace Mikami
@@ -23,21 +19,20 @@
virtual ~FileSelector();
- // ファイルの一覧表を作る.WAV ファイルが存在しない場合は false を返す
+ // Lập danh sách các tập tin. Trả về false nếu tệp WAV không tồn tại
bool CreateTable();
-
- // ファイルを選択する
+ // chọn tập tin
bool Select(string &fileName);
- // ファイルの一覧の表示
+ // Hiển thị danh sách các tập tin
void DisplayFileList(bool sortEnable = true);
- // ファイルの一覧の消去
+ // xóa danh sách các tập tin
void Erase(uint16_t x, uint16_t y, uint16_t width, uint16_t height,
uint32_t color = GuiBase::ENUM_BACK);
private:
- static const int MAX_LIST_PAGE_ = 6; // 1ページに表示するファイル数の最大値
+ static const int MAX_LIST_PAGE_ = 6; // Số lượng tệp tối đa được hiển thị trên một trang
static const uint8_t W_H_ = 24;
static const uint8_t V_L_ = 36;
static const uint32_t BASE_COLOR_ = 0xFF80FFA0;
@@ -53,16 +48,16 @@
Label pageLabel_;
LCD_DISCO_F746NG &lcd_;
SD_WavReader &sdReader_;
- int page_; // 現在のページ,最初のページは 1
- int nOld_; // ページ内で以前選択したファイルのインデックス
- int kOld_; // 以前選択したファイルのインデックス
+ int page_; // Trang hiện tại, trang đầu tiên là 1
+ int nOld_; // Chỉ mục của tệp đã chọn trước đó trong trang
+ int kOld_; // Chỉ mục của tệp đã chọn trước đó
int maxPage_;
int fileCount_;
- // 拡張子を削除したファイル名を取得
+ // Lấy tên tệp với phần mở rộng bị xóa
string GetFileNameNoExt(int n);
- // コピー・コンストラクタとオブジェクトの代入演算子は使用禁止
+ // Không sử dụng các hàm tạo sao chép và toán tử gán đối tượng
FileSelector(const FileSelector&);
FileSelector& operator=(const FileSelector&);
};