hlp:桂林国际齿轮泵代码
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,93 @@
|
||||
/****************************************************************************
|
||||
** Meta object code from reading C++ file 'dlgmutilanguage.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 "../dlgmutilanguage.h"
|
||||
#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
#error "The header file 'dlgmutilanguage.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_DlgMutiLanguage[] = {
|
||||
|
||||
// content:
|
||||
6, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
1, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
0, // flags
|
||||
0, // signalCount
|
||||
|
||||
// slots: signature, parameters, type, tag, flags
|
||||
17, 16, 16, 16, 0x0a,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
|
||||
static const char qt_meta_stringdata_DlgMutiLanguage[] = {
|
||||
"DlgMutiLanguage\0\0SetNewLanguage()\0"
|
||||
};
|
||||
|
||||
void DlgMutiLanguage::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
Q_ASSERT(staticMetaObject.cast(_o));
|
||||
DlgMutiLanguage *_t = static_cast<DlgMutiLanguage *>(_o);
|
||||
switch (_id) {
|
||||
case 0: _t->SetNewLanguage(); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
Q_UNUSED(_a);
|
||||
}
|
||||
|
||||
const QMetaObjectExtraData DlgMutiLanguage::staticMetaObjectExtraData = {
|
||||
0, qt_static_metacall
|
||||
};
|
||||
|
||||
const QMetaObject DlgMutiLanguage::staticMetaObject = {
|
||||
{ &QDialog::staticMetaObject, qt_meta_stringdata_DlgMutiLanguage,
|
||||
qt_meta_data_DlgMutiLanguage, &staticMetaObjectExtraData }
|
||||
};
|
||||
|
||||
#ifdef Q_NO_DATA_RELOCATION
|
||||
const QMetaObject &DlgMutiLanguage::getStaticMetaObject() { return staticMetaObject; }
|
||||
#endif //Q_NO_DATA_RELOCATION
|
||||
|
||||
const QMetaObject *DlgMutiLanguage::metaObject() const
|
||||
{
|
||||
return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
|
||||
}
|
||||
|
||||
void *DlgMutiLanguage::qt_metacast(const char *_clname)
|
||||
{
|
||||
if (!_clname) return 0;
|
||||
if (!strcmp(_clname, qt_meta_stringdata_DlgMutiLanguage))
|
||||
return static_cast<void*>(const_cast< DlgMutiLanguage*>(this));
|
||||
return QDialog::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int DlgMutiLanguage::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
|
||||
{
|
||||
_id = QDialog::qt_metacall(_c, _id, _a);
|
||||
if (_id < 0)
|
||||
return _id;
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
if (_id < 1)
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
_id -= 1;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
QT_END_MOC_NAMESPACE
|
||||
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* wpa_gui - ScanResults 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.
|
||||
*/
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "scanresults.h"
|
||||
#include "wpagui.h"
|
||||
#include "networkconfig.h"
|
||||
|
||||
|
||||
ScanResults::ScanResults(QWidget *parent, const char *, bool, Qt::WFlags)
|
||||
: QDialog(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(scanButton, SIGNAL(clicked()), this, SLOT(scanRequest()));
|
||||
connect(scanResultsWidget,
|
||||
SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this,
|
||||
SLOT(bssSelected(QTreeWidgetItem *)));
|
||||
|
||||
wpagui = NULL;
|
||||
scanResultsWidget->setItemsExpandable(FALSE);
|
||||
scanResultsWidget->setRootIsDecorated(FALSE);
|
||||
}
|
||||
|
||||
|
||||
ScanResults::~ScanResults()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void ScanResults::languageChange()
|
||||
{
|
||||
retranslateUi(this);
|
||||
}
|
||||
|
||||
|
||||
void ScanResults::setWpaGui(WpaGui *_wpagui)
|
||||
{
|
||||
wpagui = _wpagui;
|
||||
updateResults();
|
||||
}
|
||||
|
||||
|
||||
void ScanResults::updateResults()
|
||||
{
|
||||
char reply[2048];
|
||||
size_t reply_len;
|
||||
int index;
|
||||
char cmd[20];
|
||||
|
||||
scanResultsWidget->clear();
|
||||
|
||||
index = 0;
|
||||
while (wpagui) {
|
||||
snprintf(cmd, sizeof(cmd), "BSS %d", index++);
|
||||
if (index > 1000)
|
||||
break;
|
||||
|
||||
reply_len = sizeof(reply) - 1;
|
||||
if (wpagui->ctrlRequest(cmd, reply, &reply_len) < 0)
|
||||
break;
|
||||
reply[reply_len] = '\0';
|
||||
|
||||
QString bss(reply);
|
||||
if (bss.isEmpty() || bss.startsWith("FAIL"))
|
||||
break;
|
||||
|
||||
QString ssid, bssid, freq, signal, flags;
|
||||
|
||||
QStringList lines = bss.split(QRegExp("\\n"));
|
||||
for (QStringList::Iterator it = lines.begin();
|
||||
it != lines.end(); it++) {
|
||||
int pos = (*it).indexOf('=') + 1;
|
||||
if (pos < 1)
|
||||
continue;
|
||||
|
||||
if ((*it).startsWith("bssid="))
|
||||
bssid = (*it).mid(pos);
|
||||
else if ((*it).startsWith("freq="))
|
||||
freq = (*it).mid(pos);
|
||||
else if ((*it).startsWith("qual="))
|
||||
signal = (*it).mid(pos);
|
||||
else if ((*it).startsWith("flags="))
|
||||
flags = (*it).mid(pos);
|
||||
else if ((*it).startsWith("ssid="))
|
||||
ssid = (*it).mid(pos);
|
||||
}
|
||||
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem(scanResultsWidget);
|
||||
if (item) {
|
||||
item->setText(0, ssid);
|
||||
item->setText(1, bssid);
|
||||
item->setText(2, freq);
|
||||
item->setText(3, signal);
|
||||
item->setText(4, flags);
|
||||
}
|
||||
|
||||
if (bssid.isEmpty())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ScanResults::scanRequest()
|
||||
{
|
||||
char reply[10];
|
||||
size_t reply_len = sizeof(reply);
|
||||
|
||||
if (wpagui == NULL)
|
||||
return;
|
||||
|
||||
wpagui->ctrlRequest("SCAN", reply, &reply_len);
|
||||
}
|
||||
|
||||
|
||||
void ScanResults::getResults()
|
||||
{
|
||||
updateResults();
|
||||
}
|
||||
|
||||
|
||||
void ScanResults::bssSelected(QTreeWidgetItem *sel)
|
||||
{
|
||||
NetworkConfig *nc = new NetworkConfig();
|
||||
if (nc == NULL)
|
||||
return;
|
||||
nc->setWpaGui(wpagui);
|
||||
nc->paramsFromScanResults(sel);
|
||||
nc->show();
|
||||
nc->exec();
|
||||
}
|
||||
Reference in New Issue
Block a user