hlp:桂林国际齿轮泵代码

This commit is contained in:
kite_lucs
2026-10-09 10:25:24 +08:00
commit fd606b3c81
2447 changed files with 999531 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,58 @@
/*
* cmdline.h -- generic commandline editing (uses getopt, only short)
*
* Copyright (c) 1999 Alessandro Rubini (rubini@gnu.org)
* Copyright (c) 1999 Prosa Srl. (prosa@prosa.it)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
*/
/*
* The options may have different arguments of different type
*/
enum option_type {
CMDLINE_NONE=0, /* no argument after option */
CMDLINE_I, /* integer (any base) */
CMDLINE_D, /* decimal integer */
CMDLINE_X, /* hex integer */
CMDLINE_O, /* octal integer */
CMDLINE_S, /* string */
CMDLINE_F, /* double float */
CMDLINE_P, /* pointer */
};
struct commandline {
int option; /* Single byte: option id */
int type; /* Type of argument, used in sscanf */
void *result; /* Store data here, if non null */
int (*fun)(void *); /* Call if defined: arg is "result" or input string */
char *env; /* Where to get runtime defaults, may be NULL */
char *default_v; /* The compile-time default, may be NULL */
char *descrip; /* For err msg. May have %s's for default and env */
};
/* returns: 0 or -1. "optarg" is global (see getopt) */
extern int commandline(struct commandline *args,
int argc, char **argv, char *errorhead);
/* prints an error message based on "args" */
extern int commandline_errormsg(FILE *f, struct commandline *args,
char *prgname, char *messagehead);
@@ -0,0 +1,550 @@
#include "formscenedlg.h"
#include "ui_formscenedlg.h"
#include <QTimer>
#include <QStackedWidget>
#include <QDebug>
#include <QScrollBar>
FormScenedlg::FormScenedlg(QWidget *parent) :
QWidget(parent),
ui(new Ui::FormScenedlg),pPicScene(0),tabMainWindow(0),dialogFileOperation(0),textEdit(0)
{
ui->setupUi(this);
SWmaximumSize1={};
SWgeometry1={};
FVgeometry2={};
GVgeometry3={};
QPushButton *btnArray[]={
// ui->KeyDown,
// ui->KeyLeft,
// ui->KeyRight,
// ui->KeyUp,
ui->itemLast,
ui->itemFirst,
ui->saveAsButton,
ui->saveButton,
ui->addButton,
//ui->itemPrev,
//ui->itemNext,
ui->previewButton,
ui->newfileButton,
ui->openfileButton,
ui->delButton,
ui->EditItemButton,
ui->insertImage,
ui->reduceButton,
ui->enlargeButton,
ui->ZoomOrigin
};
const QString sysfamily=qApp->font().family();
for(int i=0;i<sizeof(btnArray)/sizeof(*btnArray);i++)
{
QFont font = ui->ZoomOrigin->font(); // 获取当前字体
const int defaultPointSize=30;//font.pointSize()<10?10:font.pointSize();
if(Public::ReadLanguageName()=="English"){
font.setFamily("Arial");
}
// font.setFamily("WenQuanYiMH");
//font.setFamily("wenquanyi");
font.setBold(true);
font.setPointSize(1*defaultPointSize); // 设置字体大小为12点
font.setWeight(QFont::Black);
btnArray[i]->setFont(font); // 应用新字体到按钮
}
//不显示测试按钮
ui->itemPrev->setVisible(false);
ui->itemNext->setVisible(false);
ui->ZoomOrigin->setVisible(false);
ui->btn_test2->setVisible(false);
}
FormScenedlg::~FormScenedlg()
{
delete ui;
delete dialogFileOperation;
dialogFileOperation=0;
}
void FormScenedlg::horizontalScrollBar_valueChanged(int value)
{
QTimer::singleShot(100,this,SLOT(sceneRectChanged_timerHandler()));
}
void FormScenedlg::verticalScrollBar_valueChanged(int value)
{
QTimer::singleShot(100,this,SLOT(sceneRectChanged_timerHandler()));
}
void FormScenedlg::bindScene(PicScene *pPicScene, QGraphicsView *pGraphicViewer,QTextEdit *pTextEdit){
this->pPicScene = pPicScene;
this->pViewer = pGraphicViewer;
this->textEdit = pTextEdit;
QObject::connect(pViewer->verticalScrollBar(), SIGNAL(valueChanged(int)), this,SLOT(verticalScrollBar_valueChanged(int)));
QObject::connect(pViewer->horizontalScrollBar(), SIGNAL(valueChanged(int)), this,SLOT(horizontalScrollBar_valueChanged(int)));
dialogFileOperation = new DialogFileOperation(0);
dialogFileOperation->setWindowTitle(tr("插入图片"));
connect(dialogFileOperation,SIGNAL(openFile(QString,bool)),this,SLOT(onFileOpen(QString,bool)));
//edit@12-12读取旧的布局信息
const QStackedWidget* pStackedWidget= static_cast<QStackedWidget*>(this->pViewer->parentWidget()->parentWidget());
const QWidget* fileSceneViewer = static_cast<QWidget*>(this->pViewer->parentWidget());
if(pStackedWidget && fileSceneViewer)
{
tabMainWindow=fileSceneViewer->parentWidget()->parentWidget();
SWmaximumSize1=pStackedWidget->maximumSize();
SWgeometry1=pStackedWidget->geometry();
//QSize FVmaximumSize=fileSceneViewer->maximumSize();
FVgeometry2=fileSceneViewer->geometry();
//QSize GVmaximumSize=this->pViewer->maximumSize();
GVgeometry3=this->pViewer->geometry();
//qDebug()<<"1-2-3-size="<<SWmaximumSize1<<", "<<SWgeometry1<<", "<<FVgeometry2<<", "<<GVgeometry3;
}
}
void FormScenedlg::sceneRectChanged_timerHandler()
{
// if(this->pViewer && this->pPicScene)
// {
// const QPoint originScene=pViewer->mapFromScene(0,0);
// if(originScene!=lastOriginScene)
// {
// lastOriginScene=originScene;
this->pPicScene->update();
// //qDebug()<<"sceneRectChanged-update="<<lastOriginScene;
// }
// //qDebug()<<"sceneRectChanged="<<this->pPicScene->sceneRect();
// }
}
//edit@12-12 改变布局
void FormScenedlg::Layout_ToNew()
{
QStackedWidget* pStackedWidget= static_cast<QStackedWidget*>(this->pViewer->parentWidget()->parentWidget());
QWidget* fileSceneViewer = static_cast<QWidget*>(this->pViewer->parentWidget());
//QWidget *tabMainWindow=fileSceneViewer->parentWidget()->parentWidget();
QHBoxLayout *horizontalLayout=dynamic_cast<QHBoxLayout*>(FormScenedlg::findChildAll(tabMainWindow->layout(),"horizontalLayout"));//edit@12-14 信息提示栏
FormScenedlg::showQLayout(horizontalLayout,false);
if(pStackedWidget && fileSceneViewer)
{
pStackedWidget->setMaximumSize(SWmaximumSize1.width(),SWmaximumSize1.height()+150);
pStackedWidget->setGeometry(SWgeometry1.x(),SWgeometry1.y(),SWgeometry1.width(),SWgeometry1.height()+150);
fileSceneViewer->setGeometry(FVgeometry2.x(),FVgeometry2.y(),FVgeometry2.width(),FVgeometry2.height()+150);
this->pViewer->setGeometry(GVgeometry3.x(),GVgeometry3.y(),GVgeometry3.width(),GVgeometry3.height()+80);
}
}
//edit@12-12 恢复布局
void FormScenedlg::Layout_ToDefault()
{
QStackedWidget* pStackedWidget= static_cast<QStackedWidget*>(this->pViewer->parentWidget()->parentWidget());
QWidget* fileSceneViewer = static_cast<QWidget*>(this->pViewer->parentWidget());
//QWidget *tabMainWindow=fileSceneViewer->parentWidget()->parentWidget();
QHBoxLayout *horizontalLayout=dynamic_cast<QHBoxLayout*>(FormScenedlg::findChildAll(tabMainWindow->layout(),"horizontalLayout"));//edit@12-14 信息提示栏
FormScenedlg::showQLayout(horizontalLayout,true);
if(pStackedWidget && fileSceneViewer)
{
pStackedWidget->setMaximumSize(SWmaximumSize1);
pStackedWidget->setGeometry(SWgeometry1);
fileSceneViewer->setGeometry(FVgeometry2);
this->pViewer->setGeometry(GVgeometry3);
}
}
void FormScenedlg::changeEvent(QEvent *e)
{
QWidget::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
}
}
void FormScenedlg::on_addButton_clicked()
{
emit addButton();
}
void FormScenedlg::on_EditItemButton_clicked()
{
emit EditItemButton();
}
void FormScenedlg::on_delButton_clicked()
{
emit delButton();
}
void FormScenedlg::on_newfileButton_clicked()
{
emit newfileButton();
}
void FormScenedlg::on_openfileButton_clicked()
{
emit openfileButton();
}
void FormScenedlg::on_previewButton_clicked()
{
pPicScene->clearSelection();
foreach (QGraphicsItem *item, pPicScene->items()) {
item->clearFocus();
item->setSelected(false);
}
//ui->previewButton->setFocus();
emit previewButton();
}
void FormScenedlg::on_saveButton_clicked()
{
emit saveButton();
}
void FormScenedlg::on_saveAsButton_clicked()
{
emit saveAsButton();
}
//edit@12-06 放大
void FormScenedlg::on_enlargeButton_clicked()
{
emit enlargeButton();
adjustItemsPos();
//QTimer::singleShot(100,this,SLOT(adjustItemsPos()));
}
void FormScenedlg::on_reduceButton_clicked()
{
emit reduceButton();
adjustItemsPos();
//QTimer::singleShot(100,this,SLOT(adjustItemsPos()));
}
void FormScenedlg::on_KeyLeft_clicked()
{
pViewer->setFocus();
#ifndef Q_OS_WIN32
QWSServer::sendKeyEvent(0,Qt::Key_Left,Qt::NoModifier,true,false); //向系统发送键盘事件
#endif
//QTimer::singleShot(10,this,SLOT(adjustItemsPosFalse()));
}
void FormScenedlg::on_KeyUp_clicked()
{
pViewer->setFocus();
#ifndef Q_OS_WIN32
QWSServer::sendKeyEvent(0,Qt::Key_Up,Qt::NoModifier,true,false); //向系统发送键盘事件
#endif
//QTimer::singleShot(10,this,SLOT(adjustItemsPosFalse()));
}
void FormScenedlg::on_KeyRight_clicked()
{
pViewer->setFocus();
#ifndef Q_OS_WIN32
QWSServer::sendKeyEvent(0,Qt::Key_Right,Qt::NoModifier,true,false); //向系统发送键盘事件
#endif
//QTimer::singleShot(10,this,SLOT(adjustItemsPosFalse()));
}
void FormScenedlg::on_KeyDown_clicked()
{
pViewer->setFocus();
#ifndef Q_OS_WIN32
QWSServer::sendKeyEvent(0,Qt::Key_Down,Qt::NoModifier,true,false); //向系统发送键盘事件
#endif
//QTimer::singleShot(10,this,SLOT(adjustItemsPosFalse()));
}
void FormScenedlg::on_insertImage_clicked()
{
if(dialogFileOperation)
{
dialogFileOperation->refreshListView(PICFILE);
dialogFileOperation->exec();
}
}
void FormScenedlg::on_ZoomOrigin_clicked()
{
adjustItemsPos(false);
}
void FormScenedlg::on_btn_test2_clicked()
{
emit ZoomOrigin();
}
//edit@12-11 选中下一个图元
void FormScenedlg::on_itemNext_clicked()
{
QList<QGraphicsItem *> items=pPicScene->items();
if(!items.empty())
{
int index=0;
for(index=0;index<items.size();index++)
{
if(items.at(index)->isSelected())break;
}
pPicScene->clearSelection();
if(index+1<items.size())
{
index+=1;
//edit@12-11选中下一个
items.at(index)->setSelected(true);
items.at(index)->setFocus();
}
else
{
//edit@12-11 超范围,滚动到第一个
index=0;
items.front()->setSelected(true);
items.front()->setFocus();
}
//PrintselectedItemInfo();
}
}
//edit@12-11选中上一个图元
void FormScenedlg::on_itemPrev_clicked()
{
QList<QGraphicsItem *> items=pPicScene->items();
if(!items.empty())
{
int index=0;
for(index=0;index<items.size();index++)
{
if(items.at(index)->isSelected())break;
}
pPicScene->clearSelection();
if(0<=index-1)
{
index-=1;
//edit@12-11选中前一个
items.at(index)->setSelected(true);
items.at(index)->setFocus();
}
else
{
//edit@12-11 超范围,滚动到最后位置
index=items.size()-1;
items.back()->setSelected(true);
items.back()->setFocus();
}
//PrintselectedItemInfo();
}
}
void FormScenedlg::PrintselectedItemInfo()
{
foreach (QGraphicsItem *item, pPicScene->items()) {
if(item->isSelected())
{
qDebug()<<"PrintselectedItemInfo-pos="<<item->pos();
//qDebug()<<"PrintselectedItemInfo-pos="<<pPicScene->views().front()->mapFromScene(item->pos());
break;
}
}
}
//edit@12-11 自动调整元素位置到原点
void FormScenedlg::adjustItemsPos(bool bMoveScrollBar)
{
if(bMoveScrollBar)
{
pViewer->verticalScrollBar()->setValue(0);
pViewer->horizontalScrollBar()->setValue(0);
}
QPointF movePoint;
const QRectF sceneRect=pPicScene->sceneRect();
qreal left=sceneRect.width(),top=sceneRect.width();
foreach (const QGraphicsItem *item, pPicScene->items()) {
left=qMin(left,item->pos().x());
top=qMin(top,item->pos().y());
}
foreach (QGraphicsItem *item, pPicScene->items()) {
QPointF oldpos=item->pos();
//oldpos=QPointF(qCeil(oldpos.x()-left-1),qCeil(oldpos.y()-(top-pViewer->mapToScene(0,0).y()+1)));
oldpos=QPointF(qCeil(oldpos.x()-left),qCeil(oldpos.y()-(top-pViewer->mapToScene(0,0).y())));
item->setPos(oldpos);
if(item->isSelected())movePoint=oldpos;
}
if(bMoveScrollBar)
{
//pViewer->verticalScrollBar()->setValue(0);
//pViewer->horizontalScrollBar()->setValue(0);
if(0<movePoint.x())
{
movePoint=pViewer->mapFromScene(movePoint.x(),movePoint.y());
//pViewer->verticalScrollBar()->setValue(movePoint.y());
pViewer->horizontalScrollBar()->setValue(movePoint.x());
}
}
if(!pPicScene->items().empty())pPicScene->update();
//qDebug()<<"adjustItemsPos="<<bMoveScrollBar;
}
void FormScenedlg::showQLayout(QLayout *layout,bool visible)
{
for (int i = 0; i < layout->count(); ++i) {
QLayoutItem *item = layout->itemAt(i);
if (QWidget *widget = item->widget()) {
visible?widget->show():widget->hide();
} else if (QLayout *subLayout = item->layout()) {
showQLayout(subLayout,visible);
}
}
}
QObject *FormScenedlg::findChildAll(const QLayout *layout,const QString &name)
{
for (int i = 0; i < layout->count(); ++i) {
QLayoutItem *item = layout->itemAt(i);
if (QObject *widget = item->widget()) {
if(widget->objectName()==name)return widget;
} else if (QLayout *subLayout = item->layout()) {
if(subLayout->objectName()==name)return subLayout;
QObject *q= findChildAll(subLayout,name);
if(q)return q;continue;
}
}
return 0;
}
void FormScenedlg::onFileOpen(QString filePath,bool ){
pPicScene->clearSelection();
QString html = "<img src='" + filePath + "'/>";
textEdit->setHtml (html);
textItem = new PicTextItem();
pPicScene->addItem(textItem);
QList<QGraphicsItem *> items = pPicScene->items();
if(pPicScene->items().count()>1){
QRectF itemRect= items.at(1)->boundingRect();
textItem->setPos( items.at(1)->scenePos().x()+itemRect.width()+20, items.at(1)->scenePos().y());
}
else textItem->setPos(this->pViewer->mapToScene(0,0));//edit@12-07
textItem->setSelected(true);
textItem->setHtml(textEdit->toHtml());
}
void FormScenedlg::reset_showTextWidthHeight()
{
const QRectF BoundingRect=pPicScene->itemsBoundingRect();
QLabel *labelTextWidthHeight=dynamic_cast<QLabel*>(FormScenedlg::findChildAll(tabMainWindow->layout(),"labelTextWidthHeight"));
if(labelTextWidthHeight && 1<BoundingRect.height())
{
qreal bottomItem[2]={-1};//txt,img
foreach (QGraphicsItem *item, pPicScene->items()) {
if(item->x()<0)item->setX(0);
if(item->y()<0)item->setY(0);
//const int i=-1==((QGraphicsTextItem*)item)->toHtml().indexOf("img ",0,Qt::CaseInsensitive)?0:1;
const int i=-1==((QGraphicsTextItem*)item)->toHtml().indexOf("home/plg/doc/",0,Qt::CaseInsensitive)?0:1;
if(item->sceneBoundingRect().bottom()>bottomItem[i])
{
bottomItem[i]=item->sceneBoundingRect().bottom();
}
}
QString newText;
int HighlightedValue=0;
if(bottomItem[1]+1>=bottomItem[0])
{
HighlightedValue=qCeil(bottomItem[1]-BoundingRect.y());
newText=tr("[ %1行 x %2列 ]").arg(HighlightedValue).arg(qCeil(BoundingRect.width()));
}
else
{
HighlightedValue=qCeil(bottomItem[0]-BoundingRect.y()-2);
newText=tr("[ %1行 x %2列 ]").arg(HighlightedValue).arg(qCeil(BoundingRect.width()));
}
const QString oldText=labelTextWidthHeight->text();
if(32<HighlightedValue)
{
//edit@12-17 超出范围的高亮提示
labelTextWidthHeight->setText(tr("<html><head/><body><p>[<span style=\"color:red;font-size:12px;\"> %1行 </span>x %2列 ]</p></body></html>")
.arg(HighlightedValue).arg(qCeil(BoundingRect.width())));
}
else
{
labelTextWidthHeight->setText(newText);
}
if(oldText!=newText)
{
//QTimer::singleShot(10,this,SLOT(adjustItemsPos()));
QTimer::singleShot(10,this,SLOT(adjustItemsPosFalse()));
}
}
}
void FormScenedlg::on_itemFirst_clicked()
{
int index=-1;
const QRectF sceneRect=pPicScene->sceneRect();
qreal left=sceneRect.width();
QList<QGraphicsItem *> allitems=pPicScene->items();
for(int i =0;i<allitems.size();i++)
{
allitems.at(i)->clearFocus();
allitems.at(i)->setSelected(false);
if(left>allitems.at(i)->pos().x())
{
index=i;
left=allitems.at(i)->pos().x();
}
}
if(-1!=index)pPicScene->items().at(index)->setSelected(true);
adjustItemsPos();
}
void FormScenedlg::on_itemLast_clicked()
{
pPicScene->clearSelection();
int index=-1;
const QRectF sceneRect=pPicScene->sceneRect();
qreal left=0;
QList<QGraphicsItem *> allitems=pPicScene->items();
for(int i =0;i<allitems.size();i++)
{
allitems.at(i)->clearFocus();
allitems.at(i)->setSelected(false);
if(left<allitems.at(i)->pos().x())
{
index=i;
left=allitems.at(i)->pos().x();
}
}
if(-1!=index)pPicScene->items().at(index)->setSelected(true);
adjustItemsPos();
}
//void FormScenedlg::onSceneRectChanged(const QString &text)
//{
// qDebug()<<"FormScenedlg::sceneRectChanged=";
//}
@@ -0,0 +1,257 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 2.8.1, 2020-07-22T09:04:16. -->
<qtcreator>
<data>
<variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value>
</data>
<data>
<variable>ProjectExplorer.Project.EditorSettings</variable>
<valuemap type="QVariantMap">
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
<value type="QString" key="language">Cpp</value>
<valuemap type="QVariantMap" key="value">
<value type="QString" key="CurrentPreferences">CppGlobal</value>
</valuemap>
</valuemap>
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
<value type="QString" key="language">QmlJS</value>
<valuemap type="QVariantMap" key="value">
<value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap>
</valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value>
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
<value type="int" key="EditorConfiguration.TabSize">8</value>
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.PluginSettings</variable>
<valuemap type="QVariantMap"/>
</data>
<data>
<variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap">
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.6.3 (QtEmbedded-4.6.3)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 4.6.3 (QtEmbedded-4.6.3)</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{f6ef6e24-a096-4ae8-a6aa-9885846df006}</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/lion/mywork/QTUI_dir/build-QtUI-Qt_4_6_3_QtEmbedded_4_6_3_temporary-Release</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments">-spec linux-g++ DEFINES+=TEMPMIMA</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments">
<value type="QString">-w</value>
<value type="QString">-r</value>
</valuelist>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
<value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/home/lion/mywork/QTUI_dir/svn_src</value>
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Project.UseGlobal">true</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
<value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
<value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
<value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
<value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
<value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
<value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
<valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
<value type="int">0</value>
<value type="int">1</value>
<value type="int">2</value>
<value type="int">3</value>
<value type="int">4</value>
<value type="int">5</value>
<value type="int">6</value>
<value type="int">7</value>
<value type="int">8</value>
<value type="int">9</value>
<value type="int">10</value>
<value type="int">11</value>
<value type="int">12</value>
<value type="int">13</value>
<value type="int">14</value>
</valuelist>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">QtUI</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/home/lion/mywork/QTUI_dir/svn_src/QtUI.pro</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">QtUI.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>
<variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QByteArray">{1103e82b-d19e-4eee-9f47-2c4ba35cc43f}</value>
</data>
<data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">14</value>
</data>
</qtcreator>
@@ -0,0 +1,53 @@
#ifndef DIALOGSHOWCOUNTER_H
#define DIALOGSHOWCOUNTER_H
#include <QDialog>
#include <QTimer>
#include <QTime>
#include "ParaSettingUI.h"
#include "dialogcycleprint.h"
namespace Ui {
class DialogShowCounter;
}
class DialogShowCounter : public QDialog
{
Q_OBJECT
public:
void setLCDframe(void);
void refreshdate(int currCnt1Value, int cn1StartValue, int cn1EndValue,int currGroupIndex, int currGroupLoop/*当前循环次数*/);
int getResetMetreState(int &area_end);
void init_arg();
explicit DialogShowCounter(QWidget *parent = 0);
DialogCycleprint *dialogcycleprint;
CycleprintArg cycleprintarg;
~DialogShowCounter();
Q_SIGNALS:
void set_count_endvalue(int cycle_time,int area_end);
private slots:
void on_pushButton_clicked();
void on_CycleprintpushButton_clicked();
void ondialogcycleprintAccepted();
private:
Ui::DialogShowCounter *ui;
int lcd_number;
int reset_meter;
int cycleTimecount;
int savecnt1CurrValue;
int cycle_flag;
// QTimer *refresh_timer;
};
#endif // DIALOGSHOWCOUNTER_H