开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
1 Star 0 Fork 142

撸码小分队/DS

forked from Vanishi/DS
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
master
分支 (2)
标签 (4)
master
V1.0
DS.v1.7.x64.2023年04月16日
DS.v1.6.x64.2023年04月13日
DS.v1.5.x64.2023年04月08日
DS.v1.0.x64.2023年03月18日
master
分支 (2)
标签 (4)
master
V1.0
DS.v1.7.x64.2023年04月16日
DS.v1.6.x64.2023年04月13日
DS.v1.5.x64.2023年04月08日
DS.v1.0.x64.2023年03月18日
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (2)
标签 (4)
master
V1.0
DS.v1.7.x64.2023年04月16日
DS.v1.6.x64.2023年04月13日
DS.v1.5.x64.2023年04月08日
DS.v1.0.x64.2023年03月18日
DS
/
TaskFlow
/
pageCustomtaskFlow.cpp
DS
/
TaskFlow
/
pageCustomtaskFlow.cpp
pageCustomtaskFlow.cpp 8.37 KB
一键复制 编辑 原始数据 按行查看 历史
sun-th 提交于 2023年03月18日 16:17 +08:00 . 1.0
#include "pageCustomtaskFlow.h"
#include "pageCustomtaskFlowControl.h"
#include "flowleftwidget/mFlowMenuToolbutton.h"
#include "flowright/mFlowRightOpenwebWidget.h"
#include "flowright/mFlowRightClickeleWidget.h"
#include "flowright/mFlowRightExtractWidget.h"
#include "flowright/mFlowRightInputWidget.h"
#include "flowright/mFlowRightLoopWidget.h"
#include "flowright/mFlowRightSwitchWidget.h"
#include "flowright/mFlowRightIfWidget.h"
#include "flowright/mFlowRightMouseWidget.h"
#include "flowright/mFlowRightTipWidget.h"
#include "Utils/ComSplitHWidget.h"
#include "mFcModels.h"
#include "style.h"
#include <QScrollArea>
#include <QScrollBar>
#include <QHBoxLayout>
#include <QVBoxLayout>
PageCustomTaskFlow::PageCustomTaskFlow(MTask *task,QWidget *parent) : QWidget(parent),m_task(task){
QHBoxLayout *boxHLayout= new QHBoxLayout(this);
boxHLayout->setContentsMargins(0,0,0,0);
boxHLayout->setSpacing(0);
initLeftUi();
initMenuUi();
initRightUi();
boxHLayout->addWidget(menuWidget);
QWidget *line = new QWidget(this);
line->setStyleSheet(".QWidget{background-color:rgb(233,233,233);}");
line->setFixedWidth(1);
boxHLayout->addWidget(line);
boxHLayout->addWidget(leftWidget);
// boxHLayout->addSpacing(6);
// 水平拖拽
ComSplitHWidget *splitHWidget = new ComSplitHWidget(this);
splitHWidget->setFixedWidth(4);
boxHLayout->addWidget(splitHWidget);
connect(splitHWidget,&ComSplitHWidget::moveDistance,this,[this](int distance){
int leftW = leftWidget->width()+distance;
if(leftW>60){
leftWidget->setFixedWidth(leftW);
}
m_leftratio = float(leftWidget->width()) / float(this->width());
});
boxHLayout->addWidget(rightWidget);
}
PageCustomTaskFlow::~PageCustomTaskFlow(){
}
void PageCustomTaskFlow::resizeEvent(QResizeEvent *event){
Q_UNUSED(event);
leftWidget->setFixedWidth(this->width() * m_leftratio);
}
void PageCustomTaskFlow::initLeftUi(){
leftWidget = new QWidget(this);
QVBoxLayout *leftLayout = new QVBoxLayout(leftWidget);
leftLayout->setContentsMargins(0,0,0,0);
leftLayout->setSpacing(0);
QScrollArea *leftScroll = new QScrollArea(leftWidget);
leftScroll->setStyleSheet(m_stylesheet_QScrollArea);
QScrollBar *bar = new QScrollBar(leftScroll);
leftScroll->setVerticalScrollBar(bar);
fc = new PageCustomTaskFlowControl(m_task,this);
connect(fc,&PageCustomTaskFlowControl::notificationToFlow,this,&PageCustomTaskFlow::onNotificationFromFlowControl);
leftScroll->setWidget(fc);
leftScroll->setWidgetResizable(true);
leftLayout->addWidget(leftScroll);
}
void PageCustomTaskFlow::initMenuUi(){
menuWidget = new QWidget(this);
menuWidget->setAttribute(Qt::WA_StyledBackground,true);
menuWidget->setStyleSheet("QWidget{background-color:rgb(242,243,245)}");
menuWidget->setFixedWidth(38);
QVBoxLayout *menuLayout = new QVBoxLayout(menuWidget);
menuLayout->setContentsMargins(0,0,0,0);
menuLayout->setSpacing(0);
QWidget *contraolsWidget = new QWidget(menuWidget);
QVBoxLayout *controlsLayout = new QVBoxLayout(contraolsWidget);
controlsLayout->setContentsMargins(0,0,0,0);
controlsLayout->setSpacing(0);
contraolsWidget->setFixedHeight(180); // 30 * 6 一个菜单项的高度30
QStringList controls = QStringList()<<MCONSTANT_FLOW_MENU_TYPE_OpenWebBtn<<MCONSTANT_FLOW_MENU_TYPE_ClickEleBtn
<<MCONSTANT_FLOW_MENU_TYPE_ExtractBtn<<MCONSTANT_FLOW_MENU_TYPE_InputBtn
<<MCONSTANT_FLOW_MENU_TYPE_LoopBtn<<MCONSTANT_FLOW_MENU_TYPE_MouseBtn;
for (int i = 0; i < controls.count(); ++i) {
MFlowMenuToolButton *contr = new MFlowMenuToolButton(fc,fc->controls.value(controls[i]));
connect(contr,&MFlowMenuToolButton::notificationToParentWidget,fc,&PageCustomTaskFlowControl::onNotificationFromChildWidget);
controlsLayout->addWidget(contr,0,Qt::AlignCenter);
}
menuLayout->addWidget(contraolsWidget);
menuLayout->addStretch(10);
}
void PageCustomTaskFlow::initRightUi(){
// 右侧区域初始化
rightWidget = new QWidget(this);
QVBoxLayout *rightLayout = new QVBoxLayout(rightWidget);
rightLayout->setContentsMargins(0,0,0,0);
rightLayout->setSpacing(0);
// rightScroll
QScrollArea *rightScroll = new QScrollArea(rightWidget);
rightScroll->setStyleSheet(m_stylesheet_QScrollArea);
QScrollBar *bar = new QScrollBar(rightScroll);
rightScroll->setVerticalScrollBar(bar);
QWidget *rightScrollWidget = new QWidget(this);
rightScrollWidget->setStyleSheet(".QWidget{background-color:rgb(255,255,255);}");
rightScrollWidgetLayout = new QVBoxLayout(rightScrollWidget);
rightScrollWidgetLayout->setContentsMargins(0,0,0,0);
rightScrollWidgetLayout->setSpacing(0);
rightScroll->setWidget(rightScrollWidget);
rightScroll->setWidgetResizable(true);
rightLayout->addWidget(rightScroll);
}
void PageCustomTaskFlow::onNotificationFromFlowControl(MFlowStepData* data){
if(MCONNSTANT_NOTIFICATION_TYPE_OTHER_END_SHOWCONTENT==data->notificationType ||
MCONNSTANT_NOTIFICATION_TYPE_MOVE_END_SHOWCONTENT==data->notificationType){
// qDebug()<<"PageCustomTaskFlow::onNotificationFromFlowControl";
for (int i=0;i<rightScrollWidgetLayout->count();++i) {
delete rightScrollWidgetLayout->itemAt(i)->widget();
}
// // 断开信号的总结:https://www.jianshu.com/p/986851c507da
if(MCONSTANT_FLOW_MENU_TYPE_OpenWebBtn==data->control->menuType){
MFlowRightOpenWebWidget *r = new MFlowRightOpenWebWidget(this,data);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}else if(MCONSTANT_FLOW_MENU_TYPE_ClickEleBtn==data->control->menuType){
MFlowRightClickEleWidget *r= new MFlowRightClickEleWidget(this,data);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}else if(MCONSTANT_FLOW_MENU_TYPE_ExtractBtn==data->control->menuType){
MFlowRightExtractWidget *r =new MFlowRightExtractWidget(this,data,
fc->task);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}else if(MCONSTANT_FLOW_MENU_TYPE_InputBtn==data->control->menuType){
MFlowRightInputWidget *r =new MFlowRightInputWidget(this,data);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}else if(MCONSTANT_FLOW_MENU_TYPE_JudgeBtn==data->control->menuType){
MFlowRightIfWidget *r =new MFlowRightIfWidget(this,data);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}else if(MCONSTANT_FLOW_MENU_TYPE_LoopBtn==data->control->menuType){
MFlowRightLoopWidget *r =new MFlowRightLoopWidget(this,data);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}else if(MCONSTANT_FLOW_MENU_TYPE_MouseBtn==data->control->menuType){
MFlowRightMouseWidget *r =new MFlowRightMouseWidget(this,data);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}else if(MCONSTANT_FLOW_MENU_TYPE_SwitchBtn==data->control->menuType){
MFlowRightSwitchWidget *r =new MFlowRightSwitchWidget(this,data);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}else if(MCONSTANT_FLOW_MENU_TYPE_EndLoopBtn==data->control->menuType){
MFlowRightTipWidget *r = new MFlowRightTipWidget("结束循环","无自定义参数",this);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}else if(MCONSTANT_FLOW_MENU_TYPE_EndBtn==data->control->menuType){
MFlowRightTipWidget *r = new MFlowRightTipWidget("结束","无自定义参数",this);
r->setAttribute(Qt::WA_DeleteOnClose);
rightScrollWidgetLayout->addWidget(r);
}
}
}
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

一个Qt开发的可以替代爬虫的网页数据采集软件,它最重要的特点就是,降低了采集网页数据的门槛,由至少必须掌握一门编程语言降低到只要会操作电脑即可。
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/coderanks/DS.git
git@gitee.com:coderanks/DS.git
coderanks
DS
DS
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /