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.
135 lines
3.0 KiB
C++
135 lines
3.0 KiB
C++
#pragma once
|
|
|
|
#include <QFileInfoList>
|
|
#include "qglobal.h"
|
|
|
|
#if (QT_VERSION >= 0x050000)
|
|
#include <QtWebEngineWidgets/QtWebEngineWidgets>
|
|
#define QWebView QWebEngineView
|
|
#else
|
|
#include <QtWebKit/QWebView>
|
|
#endif
|
|
|
|
#include "mModuleDefines.h"
|
|
#include "iDlgBase.h"
|
|
#include "mGuiSysManager_global.h"
|
|
|
|
class QListWidgetItem;
|
|
class ZxDataProject;
|
|
class iWxProjectMigrate;
|
|
|
|
namespace Ui {
|
|
class iWxProjectOpen;
|
|
}
|
|
|
|
// 选择并打开项目对话框
|
|
class M_GUI_SYSMANAGER_EXPORT iWxProjectOpen : public iDlgBase
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit iWxProjectOpen(MainWindowOption o, QWidget *parent = 0);
|
|
~iWxProjectOpen();
|
|
|
|
// 初始化
|
|
virtual void initUI();
|
|
|
|
// 获取项目路径相关
|
|
QString getProjectName(); //项目名称
|
|
QString getProjDir(); //项目路径
|
|
QString getProjParentDir(); //项目所在的上一级路径
|
|
QString getProjFullPath(); //全
|
|
|
|
// 按钮的状态
|
|
void refrsheButtonStates();
|
|
|
|
// modeoSeries
|
|
void refreshModelSeries();
|
|
|
|
// 历史列表
|
|
void initUpdateLists();
|
|
void refreshUpdateLists();
|
|
|
|
// 外部调用模式
|
|
void runProjNew();
|
|
void runProjSketch();
|
|
void runProjSaveAs();
|
|
|
|
// 默认工作路径
|
|
static QString getLastPrjWorkDir();
|
|
|
|
signals:
|
|
|
|
// 选定后即将打开
|
|
void sigProjSelected(QString sDir, QString sProj, QString sPath);
|
|
|
|
// 获取当前打开的Project的全路径
|
|
void sigGetCurProjFullpath(QString& s);
|
|
|
|
// 删除工区后的最近打开项目的刷新
|
|
void sigProjDeleted(QString sPath);
|
|
|
|
// 获取当前的Project
|
|
void sigGetCurProject(ZxDataProject*&);
|
|
|
|
protected:
|
|
|
|
// 默认工作路径
|
|
QStringList getRecentDirs();
|
|
void changeRecentDirs(QString sDir);
|
|
|
|
// 刷新相应列表
|
|
void refreshRecentProjs();
|
|
void refreshRecentDirs();
|
|
void refreshCurrentProjs();
|
|
|
|
// 更新系统配置
|
|
void copySysConfigs(QString& sUrl);
|
|
|
|
private slots:
|
|
|
|
// 响应新建
|
|
void slotProjNew(const QString& sProject);
|
|
void slotProjOpen();
|
|
|
|
// 路径
|
|
void on_btnBrowseDir_clicked();
|
|
|
|
// 新建、概要、删除
|
|
void on_btnProjNew_clicked();
|
|
void on_btnSketch_clicked();
|
|
void on_btnProjOpen_clicked();
|
|
void on_btnDel_clicked();
|
|
void on_btnMigrate_clicked();
|
|
|
|
|
|
// 刷新
|
|
void on_btnRefresh_clicked();
|
|
void on_btnRefreshProjects_clicked();
|
|
void on_btnRefreshDirs_clicked();
|
|
void on_btnRefreshUpdateList_clicked();
|
|
|
|
// 双击响应
|
|
void on_listWxRecentProjs_itemDoubleClicked(QListWidgetItem *item);
|
|
void on_listWxRecentDirs_itemDoubleClicked(QListWidgetItem *item);
|
|
void on_listWxCurrentProjs_itemDoubleClicked(QListWidgetItem *item);
|
|
|
|
// 路径Chaged
|
|
void on_tbxDir_textChanged(const QString &arg1);
|
|
|
|
// 当前项目切换
|
|
void on_listWxCurrentProjs_currentRowChanged(int currentRow);
|
|
|
|
private:
|
|
|
|
Ui::iWxProjectOpen *ui;
|
|
QStringList m_listRencentDirs;
|
|
bool m_bSelfActivating;
|
|
|
|
QWebView* m_pWebView;
|
|
iWxProjectMigrate* m_pWxMigrate;
|
|
|
|
MainWindowOption m_oMwo;
|
|
};
|