hlp:桂林国际齿轮泵代码
This commit is contained in:
@@ -0,0 +1,304 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DialogPointDistanceAdjust</class>
|
||||
<widget class="QDialog" name="DialogPointDistanceAdjust">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>555</width>
|
||||
<height>194</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>320</x>
|
||||
<y>150</y>
|
||||
<width>221</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>541</width>
|
||||
<height>141</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>列首:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="horizontalSliderLineHeadValue">
|
||||
<property name="minimum">
|
||||
<number>-99</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBoxLineHeadValue">
|
||||
<property name="minimum">
|
||||
<number>-99</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>列中:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="horizontalSliderLineCenterValue">
|
||||
<property name="minimum">
|
||||
<number>-99</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBoxLineCenterValue">
|
||||
<property name="minimum">
|
||||
<number>-99</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>列尾:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="horizontalSliderLineEndValue">
|
||||
<property name="minimum">
|
||||
<number>-99</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spinBoxLineEndValue">
|
||||
<property name="minimum">
|
||||
<number>-99</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButtonReset">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>160</y>
|
||||
<width>98</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>重置</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButtonTest">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>160</y>
|
||||
<width>98</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>测试</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>DialogPointDistanceAdjust</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>DialogPointDistanceAdjust</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>horizontalSliderLineHeadValue</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinBoxLineHeadValue</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>266</x>
|
||||
<y>33</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>518</x>
|
||||
<y>33</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>horizontalSliderLineCenterValue</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinBoxLineCenterValue</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>266</x>
|
||||
<y>80</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>518</x>
|
||||
<y>80</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>horizontalSliderLineEndValue</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>spinBoxLineEndValue</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>266</x>
|
||||
<y>127</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>518</x>
|
||||
<y>127</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinBoxLineHeadValue</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>horizontalSliderLineHeadValue</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>518</x>
|
||||
<y>33</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>266</x>
|
||||
<y>33</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinBoxLineCenterValue</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>horizontalSliderLineCenterValue</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>518</x>
|
||||
<y>80</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>266</x>
|
||||
<y>80</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>spinBoxLineEndValue</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>horizontalSliderLineEndValue</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>518</x>
|
||||
<y>127</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>266</x>
|
||||
<y>127</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* wpa_gui - NetworkConfig class
|
||||
* Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Alternatively, this software may be distributed under the terms of BSD
|
||||
* license.
|
||||
*
|
||||
* See README and COPYING for more details.
|
||||
*/
|
||||
|
||||
#ifndef NETWORKCONFIG_H
|
||||
#define NETWORKCONFIG_H
|
||||
|
||||
#include <QObject>
|
||||
#include "ui_networkconfig.h"
|
||||
|
||||
class WpaGui;
|
||||
|
||||
class NetworkConfig : public QDialog, public Ui::NetworkConfig
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
NetworkConfig(QWidget *parent = 0, const char *name = 0,
|
||||
bool modal = false, Qt::WFlags fl = 0);
|
||||
~NetworkConfig();
|
||||
|
||||
virtual void paramsFromScanResults(QTreeWidgetItem *sel);
|
||||
virtual void setWpaGui(WpaGui *_wpagui);
|
||||
virtual int setNetworkParam(int id, const char *field,
|
||||
const char *value, bool quote);
|
||||
virtual void paramsFromConfig(int network_id);
|
||||
virtual void newNetwork();
|
||||
|
||||
public slots:
|
||||
virtual void authChanged(int sel);
|
||||
virtual void addNetwork();
|
||||
virtual void encrChanged(const QString &sel);
|
||||
virtual void writeWepKey(int network_id, QLineEdit *edit, int id);
|
||||
virtual void removeNetwork();
|
||||
virtual void eapChanged(int sel);
|
||||
virtual void useWps();
|
||||
|
||||
protected slots:
|
||||
virtual void languageChange();
|
||||
|
||||
private:
|
||||
WpaGui *wpagui;
|
||||
int edit_network_id;
|
||||
bool new_network;
|
||||
QString bssid;
|
||||
|
||||
virtual void wepEnabled(bool enabled);
|
||||
virtual void getEapCapa();
|
||||
};
|
||||
|
||||
#endif /* NETWORKCONFIG_H */
|
||||
@@ -0,0 +1,96 @@
|
||||
|
||||
#include "DacDisplayAndEdit.h"
|
||||
#include "ui_dacdisplayandedit.h"
|
||||
#include "QLatin1Char"
|
||||
#include "qdebug.h"
|
||||
#include "qmessagebox.h"
|
||||
|
||||
DacDisplayAndEdit::DacDisplayAndEdit(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::DacDisplayAndEdit)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
for(int i = 0; i < DAC_GRID_MAX_ROW*DAC_GRID_MAX_COL; i++){
|
||||
memLineEdit[i] = new QLineEdit(this);
|
||||
memLineEdit[i]->setAccessibleName(QString::number(i));
|
||||
memLineEdit[i]->setEnabled(false);
|
||||
ui->gridLayoutMem->addWidget(memLineEdit[i],(i/DAC_GRID_MAX_COL) + 1,(i%DAC_GRID_MAX_COL) + 1);
|
||||
connect(memLineEdit[i],SIGNAL(editingFinished ()),this,SLOT(onLineEditEditingFinished()));
|
||||
}
|
||||
for(int i = 0; i < DAC_GRID_MAX_ROW; i++){
|
||||
rowLabel[i] = new QLabel(this);
|
||||
ui->gridLayoutMem->addWidget(rowLabel[i],i + 1,0);
|
||||
}
|
||||
editFlag = false;
|
||||
writeMemBaseAddr = 0;
|
||||
readMemBaseAddr = 0;
|
||||
setEnabled(1);
|
||||
}
|
||||
|
||||
DacDisplayAndEdit::~DacDisplayAndEdit()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
// updateSysStatusToUI
|
||||
void DacDisplayAndEdit::updateSysStatusToUI(void){
|
||||
//
|
||||
}
|
||||
void DacDisplayAndEdit::updateAuthorization(int auth)
|
||||
{
|
||||
//qDebug ()<<auth;
|
||||
}
|
||||
|
||||
void DacDisplayAndEdit::updateSysParaToUI(void){
|
||||
if(sysPara && !editFlag){
|
||||
memLineEdit[0]->setText(QString(" "));
|
||||
for(int i = 1; i < DAC_GRID_MAX_ROW*DAC_GRID_MAX_COL; i++){
|
||||
if(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]>25)sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]=25;
|
||||
if(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]<5) sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]=5;
|
||||
memLineEdit[i]->setText(QString("%1").arg(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK],2,10/*,QLatin1Char('0')*/));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DacDisplayAndEdit::on_pushButtonEdit_pressed()
|
||||
{//ddd
|
||||
if(sysPara){
|
||||
editFlag = !editFlag;
|
||||
for(int i = 1; i < DAC_GRID_MAX_ROW*DAC_GRID_MAX_COL; i++){
|
||||
memLineEdit[i]->setEnabled(editFlag);
|
||||
if(editFlag) memLineEdit[i]->setText(QString("%1").arg(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK],2,10,QLatin1Char('0')));
|
||||
|
||||
}
|
||||
ui->pushButtonEdit->setText(editFlag?tr("完成"):tr("编辑"));
|
||||
}
|
||||
}
|
||||
void DacDisplayAndEdit::on_pushButtonDefault_pressed()// pushButtonDefault pushButtonDefault
|
||||
{
|
||||
if(sysPara){
|
||||
QMessageBox msgBox(QMessageBox::Information,tr("提示"),tr("是否将点距微调参数设置为默认值?"));
|
||||
QPushButton *saveButton = msgBox.addButton(tr("是"), QMessageBox::ActionRole);
|
||||
QPushButton *cancleSaveButton = msgBox.addButton(tr("否"), QMessageBox::ActionRole);
|
||||
QPushButton *abortButton = msgBox.addButton(QMessageBox::Cancel);
|
||||
msgBox.exec();
|
||||
if (msgBox.clickedButton() == saveButton) {
|
||||
for(int i = 1; i < DAC_GRID_MAX_ROW*DAC_GRID_MAX_COL; i++){
|
||||
sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK]=15;
|
||||
memLineEdit[i]->setText(tr("%1").arg(sysPara->para.adjVolDacRate[i&MAX_RD_DAC_SIZE_MASK],2,10,QLatin1Char('0')));
|
||||
}
|
||||
}
|
||||
}
|
||||
else qDebug()<<"sysPara not bind!";
|
||||
}
|
||||
|
||||
void DacDisplayAndEdit::onLineEditEditingFinished(){
|
||||
int val,addr=0;
|
||||
bool ok;
|
||||
QLineEdit * edit = qobject_cast<QLineEdit *>(sender());
|
||||
QString name = edit->accessibleName();
|
||||
val = edit->text().toInt(&ok,10);
|
||||
if(sysPara){
|
||||
addr = name.toInt(&ok);
|
||||
if(val>25)val=25;
|
||||
if(val<5) val =5;
|
||||
sysPara->para.adjVolDacRate[(addr)&MAX_RD_DAC_SIZE_MASK] = (unsigned char)val;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user