资源简介
Qt甘特图源码,刻度缩放原理,甘特图进度条增删改等等

代码片段和文件信息
#include “GanttaIODevice.h“
#include
#include
#include “GanttWidget.h“
GanttaIODevice::GanttaIODevice()
{
}
GanttaIODevice::~GanttaIODevice()
{
}
bool GanttaIODevice::ReadFile(QFile* fp)
{
QDomDocument doc;
if (!doc.setContent(fp))
{
return false;
}
QDomElement docElem = doc.documentElement();
for (int i = 0; i < docElem.childNodes().count(); ++i)
{
QDomElement elem = docElem.childNodes().at(i).toElement();
if (elem.tagName() == QStringLiteral(“Sacle“))
{
QStringList strlist = elem.attribute(QStringLiteral(“color“)).split(““);
int r = strlist[0].toInt();
int g = strlist[1].toInt();
int b = strlist[2].toInt();
m_scaleColor = qRgb(r g b);
m_nScalePix = elem.attribute(QStringLiteral(“saclePix“)).toInt();
m_nScaleBar = elem.attribute(QStringLiteral(“scaleBar“)).toInt();
m_nStartTime = elem.attribute(QStringLiteral(“startTime“)).toInt();
}
if (elem.tagName() == QStringLiteral(“Label“))
{
m_nLabelWidth = elem.attribute(QStringLiteral(“width“)).toInt();
}
if (elem.tagName() == QStringLiteral(“Margin“))
{
m_nLeftMargin = elem.attribute(QStringLiteral(“left“)).toInt();
m_nRightMargin = elem.attribute(QStringLiteral(“right“)).toInt();
m_nTopMargin = elem.attribute(QStringLiteral(“top“)).toInt();
m_nBottomMargin = elem.attribute(QStringLiteral(“bottom“)).toInt();
}
if (elem.tagName() == QStringLiteral(“Items“))
{
m_nSpacing = elem.attribute(QStringLiteral(“spacing“)).toInt();
m_nProgressSpacing = elem.attribute(QStringLiteral(“progressSpacing“)).toInt();
for (int i = 0; i < elem.childNodes().count(); ++i)
{
QDomElement nodeElem = elem.childNodes().at(i).toElement();
if (nodeElem.tagName() == QStringLiteral(“Node“))
{
GanttItemAttribute att;
att.strActionName = nodeElem.attribute(QStringLiteral(“name“));
att.nStart = nodeElem.attribute(QStringLiteral(“startTime“)).toInt();
att.nEnd = nodeElem.attribute(QStringLiteral(“endTime“)).toInt();
QStringList strlist = nodeElem.attribute(QStringLiteral(“progressColor“)).split(““);
int r = strlist[0].toInt();
int g = strlist[1].toInt();
int b = strlist[2].toInt();
att.progressColor = qRgb(r g b);
strlist = nodeElem.attribute(QStringLiteral(“labelColor“)).split(““);
r = strlist[0].toInt();
g = strlist[1].toInt();
b = strlist[2].toInt();
att.labelColor = qRgb(r g b);
strlist = nodeElem.attribute(QStringLiteral(“textColor“)).split(““);
r = strlist[0].toInt();
g = strlist[1].toInt();
b = strlist[2].toInt();
att.textColor = qRgb(r g b);
m_lsItems.append(att);
}
}
}
}
return true;
}
bool GanttaIODevice::WritFile(QFile* fp GanttWidget* pGantt)
{
m_scaleColor = pGantt->scaleColor();
m_nScalePix = pGantt->scalePix();
m_nLabelWidth = pGantt->labelWidth();
m_nRightMargin = pGantt->rightMa
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-07-03 09:50 GanttView\bin64\
文件 28672 2018-05-09 09:24 GanttView\bin64\GanttView.exe
文件 3894320 2018-07-03 09:48 GanttView\bin64\GanttViewd.lib
文件 19968 2018-04-23 15:58 GanttView\GanttChart.v12.suo
目录 0 2018-07-03 09:50 GanttView\src\
文件 23396352 2018-07-03 08:34 GanttView\src\GanttChart.sdf
文件 1421 2018-06-26 09:19 GanttView\src\GanttChart.sln
文件 76800 2018-07-03 08:34 GanttView\src\GanttChart.v12.suo
目录 0 2018-07-03 10:03 GanttView\src\GanttView\
文件 598 2018-05-18 16:22 GanttView\src\GanttView\123.xm
文件 6067 2018-06-27 09:00 GanttView\src\GanttView\GanttaIODevice.cpp
文件 845 2018-05-18 15:26 GanttView\src\GanttView\GanttaIODevice.h
文件 719 2018-05-18 19:53 GanttView\src\GanttView\GanttConfig.xm
文件 265 2018-05-17 15:27 GanttView\src\GanttView\GanttItemAttribute.cpp
文件 524 2018-06-27 15:38 GanttView\src\GanttView\GanttItemAttribute.h
文件 1268 2018-05-14 15:45 GanttView\src\GanttView\GanttView.aps
文件 201 2018-05-14 15:46 GanttView\src\GanttView\GanttView.qrc
文件 2458 2018-05-14 15:44 GanttView\src\GanttView\GanttView.rc
文件 27797 2018-06-29 11:14 GanttView\src\GanttView\GanttView.vcxproj
文件 4205 2018-05-17 15:27 GanttView\src\GanttView\GanttView.vcxproj.filters
文件 2244 2018-07-03 09:47 GanttView\src\GanttView\GanttView.vcxproj.user
文件 17846 2018-06-27 17:01 GanttView\src\GanttView\GanttWidget.cpp
文件 4124 2018-06-27 16:43 GanttView\src\GanttView\GanttWidget.h
目录 0 2018-07-03 09:50 GanttView\src\GanttView\GeneratedFiles\
目录 0 2018-07-03 09:50 GanttView\src\GanttView\GeneratedFiles\Debug\
文件 6496 2018-07-03 09:48 GanttView\src\GanttView\GeneratedFiles\Debug\moc_GanttWidget.cpp
文件 5804 2018-07-03 09:48 GanttView\src\GanttView\GeneratedFiles\Debug\moc_itemdialog.cpp
文件 3921 2018-07-03 09:48 GanttView\src\GanttView\GeneratedFiles\Debug\moc_MainWindow.cpp
文件 21091 2018-07-03 09:48 GanttView\src\GanttView\GeneratedFiles\qrc_GanttView.cpp
文件 7354 2018-07-03 09:48 GanttView\src\GanttView\GeneratedFiles\ui_itemdialog.h
文件 4932 2018-06-29 10:35 GanttView\src\GanttView\itemdialog.cpp
............此处省略41个文件信息
相关资源
- mgn-mqt82.exe
- Trojan-Qt5-Windows-0.0.4.rar
- 酒店管理系统基于Qt Creator5)
- vtk QT做的三维地质可视化系统2of2
- Qt局域网聊天软件
- Qt Creator opengl实现四元数鼠标控制轨迹
- QT局域网聊天系统(基于QT5.修改过)
- qt-电子点菜系统
- C 餐厅叫号系统(QT平)
- QT 实现文件下载
- qt图像处理
- QT,JPEG解码源代码(已完成)
- Qt 播放音频文件
- Qt 读取16进制的data文件
- MQTT+串口(usart)透传
- 易语言QQTEA算法源码
- VC工程转Qt工程文件的工具
- MQTT推送Demo
- 基于Linux、QT的视频监控系统的设计与
- Qt 百度地图 定位
- QT酷炫界面开发指南《QmlBook》
- Ubuntu下操作Excel,qt代码
- Qt图片浏览器 --基于Qt的Graphics View f
- qtnribbon2破解
- Qt软件开发 完整项目代码
- MQTT_3.1protocol_Specific中文版
- 在QT中使用RTP进行视频的采集和传输
- Mini6410 Qt4和Qtopia编程开发指南
- Qt实现Code39条形码
- qt_ffmpeg_mp4_export_and_import.zip
评论
共有 条评论