97 lines
2.2 KiB
C++
97 lines
2.2 KiB
C++
/**
|
|
* @file PaiSaveAsWorkflowDialog.h
|
|
* @brief 工作流另存为对话框的定义
|
|
* @date 2013-10-10
|
|
*/
|
|
#ifndef PAI_FRAME_WORKFLOWWIDGET_PAISAVEASWORKFLOWDIALOG_H
|
|
#define PAI_FRAME_WORKFLOWWIDGET_PAISAVEASWORKFLOWDIALOG_H
|
|
|
|
#include <QUuid>
|
|
|
|
#include "PaiDialog.h"
|
|
|
|
namespace pai
|
|
{
|
|
namespace gui
|
|
{
|
|
class PaiPushButton;
|
|
class PaiNameLineEdit;
|
|
class PaiProjectComboBox;
|
|
}
|
|
namespace objectmodel
|
|
{
|
|
class PaiSurvey;
|
|
}
|
|
}
|
|
|
|
namespace pai
|
|
{
|
|
namespace gui
|
|
{
|
|
/**
|
|
* @class PaiSaveAsWorkflowDialog
|
|
* @brief 工作流另存为对话框
|
|
*/
|
|
class PaiSaveAsWorkflowDialog : public PaiDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
/**
|
|
* @brief 构造函数
|
|
* @param[in] defaultProject 默认选中的项目对应的DBID
|
|
* @param[in] defaultSurvey 默认选中的工区对应的DBID
|
|
* @param[in] workflowName 工作流名称
|
|
* @param[in] pParent 父窗口句柄
|
|
*/
|
|
PaiSaveAsWorkflowDialog(long long defaultProject,
|
|
long long defaultSurvey,
|
|
const QString &workflowName,
|
|
QWidget *pParent = NULL);
|
|
|
|
/**
|
|
* @brief 析够函数
|
|
*/
|
|
virtual ~PaiSaveAsWorkflowDialog();
|
|
|
|
/**
|
|
* @brief 取得用户输入的工作流名字
|
|
* @return 工作流名称
|
|
*/
|
|
QString GetSaveAsWorkflowName() const;
|
|
|
|
/**
|
|
* @brief 获得用户选择的工区
|
|
* @return 工区
|
|
*/
|
|
pai::objectmodel::PaiSurvey* GetSelectedSurvey() const;
|
|
|
|
/**
|
|
* @brief 重置名称验证界面的提示信息
|
|
*/
|
|
void ResetValidateNameEdit();
|
|
|
|
protected:
|
|
/**
|
|
* @brief 重载 showEvent
|
|
* @param[in] pEvent 显示事件
|
|
*/
|
|
virtual void showEvent(QShowEvent *pEvent);
|
|
|
|
private slots:
|
|
/**
|
|
* @brief 用户输入工作流名字时触发,判断输入,使保存按钮有效。
|
|
*/
|
|
void CheckInput();
|
|
|
|
private:
|
|
pai::gui::PaiNameLineEdit *m_WorkflowNameLEdit; ///< 名称框
|
|
pai::gui::PaiPushButton *m_SaveBtn; ///< 保存按钮
|
|
pai::gui::PaiPushButton *m_CancelBtn; ///< 取消按钮
|
|
pai::gui::PaiProjectComboBox*m_pProjectComboBox; ///< 项目ComboBox
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif ///< PAI_FRAME_WORKFLOWWIDGET_PAISAVEASWORKFLOWDIALOG_H
|