You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/Include/nmNum/nmSubWxs/nmWxPebiResultAnimationSett...

51 lines
1.6 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef NMWXPEBIRESULTANIMATIONSETTINGSDLG_H
#define NMWXPEBIRESULTANIMATIONSETTINGSDLG_H
#include "nmSubWxs_global.h"
#include <QDialog>
class QCheckBox;
class QSpinBox;
/**
* @brief 临时编辑当前结果窗口的回放速度和循环偏好。
*
* 对话框不直接修改 PlaybackController;调用方仅在 accepted() 后读取
* 两个值并事务式提交,因此取消或关闭对话框不会改变窗口偏好。
*/
class NM_SUB_WXS_EXPORT nmWxPebiResultAnimationSettingsDlg
: public QDialog
{
Q_OBJECT
public:
/**
* @brief 使用当前窗口偏好初始化临时编辑值。
* @param nStepsPerSecond 初始速度,防御性限制到 1~60 步/秒。
* @param bLoopEnabled 初始循环开关。
* @param pParent 所属窗口,用于 Qt 对象树和模态定位。
*/
explicit nmWxPebiResultAnimationSettingsDlg(
int nStepsPerSecond,
bool bLoopEnabled,
QWidget* pParent = nullptr);
/** @brief 子控件由 Qt 对象树自动释放。 */
virtual ~nmWxPebiResultAnimationSettingsDlg();
/** @brief 返回尚未提交的整数播放速度,单位为步/秒。 */
int getPlaybackSpeed() const;
/** @brief 返回尚未提交的循环播放选择。 */
bool isLoopEnabled() const;
private:
Q_DISABLE_COPY(nmWxPebiResultAnimationSettingsDlg)
/** @brief 限制在 1~60 步/秒的速度输入框。 */
QSpinBox* m_pSpeedSpin;
/** @brief 是否在末帧之后回到第 0 帧。 */
QCheckBox* m_pLoopCheck;
};
#endif // NMWXPEBIRESULTANIMATIONSETTINGSDLG_H