Skip to content

Repository files navigation

AssetPreviewer (AboutDEPT LibPreviewer) 🖼️

ACDSee-Style Asset Previewer with Thumbnail Cache
Fast asset browsing with SQLite indexing and thumbnail caching

FeaturesBuildingUsageArchitectureLicense


📝 Project Overview | 项目概述

English

AssetPreviewer (also known as AboutDEPT LibPreviewer) is a high-performance asset preview application with an ACDSee-style three-panel interface. It's designed for fast browsing of large asset libraries with intelligent caching.

Key Features:

  • ✅ ACDSee-style three-panel interface (tree | list | preview)
  • ✅ Large-scale directory indexing with SQLite database
  • ✅ Thumbnail generation and caching (WebP/JPG) for instant loading
  • ✅ Virtualized grid rendering for smooth scrolling
  • ✅ Asynchronous thumbnail generation (QtConcurrent)
  • ✅ Configurable file format support (default: PNG)
  • ✅ Dark theme UI
  • ✅ Cross-platform (Windows/Linux/macOS)

Version: 0.1.0
Developer: 却月数字科技 (Que Yue Digital Technology)
Website: www.cg.dev
Technology: C++17 + Qt 6.4+ (Widgets, Sql, Concurrent)


中文

AssetPreviewer(也称为 AboutDEPT LibPreviewer)是一款高性能的资产预览应用程序,采用 ACDSee 风格的三栏界面。它专为快速浏览大型资产库而设计,具有智能缓存功能。

主要功能:

  • ✅ ACDSee 风格三栏界面(树形 | 列表 | 预览)
  • ✅ 大规模目录索引,使用 SQLite 数据库
  • ✅ 缩略图生成和缓存(WebP/JPG),实现即时加载
  • ✅ 虚拟化网格渲染,流畅滚动
  • ✅ 异步缩略图生成(QtConcurrent)
  • ✅ 可配置文件格式支持(默认:PNG)
  • ✅ 暗色主题 UI
  • ✅ 跨平台(Windows/Linux/macOS)

版本: 0.1.0
开发方: 却月数字科技
网站: www.cg.dev
技术: C++17 + Qt 6.4+ (Widgets, Sql, Concurrent)


✨ Features | 功能特性

English

Core Features

Feature Description
Three-Panel Interface ACDSee-style layout: folder tree, file list, preview panel
SQLite Indexing Fast database indexing for large directories
Thumbnail Cache WebP/JPG thumbnail cache for instant loading
Virtualized Grid Smooth scrolling even with thousands of files
Async Loading Background thumbnail generation with QtConcurrent
Configurable Formats Support for PNG, JPG, WebP, etc. (configurable)
Dark Theme Modern dark theme UI

Performance Features

Feature Benefit
Database Index O(1) lookup for indexed directories
Thumbnail Cache Second-load instant display
Virtualized Rendering Constant memory usage regardless of file count
Async Generation UI remains responsive during thumbnail generation

中文

核心功能

功能 说明
三栏界面 ACDSee 风格布局:文件夹树、文件列表、预览面板
SQLite 索引 大规模目录的快速数据库索引
缩略图缓存 WebP/JPG 缩略图缓存,实现即时加载
虚拟化网格 即使数千个文件也能流畅滚动
异步加载 使用 QtConcurrent 后台生成缩略图
可配置格式 支持 PNG、JPG、WebP 等(可配置)
暗色主题 现代暗色主题 UI

性能特性

功能 优势
数据库索引 索引目录的 O(1) 查找
缩略图缓存 二次加载即时显示
虚拟化渲染 无论文件数量多少,内存使用恒定
异步生成 缩略图生成期间 UI 保持响应

📦 Building | 编译

English

Prerequisites

  • CMake: 3.20+
  • C++ Compiler: C++17 support (MSVC 2019+, GCC 9+, Clang 10+)
  • Qt: 6.4+ (Widgets, Sql, Concurrent modules)

Windows (Visual Studio 2022)

# Configure
cmake -S . -B build -G "Visual Studio 17 2022" -A x64

# Build
cmake --build build --config Release

# Run
.\build\Release\AssetPreviewer.exe

Note: If Qt is not in your PATH, specify CMAKE_PREFIX_PATH:

cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
  -DCMAKE_PREFIX_PATH="D:/Builds/QT/6.9.2/msvc2022_64"

Linux/macOS

# Configure
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

# Build
cmake --build build --config Release

# Run
./build/AssetPreviewer

MinGW (Windows)

# Configure
cmake -S . -B build_mingw -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release

# Build
cmake --build build_mingw --config Release

# Run
./build_mingw/AssetPreviewer.exe

中文

系统要求

  • CMake: 3.20+
  • C++ 编译器: 支持 C++17(MSVC 2019+, GCC 9+, Clang 10+)
  • Qt: 6.4+(Widgets, Sql, Concurrent 模块)

Windows (Visual Studio 2022)

# 配置
cmake -S . -B build -G "Visual Studio 17 2022" -A x64

# 编译
cmake --build build --config Release

# 运行
.\build\Release\AssetPreviewer.exe

注意: 如果 Qt 不在 PATH 中,请指定 CMAKE_PREFIX_PATH

cmake -S . -B build -G "Visual Studio 17 2022" -A x64 `
  -DCMAKE_PREFIX_PATH="D:/Builds/QT/6.9.2/msvc2022_64"

Linux/macOS

# 配置
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

# 编译
cmake --build build --config Release

# 运行
./build/AssetPreviewer

MinGW (Windows)

# 配置
cmake -S . -B build_mingw -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release

# 编译
cmake --build build_mingw --config Release

# 运行
./build_mingw/AssetPreviewer.exe

🚀 Usage | 使用方法

English

Getting Started

  1. Launch the application
  2. Add root directory: Click "Add Root" on the toolbar
  3. Select directory: Choose a directory containing assets (e.g., PNG files)
  4. Wait for indexing: First-time indexing will scan the directory
  5. Browse assets: Click on files to preview them

Thumbnail Cache

  • First load: Thumbnails are generated and cached to .cache/thumbs/
  • Subsequent loads: Thumbnails load instantly from cache
  • Cache format: WebP or JPG (configurable)

Supported Formats

By default, the application indexes PNG files. To support additional formats, modify the configuration in AppConfig.cpp:

// In AppConfig.cpp
QStringList supportedFormats = {"png", "jpg", "jpeg", "webp", "bmp"};

中文

快速开始

  1. 启动应用程序
  2. 添加根目录: 点击工具栏上的 "Add Root"
  3. 选择目录: 选择包含资产的目录(例如 PNG 文件)
  4. 等待索引: 首次索引将扫描目录
  5. 浏览资产: 点击文件进行预览

缩略图缓存

  • 首次加载: 缩略图生成并缓存到 .cache/thumbs/
  • 后续加载: 缩略图从缓存立即加载
  • 缓存格式: WebP 或 JPG(可配置)

支持的格式

默认情况下,应用程序索引 PNG 文件。要支持其他格式,请修改 AppConfig.cpp 中的配置:

// 在 AppConfig.cpp 中
QStringList supportedFormats = {"png", "jpg", "jpeg", "webp", "bmp"};

🏗️ Architecture | 架构

English

┌─────────────────────────────────────────────────────────────┐
│                    AssetPreviewer (GUI)                      │
│                    Qt6 Widgets Application                   │
├─────────────────────────────────────────────────────────────┤
│  MainWindow                                                  │
│  ├── Folder Tree (QTreeView)                                │
│  ├── File List (QListView with ThumbItemDelegate)           │
│  └── Preview Panel (QLabel/Image)                           │
├─────────────────────────────────────────────────────────────┤
│  Core Components                                             │
│  ├── Database (SQLite)     - Index storage                  │
│  ├── Indexer               - Directory scanning             │
│  ├── ThumbCache            - Thumbnail cache management      │
│  └── AssetModel            - Data model for UI              │
├─────────────────────────────────────────────────────────────┤
│  Utils                                                       │
│  └── Paths                  - Path utilities                │
└─────────────────────────────────────────────────────────────┘

Key Components

Component Description
MainWindow Main application window with three-panel layout
Database SQLite database for file indexing
Indexer Asynchronous directory scanner
ThumbCache Thumbnail cache manager (WebP/JPG)
AssetModel Data model for file list
ThumbItemDelegate Custom delegate for thumbnail grid
AppConfig Application configuration

中文

┌─────────────────────────────────────────────────────────────┐
│                    AssetPreviewer (GUI)                      │
│                    Qt6 Widgets 应用程序                        │
├─────────────────────────────────────────────────────────────┤
│  MainWindow                                                  │
│  ├── 文件夹树 (QTreeView)                                    │
│  ├── 文件列表 (QListView with ThumbItemDelegate)             │
│  └── 预览面板 (QLabel/Image)                                │
├─────────────────────────────────────────────────────────────┤
│  核心组件                                                     │
│  ├── Database (SQLite)     - 索引存储                       │
│  ├── Indexer               - 目录扫描                        │
│  ├── ThumbCache            - 缩略图缓存管理                   │
│  └── AssetModel            - UI 数据模型                     │
├─────────────────────────────────────────────────────────────┤
│  工具                                                        │
│  └── Paths                  - 路径工具                       │
└─────────────────────────────────────────────────────────────┘

关键组件

组件 说明
MainWindow 三栏布局的主应用程序窗口
Database 用于文件索引的 SQLite 数据库
Indexer 异步目录扫描器
ThumbCache 缩略图缓存管理器(WebP/JPG)
AssetModel 文件列表的数据模型
ThumbItemDelegate 缩略图网格的自定义委托
AppConfig 应用程序配置

📁 File Structure | 文件结构

AboutDEPT_LibPreviewer/
├── CMakeLists.txt              # CMake build configuration
├── README.md                   # This file
├── app.rc                      # Windows resource file (icon)
├── src/                        # Source code
│   ├── main.cpp                # Application entry point
│   ├── AppConfig.cpp/h         # Application configuration
│   ├── Database.cpp/h          # SQLite database
│   ├── Indexer.cpp/h           # Directory indexer
│   ├── ThumbCache.cpp/h        # Thumbnail cache
│   ├── models/                 # Data models
│   │   └── AssetModel.cpp/h
│   ├── ui/                     # UI components
│   │   ├── MainWindow.cpp/h
│   │   └── ThumbItemDelegate.cpp/h
│   └── utils/                  # Utilities
│       └── Paths.cpp/h
├── resources/                  # Resources (icons, etc.)
│   └── app.qrc
├── build/                      # Build output (VS2022)
├── build_mingw/                # Build output (MinGW)
└── dist/                       # Distribution files

🛠️ Technical Details | 技术细节

English

Dependencies

Dependency Version Purpose
Qt6 6.4+ GUI framework (Widgets, Sql, Concurrent)
SQLite (via Qt) Database for indexing
C++ Standard C++17 Language standard
CMake 3.20+ Build system

Database Schema

The application uses SQLite to store file metadata:

CREATE TABLE files (
    id INTEGER PRIMARY KEY,
    path TEXT UNIQUE,
    filename TEXT,
    size INTEGER,
    modified INTEGER,
    thumbnail_cached INTEGER DEFAULT 0
);

Thumbnail Cache

  • Location: .cache/thumbs/ in the application directory
  • Format: WebP (default) or JPG
  • Naming: Hash of file path
  • Size: Configurable (default: 256x256)

Performance Optimizations

  1. Virtualized Grid: Only visible items are rendered
  2. Async Loading: Thumbnail generation in background threads
  3. Database Index: Fast file lookup
  4. Thumbnail Cache: Avoids regenerating thumbnails

中文

依赖项

依赖项 版本 用途
Qt6 6.4+ GUI 框架(Widgets, Sql, Concurrent)
SQLite (通过 Qt) 索引数据库
C++ 标准 C++17 语言标准
CMake 3.20+ 构建系统

数据库架构

应用程序使用 SQLite 存储文件元数据:

CREATE TABLE files (
    id INTEGER PRIMARY KEY,
    path TEXT UNIQUE,
    filename TEXT,
    size INTEGER,
    modified INTEGER,
    thumbnail_cached INTEGER DEFAULT 0
);

缩略图缓存

  • 位置: 应用程序目录中的 .cache/thumbs/
  • 格式: WebP(默认)或 JPG
  • 命名: 文件路径的哈希值
  • 大小: 可配置(默认:256x256)

性能优化

  1. 虚拟化网格: 仅渲染可见项
  2. 异步加载: 后台线程生成缩略图
  3. 数据库索引: 快速文件查找
  4. 缩略图缓存: 避免重新生成缩略图

🐛 Troubleshooting | 故障排查

English

Build Fails - Qt Not Found

Symptoms:

  • Error: Could NOT find Qt6

Solutions:

  1. Install Qt 6.4+ from Qt website
  2. Set CMAKE_PREFIX_PATH to your Qt installation
  3. Example: -DCMAKE_PREFIX_PATH="D:/Builds/QT/6.9.2/msvc2022_64"

Thumbnails Not Generating

Symptoms:

  • Files listed but no thumbnails shown
  • Slow performance

Solutions:

  1. Check supported formats in AppConfig.cpp
  2. Ensure .cache/thumbs/ directory is writable
  3. Check disk space for thumbnail cache

Database Errors

Symptoms:

  • Error opening or creating database
  • Indexing fails

Solutions:

  1. Check write permissions in application directory
  2. Delete assets.db and re-index
  3. Ensure SQLite is available (via Qt Sql module)

中文

编译失败 - 找不到 Qt

症状:

  • 错误:Could NOT find Qt6

解决方案:

  1. Qt 网站 安装 Qt 6.4+
  2. CMAKE_PREFIX_PATH 设置为你的 Qt 安装路径
  3. 示例:-DCMAKE_PREFIX_PATH="D:/Builds/QT/6.9.2/msvc2022_64"

缩略图不生成

症状:

  • 文件已列出但未显示缩略图
  • 性能缓慢

解决方案:

  1. 检查 AppConfig.cpp 中的支持的格式
  2. 确保 .cache/thumbs/ 目录可写
  3. 检查缩略图缓存的磁盘空间

数据库错误

症状:

  • 打开或创建数据库错误
  • 索引失败

解决方案:

  1. 检查应用程序目录的写入权限
  2. 删除 assets.db 并重新索引
  3. 确保 SQLite 可用(通过 Qt Sql 模块)

📄 License | 许可证

English

This project is licensed under the MIT License - see the LICENSE file for details.


中文

本项目在 MIT 许可证下授权 - 详见 LICENSE 文件。


👨‍💻 Author | 作者

Developer: 却月数字科技 (Que Yue Digital Technology)
Website: www.cg.dev
Version: 0.1.0
Build: AssetPreviewer (AboutDEPT Creative Asset Previewer System)


🙏 Acknowledgments | 致谢

  • Qt framework for cross-platform GUI
  • SQLite for lightweight database
  • ACDSee for UI inspiration

📧 Contact | 联系

For technical support or feature requests, please open an issue on GitHub.


Note: This is an early version (0.1.0). Features may change in future releases.

注意: 这是早期版本(0.1.0)。功能可能在未来版本中更改。

About

Preview Big lib with faster tools

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages