Files
hfut-bishe/client/gui/dialogs/FrameAnimationDialog.h
2026-04-07 20:55:30 +08:00

53 lines
1.2 KiB
C++

#pragma once
#include <QDialog>
#include <QString>
#include <QStringList>
namespace core {
class ProjectWorkspace;
}
class QLabel;
class QListWidget;
class QPushButton;
class FrameAnimationDialog final : public QDialog {
Q_OBJECT
public:
FrameAnimationDialog(core::ProjectWorkspace& workspace,
const QString& entityId,
int startFrame,
int endFrame,
QWidget* parent = nullptr);
private slots:
void onSelectFrame();
void onReplaceCurrentFrame();
void onClearCurrentFrame();
void onBatchImportFiles();
void onBatchImportFolder();
private:
void rebuildFrameList();
void updatePreviewForFrame(int frame);
bool applyImageToFrame(int frame, const QString& absImagePath);
private:
core::ProjectWorkspace& m_workspace;
QString m_entityId;
int m_start = 0;
int m_end = 0;
QLabel* m_title = nullptr;
QListWidget* m_list = nullptr;
QLabel* m_preview = nullptr;
QPushButton* m_btnReplace = nullptr;
QPushButton* m_btnClear = nullptr;
QPushButton* m_btnImportFiles = nullptr;
QPushButton* m_btnImportFolder = nullptr;
QString m_defaultImageAbs;
};