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.
nmWATI/Include/mGui/mGuiSysManager/iWxProjectNew.h

75 lines
1.5 KiB
C++

#pragma once
#include "mModuleDefines.h"
#include "iDlgBase.h"
#include "mGuiSysManager_global.h"
class QFile;
class ZxDataProject;
namespace Ui {
class iWxProjectNew;
}
// 新建或编辑项目对话框
class M_GUI_SYSMANAGER_EXPORT iWxProjectNew : public iDlgBase
{
Q_OBJECT
public:
enum ActionMode
{
AM_New = 0, //新建项目
AM_Edit, //编辑、查看
AM_SaveAs, //另存为
AM_Unknown
};
explicit iWxProjectNew(MainWindowOption o, QString &sWorkDir, QWidget *parent = 0);
~iWxProjectNew();
// 初始化
virtual void initUI();
void setDataProject(ZxDataProject* p);
void setActionMode(ActionMode o);
// 返回
QString getProjName();
QString getProjDir();
QString getProjDesc();
QString getUiCreator();
QString getUiCreatedTime();
QString getUiModifier();
QString getUiModifiedTime();
// 获取sPath项目下的db文件全路径
static QString getDbFileOfProj(QString sPath,
QString &sProjName);
private:
bool dealwithNew();
bool dealwithEdit();
bool dealwithSaveAs();
bool checkInputs();
void copySysConfigs(QString& sUrl);
bool saveNewProjInfo(QString& sUrl);
signals:
private slots:
void on_btnDir_clicked();
void on_btnDirEx_clicked();
void on_btnOK_clicked();
void on_btnCancel_clicked();
private:
Ui::iWxProjectNew *ui;
ZxDataProject* m_pDataProject;
MainWindowOption m_oMwo;
ActionMode m_oAM;
};