#ifndef MEDIAFILEMANAGER_H #define MEDIAFILEMANAGER_H #include #include struct MediaFile { QString name; QString filePath; MediaFile() = default; MediaFile(const QString& n, const QString& p) : name(n), filePath(p) {} }; class MediaFileManager { public: MediaFileManager(); ~MediaFileManager() = default; bool addFile(const QString& name, const QString& filePath); bool removeFile(const QString& name); bool updateFile(const QString& oldName, const QString& newName, const QString& newFilePath); QString getFilePathByName(const QString& name) const; int getFileCount() const; QVector getAllFiles() const; bool contains(const QString& name) const; // Новые методы для управления файлами bool renameFile(const QString& oldName, const QString& newName); bool updateFilePath(const QString& name, const QString& newFilePath); private: int findFileIndex(const QString& name) const; QVector mediaFiles; }; #endif // MEDIAFILEMANAGER_H