hlp:桂林国际齿轮泵代码
This commit is contained in:
@@ -0,0 +1,153 @@
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'SystemSetting.h'
|
||||
**
|
||||
** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
*****************************************************************************/
|
||||
|
||||
#include "../SystemSetting.h"
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'SystemSetting.h' doesn't include <QObject>."
|
||||
#elif Q_MOC_OUTPUT_REVISION != 63
|
||||
#error "This file was generated using the moc from 4.8.5. It"
|
||||
#error "cannot be used with the include files from this version of Qt."
|
||||
#error "(The moc has changed too much.)"
|
||||
#endif
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
static const uint qt_meta_data_SystemSetting[] = {
|
||||
|
||||
// content:
|
||||
6, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
16, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
2, // signalCount
|
||||
|
||||
// signals: signature, parameters, type, tag, flags
|
||||
15, 14, 14, 14, 0x05,
|
||||
35, 14, 14, 14, 0x05,
|
||||
|
||||
// slots: signature, parameters, type, tag, flags
|
||||
57, 14, 14, 14, 0x08,
|
||||
76, 14, 14, 14, 0x08,
|
||||
107, 102, 14, 14, 0x08,
|
||||
152, 14, 14, 14, 0x08,
|
||||
183, 14, 14, 14, 0x08,
|
||||
222, 14, 14, 14, 0x08,
|
||||
251, 14, 14, 14, 0x08,
|
||||
302, 14, 14, 14, 0x08,
|
||||
350, 14, 14, 14, 0x08,
|
||||
365, 102, 14, 14, 0x08,
|
||||
411, 14, 14, 14, 0x08,
|
||||
444, 14, 14, 14, 0x08,
|
||||
476, 14, 14, 14, 0x08,
|
||||
491, 14, 14, 14, 0x08,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
static const char qt_meta_stringdata_SystemSetting[] = {
|
||||
"SystemSetting\0\0changeEditMode(int)\0"
|
||||
"setRunStatus(QString)\0setInterfaceMode()\0"
|
||||
"SystemupdateSysParaToUI()\0arg1\0"
|
||||
"on_spinBoxReclaimPumpPower_valueChanged(int)\0"
|
||||
"on_pushButtonCleanUP_pressed()\0"
|
||||
"on_pushButtonHighVoltageData_pressed()\0"
|
||||
"on_pushButtonApply_pressed()\0"
|
||||
"on_pushButtonSearchBestOscillatorVoltage_pressed()\0"
|
||||
"on_pushButtonSearchBestOscillatorFreq_pressed()\0"
|
||||
"timerHandler()\0"
|
||||
"on_spinBoxOscillatorVoltage_valueChanged(int)\0"
|
||||
"on_pushButtonInterFace_pressed()\0"
|
||||
"ondialogAuthorizationAccepted()\0"
|
||||
"onCleanUPNow()\0timerHandler2()\0"
|
||||
};
|
||||
|
||||
void SystemSetting::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
Q_ASSERT(staticMetaObject.cast(_o));
|
||||
SystemSetting *_t = static_cast<SystemSetting *>(_o);
|
||||
switch (_id) {
|
||||
case 0: _t->changeEditMode((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 1: _t->setRunStatus((*reinterpret_cast< QString(*)>(_a[1]))); break;
|
||||
case 2: _t->setInterfaceMode(); break;
|
||||
case 3: _t->SystemupdateSysParaToUI(); break;
|
||||
case 4: _t->on_spinBoxReclaimPumpPower_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 5: _t->on_pushButtonCleanUP_pressed(); break;
|
||||
case 6: _t->on_pushButtonHighVoltageData_pressed(); break;
|
||||
case 7: _t->on_pushButtonApply_pressed(); break;
|
||||
case 8: _t->on_pushButtonSearchBestOscillatorVoltage_pressed(); break;
|
||||
case 9: _t->on_pushButtonSearchBestOscillatorFreq_pressed(); break;
|
||||
case 10: _t->timerHandler(); break;
|
||||
case 11: _t->on_spinBoxOscillatorVoltage_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
|
||||
case 12: _t->on_pushButtonInterFace_pressed(); break;
|
||||
case 13: _t->ondialogAuthorizationAccepted(); break;
|
||||
case 14: _t->onCleanUPNow(); break;
|
||||
case 15: _t->timerHandler2(); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const QMetaObjectExtraData SystemSetting::staticMetaObjectExtraData = {
|
||||
0, qt_static_metacall
|
||||
};
|
||||
|
||||
const QMetaObject SystemSetting::staticMetaObject = {
|
||||
{ &QWidget::staticMetaObject, qt_meta_stringdata_SystemSetting,
|
||||
qt_meta_data_SystemSetting, &staticMetaObjectExtraData }
|
||||
};
|
||||
|
||||
#ifdef Q_NO_DATA_RELOCATION
|
||||
const QMetaObject &SystemSetting::getStaticMetaObject() { return staticMetaObject; }
|
||||
#endif //Q_NO_DATA_RELOCATION
|
||||
|
||||
const QMetaObject *SystemSetting::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *SystemSetting::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return 0;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_SystemSetting))
|
||||
return static_cast<void*>(const_cast< SystemSetting*>(this));
|
||||
if (!strcmp(_clname, "ParaSettingUI"))
|
||||
return static_cast< ParaSettingUI*>(const_cast< SystemSetting*>(this));
|
||||
return QWidget::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int SystemSetting::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QWidget::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 16)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 16;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
|
||||
// SIGNAL 0
|
||||
void SystemSetting::changeEditMode(int _t1)
|
||||
{
|
||||
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 0, _a);
|
||||
}
|
||||
|
||||
// SIGNAL 1
|
||||
void SystemSetting::setRunStatus(QString _t1)
|
||||
{
|
||||
void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
|
||||
QMetaObject::activate(this, &staticMetaObject, 1, _a);
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
||||
@@ -0,0 +1,127 @@
|
||||
#ifndef FORMSCENEDLG_H
|
||||
#define FORMSCENEDLG_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QGraphicsView>
|
||||
#include <QKeyEvent>
|
||||
#include <QWSServer>
|
||||
#include <QBoxLayout>
|
||||
#include <QTimer>
|
||||
#include <QLabel>
|
||||
#include <QTextEdit>
|
||||
#include <QFontDatabase>
|
||||
#include <qmath.h>
|
||||
#include "picscene.h"
|
||||
#include "DialogFileOperation.h"
|
||||
#include "pictextitem.h"
|
||||
#include "myinclude.h"
|
||||
#include "Public.h"
|
||||
namespace Ui {
|
||||
class FormScenedlg;
|
||||
}
|
||||
|
||||
class FormScenedlg : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormScenedlg(QWidget *parent = 0);
|
||||
~FormScenedlg();
|
||||
void bindScene(PicScene *pPicScene, QGraphicsView *pGraphicViewer,QTextEdit *pTextEdit);
|
||||
|
||||
|
||||
static void showQLayout(QLayout *layout, bool visible=true);
|
||||
static QObject *findChildAll(const QLayout *layout, const QString &name);
|
||||
void Layout_ToNew();
|
||||
void Layout_ToDefault();
|
||||
public slots:
|
||||
//void onSceneRectChanged(const QString &text);
|
||||
protected:
|
||||
void changeEvent(QEvent *e);
|
||||
|
||||
signals:
|
||||
void delButton();
|
||||
void saveButton();
|
||||
void openfileButton();
|
||||
void previewButton();
|
||||
void addButton();
|
||||
void EditItemButton();
|
||||
void saveAsButton();
|
||||
void newfileButton();
|
||||
void enlargeButton();
|
||||
void reduceButton();
|
||||
void ZoomOrigin();
|
||||
void btn_test2();
|
||||
private slots:
|
||||
void on_addButton_clicked();
|
||||
|
||||
void on_EditItemButton_clicked();
|
||||
|
||||
void on_delButton_clicked();
|
||||
|
||||
void on_newfileButton_clicked();
|
||||
|
||||
void on_openfileButton_clicked();
|
||||
|
||||
void on_previewButton_clicked();
|
||||
|
||||
void on_saveButton_clicked();
|
||||
|
||||
void on_saveAsButton_clicked();
|
||||
|
||||
void on_enlargeButton_clicked();
|
||||
|
||||
void on_reduceButton_clicked();
|
||||
|
||||
void on_KeyLeft_clicked();
|
||||
|
||||
void on_KeyUp_clicked();
|
||||
|
||||
void on_KeyRight_clicked();
|
||||
|
||||
void on_KeyDown_clicked();
|
||||
|
||||
void on_insertImage_clicked();
|
||||
|
||||
void on_ZoomOrigin_clicked();
|
||||
|
||||
void on_btn_test2_clicked();
|
||||
|
||||
void on_itemNext_clicked();
|
||||
|
||||
void on_itemPrev_clicked();
|
||||
|
||||
void PrintselectedItemInfo();
|
||||
void adjustItemsPos(bool bMoveScrollBar=true);
|
||||
void adjustItemsPosFalse(){adjustItemsPos(false);}
|
||||
void sceneRectChanged_timerHandler();
|
||||
void verticalScrollBar_valueChanged(int value);
|
||||
void horizontalScrollBar_valueChanged(int value);
|
||||
void onFileOpen(QString filePath, bool insertFlag);
|
||||
void reset_showTextWidthHeight();
|
||||
void on_itemFirst_clicked();
|
||||
|
||||
void on_itemLast_clicked();
|
||||
|
||||
|
||||
private:
|
||||
Ui::FormScenedlg *ui;
|
||||
PicScene *pPicScene;
|
||||
QGraphicsView *pViewer;
|
||||
|
||||
QSize SWmaximumSize1;
|
||||
QRect SWgeometry1;
|
||||
QRect FVgeometry2;
|
||||
QRect GVgeometry3;
|
||||
QPoint lastOriginScene;
|
||||
QWidget *tabMainWindow;
|
||||
DialogFileOperation *dialogFileOperation;
|
||||
QTextEdit *textEdit;
|
||||
PicTextItem *textItem;
|
||||
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
};
|
||||
|
||||
#endif // FORMSCENEDLG_H
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "myview.h"
|
||||
#include <QWheelEvent>
|
||||
#include "picscene.h"
|
||||
#include <QDebug>
|
||||
MyView::MyView(QWidget *parent) :
|
||||
QGraphicsView(parent)
|
||||
{
|
||||
zoomRatio = 1;
|
||||
//setDragMode(QGraphicsView::ScrollHandDrag);//手型拖动
|
||||
//setAlignment(Qt::AlignLeft | Qt::AlignTop);
|
||||
//setFocusPolicy( Qt::NoFocus );
|
||||
}
|
||||
static float a = 1.61;
|
||||
void MyView::ZoomOut(void)
|
||||
{
|
||||
if(zoomRatio < 6)
|
||||
{
|
||||
zoomRatio++;
|
||||
// scale(2,2);
|
||||
scale(a,a);
|
||||
}
|
||||
}
|
||||
|
||||
void MyView::ZoomIn(void)
|
||||
{
|
||||
if(zoomRatio > 2)
|
||||
{
|
||||
zoomRatio--;
|
||||
scale(1/a,1/a);
|
||||
}
|
||||
}
|
||||
|
||||
//void MyView::wheelEvent(QWheelEvent*event) //滚轮事件
|
||||
//{
|
||||
//// if(event->delta() > 0) //如果鼠标滚轮远离使用者,则delta()返回正值
|
||||
//// scale(0.5,0.5); //视图缩放
|
||||
//// else scale(2,2);
|
||||
//}
|
||||
|
||||
|
||||
//void MyView::mousePressEvent(QMouseEvent*event)
|
||||
//{
|
||||
//// rotate(90); //视图旋转顺时针90度
|
||||
//}
|
||||
|
||||
void MyView::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
//event->accept();
|
||||
//parent()->event((QEvent*) event);
|
||||
if (event->key() == Qt::Key_Left || event->key() == Qt::Key_Right || event->key() == Qt::Key_Up || event->key() == Qt::Key_Down)
|
||||
{
|
||||
// 处理上下键事件
|
||||
PicScene* picScene = dynamic_cast<PicScene*>(this->scene());
|
||||
if(picScene)
|
||||
{
|
||||
picScene->keyPressEvent(event);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 其他键事件交给父类处理
|
||||
QGraphicsView::keyPressEvent(event);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user