git-svn-id: svn://db.shs.com.ru/libs@84 a8b55f48-bf90-11e4-a774-851b48703e85
@@ -18,7 +18,7 @@ foreach(F ${PIP_FOLDERS})
|
|||||||
endforeach(F)
|
endforeach(F)
|
||||||
#message(STATUS "PIP includes = ${PIP_INCLUDES}")
|
#message(STATUS "PIP includes = ${PIP_INCLUDES}")
|
||||||
|
|
||||||
set(LIST_LIBS pip qad_widgets qad_utils qad_application qad_blockview qad_graphic qad_sql_table piqt mbricks kx_tools piqt_tools touch_widgets qglview)
|
set(LIST_LIBS pip qad_widgets qad_utils qad_application qad_blockview qad_graphic qad_sql_table piqt mbricks kx_utils piqt_utils touch_widgets qglview)
|
||||||
|
|
||||||
foreach(L ${LIST_LIBS})
|
foreach(L ${LIST_LIBS})
|
||||||
add_subdirectory(${L})
|
add_subdirectory(${L})
|
||||||
@@ -28,6 +28,5 @@ endforeach(L)
|
|||||||
if (${WIN32})
|
if (${WIN32})
|
||||||
get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE} PATH)
|
get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE} PATH)
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pip/libpip.dll" DESTINATION ${QTDIR})
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pip/libpip.dll" DESTINATION ${QTDIR})
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/piqt_tools/libpiqt_utils.dll" DESTINATION ${QTDIR})
|
|
||||||
install(FILES "FindMinGW.cmake" DESTINATION ${CMAKE_ROOT}/Modules)
|
install(FILES "FindMinGW.cmake" DESTINATION ${CMAKE_ROOT}/Modules)
|
||||||
endif (${WIN32})
|
endif (${WIN32})
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
del /q /f /s CMakeFiles
|
del /q /f /s CMakeFiles
|
||||||
rmdir /q /s CMakeFiles
|
rmdir /q /s CMakeFiles
|
||||||
del /q /f CMakeCache.txt Makefile cmake_install.cmake install_manifest.txt *.user* *~ *cxx moc_* ui_* qrc_* *.o *.exe *.a *.dll *.lib core
|
del /q /f CMakeCache.txt Makefile cmake_install.cmake install_manifest.txt *.user* *~ *cxx moc_* ui_* qrc_* *.o *.exe *.a *.dll *.lib core
|
||||||
for %%i in (pip pip_0.4.0_r5 mbricks piqt piqt_tools qad_widgets qad_utils qad_graphic qad_sql_table qad_application touch_widgets qglview kx_tools qad_blockview) do cd %%i && call clean.bat && cd ..
|
for %%i in (pip mbricks piqt piqt_utils qad_widgets qad_utils qad_graphic qad_sql_table qad_application touch_widgets qglview kx_utils qad_blockview) do cd %%i && call clean.bat && cd ..
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
enum K_Synhro {
|
|
||||||
Min_dt, //f 4
|
|
||||||
Max_dt, //f 25
|
|
||||||
Base_Variance, //f 10.
|
|
||||||
Max_Variance, //f 100.
|
|
||||||
History_Size, //f 8
|
|
||||||
Min_Rec_Count_Calc, //f 3
|
|
||||||
Collapse_Max_Speed, //f 10
|
|
||||||
Collapse_Max_Pos, //f 10
|
|
||||||
Missed_Delete_Detected_All, //f 4
|
|
||||||
Missed_Delete_Detected_Cont, //f 0
|
|
||||||
Missed_Delete_New_All, //f 8
|
|
||||||
Missed_Delete_New_Cont, //f 0
|
|
||||||
Missed_Delete_Confirmed_All, //f 0
|
|
||||||
Missed_Delete_Confirmed_Cont, //f 16
|
|
||||||
Change_Type_to_New, //f 2
|
|
||||||
Change_Type_to_Confirmed, //f 8
|
|
||||||
WLS_EMA_a, //f 0.05
|
|
||||||
Impulse, //f 0.05
|
|
||||||
Cycle_da, //f 6.
|
|
||||||
Max_LID, //f 50.
|
|
||||||
Detects_Timeout, //f 200.
|
|
||||||
};
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
project(kx_tools)
|
project(kx_utils)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
if (NOT LIBPROJECT)
|
if (NOT LIBPROJECT)
|
||||||
find_package(PIP REQUIRED)
|
find_package(PIP REQUIRED)
|
||||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1005 B After Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 813 B After Width: | Height: | Size: 813 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1017 B After Width: | Height: | Size: 1017 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 563 B After Width: | Height: | Size: 563 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 644 B After Width: | Height: | Size: 644 B |
|
Before Width: | Height: | Size: 802 B After Width: | Height: | Size: 802 B |
|
Before Width: | Height: | Size: 485 B After Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 640 B After Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 634 B |
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 529 B |
|
Before Width: | Height: | Size: 571 B After Width: | Height: | Size: 571 B |
|
Before Width: | Height: | Size: 577 B After Width: | Height: | Size: 577 B |
|
Before Width: | Height: | Size: 579 B After Width: | Height: | Size: 579 B |
|
Before Width: | Height: | Size: 577 B After Width: | Height: | Size: 577 B |
|
Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 639 B |
|
Before Width: | Height: | Size: 448 B After Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 564 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 694 B After Width: | Height: | Size: 694 B |
|
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
|
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 691 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 539 B After Width: | Height: | Size: 539 B |
|
Before Width: | Height: | Size: 929 B After Width: | Height: | Size: 929 B |
0
kx_utils/kx_pult.conf
Normal file
@@ -1 +1 @@
|
|||||||
cmake_mgw && make install -j8 && for %%d in (qad_widgets qad_utils qad_graphic qad_sql_table qad_application touch_widgets qad_blockview) do cd %%d && qmake && make install -j8 && cd ..
|
cmake_mgw -DICU=1 -DUSB=1 -DCRYPT=1 && make install -j8 && for %%d in (qad_widgets qad_utils qad_graphic qad_sql_table qad_application touch_widgets qad_blockview) do cd %%d && qmake && make install -j8 && cd ..
|
||||||
|
|||||||
@@ -1,357 +0,0 @@
|
|||||||
#include "mainwindow.h"
|
|
||||||
#include "pifile.h"
|
|
||||||
#include "pitime.h"
|
|
||||||
#include "pidir.h"
|
|
||||||
#include "ccm.h"
|
|
||||||
#include <QClipboard>
|
|
||||||
|
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget * parent): QMainWindow(parent) {
|
|
||||||
SLOT(f(1,2,3));
|
|
||||||
SIGNAL((1,2,3));
|
|
||||||
setupUi(this);
|
|
||||||
treeProperties->header()->setResizeMode(QHeaderView::ResizeToContents);
|
|
||||||
treeChannels->header()->setResizeMode(QHeaderView::ResizeToContents);
|
|
||||||
treeDump->header()->setResizeMode(QHeaderView::ResizeToContents);
|
|
||||||
PICodeInfo::EnumInfo * ei = PICodeInfo::enumsInfo->value("PIIODevice::DeviceMode");
|
|
||||||
if (ei) {
|
|
||||||
labelDevice->setText(PI2QString(ei->name) + ":");
|
|
||||||
piForeachC (PICodeInfo::EnumeratorInfo & e, ei->members)
|
|
||||||
comboDevice->addItem(PI2QString(e.name + " (" + PIString::fromNumber(e.value) + ")"), QVariant::fromValue<int>(e.value));
|
|
||||||
}
|
|
||||||
ei = PICodeInfo::enumsInfo->value("PIPacketExtractor::SplitMode");
|
|
||||||
if (ei) {
|
|
||||||
labelSplit->setText(PI2QString(ei->name) + ":");
|
|
||||||
piForeachC (PICodeInfo::EnumeratorInfo & e, ei->members)
|
|
||||||
comboSplit->addItem(PI2QString(e.name + " (" + PIString::fromNumber(e.value) + ")"), QVariant::fromValue<int>(e.value));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::changeEvent(QEvent * e) {
|
|
||||||
QMainWindow::changeEvent(e);
|
|
||||||
switch (e->type()) {
|
|
||||||
case QEvent::LanguageChange:
|
|
||||||
retranslateUi(this);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::updateTree() {
|
|
||||||
QList<QTreeWidgetItem*> sel(treeConnections->findItems("", Qt::MatchContains | Qt::MatchRecursive));
|
|
||||||
QStringList sell;
|
|
||||||
foreach (QTreeWidgetItem * i, sel)
|
|
||||||
if (i->isSelected()) sell << i->text(0);
|
|
||||||
treeConnections->clear();
|
|
||||||
PIVector<PIConnection * > conns = PIConnection::allConnections();
|
|
||||||
piForeachC (PIConnection * c, conns) {
|
|
||||||
QTreeWidgetItem * ti = new QTreeWidgetItem();
|
|
||||||
ti->setText(0, PI2QString(c->name()));
|
|
||||||
ti->setData(0, Qt::UserRole, 1);
|
|
||||||
ti->setData(0, Qt::UserRole + 1, quintptr(c));
|
|
||||||
PIVector<PIIODevice * > bdl(c->boundedDevices());
|
|
||||||
piForeachC (PIIODevice * d, bdl) {
|
|
||||||
QTreeWidgetItem * pi = new QTreeWidgetItem(ti);
|
|
||||||
pi->setData(0, Qt::UserRole, 2);
|
|
||||||
pi->setData(0, Qt::UserRole + 1, quintptr(d));
|
|
||||||
pi->setText(0, "[Device] " + PI2QString(d->property("__fullPath__").toString()));
|
|
||||||
}
|
|
||||||
PIStringList pel(c->filterNames());
|
|
||||||
piForeachC (PIString & pe, pel) {
|
|
||||||
QTreeWidgetItem * pi = new QTreeWidgetItem(ti);
|
|
||||||
pi->setData(0, Qt::UserRole, 3);
|
|
||||||
pi->setData(0, Qt::UserRole + 1, PI2QString(pe));
|
|
||||||
pi->setText(0, "[Filter] " + PI2QString(pe + " (" +
|
|
||||||
PICodeInfo::enumsInfo->value("PIPacketExtractor::SplitMode")->memberName(c->filter(pe)->splitMode()) + ")"));
|
|
||||||
PIVector<PIIODevice * > pebdl(c->filterBoundedDevices(pe));
|
|
||||||
piForeachC (PIIODevice * d, pebdl) {
|
|
||||||
QTreeWidgetItem * pdi = new QTreeWidgetItem(pi);
|
|
||||||
pdi->setData(0, Qt::UserRole, 4);
|
|
||||||
pdi->setData(0, Qt::UserRole + 1, quintptr(d));
|
|
||||||
if (PIString(d->className()) == "PIPacketExtractor")
|
|
||||||
pdi->setText(0, "[Filter] " + PI2QString(d->name()));
|
|
||||||
else
|
|
||||||
pdi->setText(0, "[Device] " + PI2QString(d->property("__fullPath__").toString()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
treeConnections->addTopLevelItem(ti);
|
|
||||||
}
|
|
||||||
sel = treeConnections->findItems("", Qt::MatchContains | Qt::MatchRecursive);
|
|
||||||
foreach (QTreeWidgetItem * i, sel)
|
|
||||||
if (sell.contains(i->text(0))) {
|
|
||||||
i->setSelected(sell.contains(i->text(0)));
|
|
||||||
treeConnections->setCurrentItem(i);
|
|
||||||
}
|
|
||||||
treeConnections->expandAll();
|
|
||||||
|
|
||||||
treeDevices->clear();
|
|
||||||
PIVector<PIIODevice * > devs(PIConnection::allDevices());
|
|
||||||
piForeachC (PIIODevice * i, devs) {
|
|
||||||
PIString ms;
|
|
||||||
switch (i->mode()) {
|
|
||||||
case PIIODevice::ReadOnly: ms = "Ro"; break;
|
|
||||||
case PIIODevice::WriteOnly: ms = "Wo"; break;
|
|
||||||
case PIIODevice::ReadWrite: ms = "RW"; break;
|
|
||||||
}
|
|
||||||
treeDevices->addTopLevelItem(new QTreeWidgetItem(QStringList(PI2QString(PIString(i->className()) + " (" + ms + "): " + i->path()))));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::updateProperties(PIObject * o) {
|
|
||||||
labelObject->clear();
|
|
||||||
if (o == 0) return;
|
|
||||||
labelObject->setText(PI2QString(PIString(o->className()) + " \"" + o->name() + "\""));
|
|
||||||
PIMap<PIString, PIVariant> props(o->properties());
|
|
||||||
typedef PIMap<PIString, PIVariant>::value_type PPair;
|
|
||||||
piForeachC (PPair p, props)
|
|
||||||
treeProperties->addTopLevelItem(new QTreeWidgetItem(QStringList()
|
|
||||||
<< PI2QString(p.first)
|
|
||||||
<< PI2QString(PIVariant::typeName(p.second.type()))
|
|
||||||
<< PI2QString(p.second.toString()) ));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
PIConnection * MainWindow::currentConnection() {
|
|
||||||
QTreeWidgetItem * ci = treeConnections->currentItem();
|
|
||||||
if (ci == 0) return 0;
|
|
||||||
while (ci->parent() != 0)
|
|
||||||
ci = ci->parent();
|
|
||||||
return (PIConnection * )(ci->data(0, Qt::UserRole + 1).toULongLong());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
PIPacketExtractor * MainWindow::currentPacketExt() {
|
|
||||||
QTreeWidgetItem * ci = treeConnections->currentItem();
|
|
||||||
if (ci == 0) return 0;
|
|
||||||
if (ci->data(0, Qt::UserRole).toInt() < 3) return 0;
|
|
||||||
if (ci->data(0, Qt::UserRole).toInt() == 4) ci = ci->parent();
|
|
||||||
return currentConnection()->filter(Q2PIString(ci->data(0, Qt::UserRole + 1).toString()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_buttonNewConnection_clicked() {
|
|
||||||
(new PIConnection())->setName(Q2PIString(lineNew->text()));
|
|
||||||
updateTree();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_buttonAddDevice_clicked() {
|
|
||||||
PIConnection * c = currentConnection();
|
|
||||||
if (!c) return;
|
|
||||||
PIPacketExtractor * pe = currentPacketExt();
|
|
||||||
PIString dn(Q2PIString(lineDevice->text()));
|
|
||||||
if (pe) {
|
|
||||||
c->addFilter(pe->name(), dn);
|
|
||||||
} else
|
|
||||||
c->addDevice(dn, (PIIODevice::DeviceMode)(comboDevice->itemData(comboDevice->currentIndex()).toInt()));
|
|
||||||
updateTree();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_buttonAddPacketExt_clicked() {
|
|
||||||
PIConnection * c = currentConnection();
|
|
||||||
if (!c) return;
|
|
||||||
c->addFilter(Q2PIString(linePacketExt->text()), Q2PIString(lineDevice->text()),
|
|
||||||
(PIPacketExtractor::SplitMode)(comboSplit->itemData(comboSplit->currentIndex()).toInt()));
|
|
||||||
updateTree();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_buttonRemove_clicked() {
|
|
||||||
QTreeWidgetItem * ci = treeConnections->currentItem();
|
|
||||||
if (ci == 0) return;
|
|
||||||
PIIODevice * d(0);
|
|
||||||
switch (ci->data(0, Qt::UserRole).toInt()) {
|
|
||||||
case 1:
|
|
||||||
delete currentConnection();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
d = (PIIODevice*)(ci->data(0, Qt::UserRole + 1).toULongLong());
|
|
||||||
currentConnection()->removeDevice(d->property("__fullPath__").toString());
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
currentConnection()->removeFilter(Q2PIString(ci->data(0, Qt::UserRole + 1).toString()));
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
d = (PIIODevice*)(ci->data(0, Qt::UserRole + 1).toULongLong());
|
|
||||||
currentConnection()->removeFilter(Q2PIString(ci->parent()->data(0, Qt::UserRole + 1).toString()),
|
|
||||||
d->property("__fullPath__").toString());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
updateTree();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_buttonAddFromConfig_clicked() {
|
|
||||||
QFile f("c.conf");
|
|
||||||
f.open(QIODevice::ReadWrite);
|
|
||||||
f.resize(0);
|
|
||||||
f.write((textEdit->toPlainText() + "\n").toUtf8());
|
|
||||||
f.close();
|
|
||||||
new PIConnection("c.conf", Q2PIString(lineNew_2->text()));
|
|
||||||
updateTree();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_buttonToConfig_clicked() {
|
|
||||||
PIConnection * c = currentConnection();
|
|
||||||
if (!c) return;
|
|
||||||
textEdit_2->setPlainText(PI2QString(c->makeConfig()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_buttonAddChannel_clicked() {
|
|
||||||
PIConnection * c = currentConnection();
|
|
||||||
if (!c) return;
|
|
||||||
c->addChannel(Q2PIString(lineChannel0->text()), (Q2PIString(lineChannel1->text())));
|
|
||||||
updateTree();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_treeConnections_currentItemChanged(QTreeWidgetItem * ci, QTreeWidgetItem *) {
|
|
||||||
treeProperties->clear();
|
|
||||||
treeChannels->clear();
|
|
||||||
if (ci == 0) return;
|
|
||||||
switch (ci->data(0, Qt::UserRole).toInt()) {
|
|
||||||
case 1:
|
|
||||||
updateProperties(currentConnection());
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
updateProperties(currentConnection()->filter(Q2PIString(ci->data(0, Qt::UserRole + 1).toString())));
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
case 4:
|
|
||||||
updateProperties((PIIODevice*)(ci->data(0, Qt::UserRole + 1).toULongLong()));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
PIConnection * c = currentConnection();
|
|
||||||
if (c == 0) return;
|
|
||||||
typedef PIPair<PIString, PIString> SSPair;
|
|
||||||
PIVector<SSPair> chns(c->channels());
|
|
||||||
piForeachC (SSPair & i, chns)
|
|
||||||
treeChannels->addTopLevelItem(new QTreeWidgetItem(QStringList() << PI2QString(i.first) << " -> " << PI2QString(i.second)));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::buildDump() {
|
|
||||||
treeDump->clear();
|
|
||||||
if (!dump.contains('{')) return;
|
|
||||||
PIString app = dump.takeWord();
|
|
||||||
if (app != "application") return;
|
|
||||||
dump.takeLine();
|
|
||||||
QTreeWidgetItem * ti;
|
|
||||||
while (!dump.isEmpty()) {
|
|
||||||
PIString line = dump.takeLine();
|
|
||||||
if (line.contains('{')) {
|
|
||||||
ti = new QTreeWidgetItem();
|
|
||||||
dump.prepend(line + "\n");
|
|
||||||
buildDumpSection(ti, dump);
|
|
||||||
treeDump->addTopLevelItem(ti);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
int colon = line.find(":");
|
|
||||||
if (colon < 0) continue;
|
|
||||||
PIString name = line.takeLeft(colon).trim();
|
|
||||||
PIString value = line.cutLeft(1).trim();
|
|
||||||
if (value.startsWith("\"")) value.cutLeft(1);
|
|
||||||
if (value.endsWith("\"")) value.cutRight(1);
|
|
||||||
ti = new QTreeWidgetItem(QStringList() << PI2QString(name) << PI2QString(value));
|
|
||||||
treeDump->addTopLevelItem(ti);
|
|
||||||
}
|
|
||||||
on_checkDumpHideService_toggled(checkDumpHideService->isChecked());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::buildDumpSection(QTreeWidgetItem * pi, PIString & str) {
|
|
||||||
PIString section = str.takeLeft(str.find("{")).trim();
|
|
||||||
PIString value;
|
|
||||||
if (section.contains('(')) {
|
|
||||||
value = section;
|
|
||||||
section = value.takeLeft(value.find('('));
|
|
||||||
value = value.takeRange("(", ")");
|
|
||||||
}
|
|
||||||
pi->setText(0, piqt(section));
|
|
||||||
pi->setText(1, piqt(value));
|
|
||||||
//if (section == "PIObjects")
|
|
||||||
PIString range = str.takeRange("{", "}");
|
|
||||||
QTreeWidgetItem * ti;
|
|
||||||
PIString fs;
|
|
||||||
if (section == "PIObjects" || section == "properties") fs = ":";
|
|
||||||
if (section == "methodsEH") fs = " ";
|
|
||||||
if (section == "connections") fs = "->";
|
|
||||||
while (!range.isEmpty()) {
|
|
||||||
PIString line = range.takeLine().trim();
|
|
||||||
if (line.contains('{')) {
|
|
||||||
ti = new QTreeWidgetItem(pi);
|
|
||||||
range.prepend(line + "\n");
|
|
||||||
buildDumpSection(ti, range);
|
|
||||||
//treeDump->addTopLevelItem(ti);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (line.left(line.find(":")).trim() == "count") {
|
|
||||||
pi->setText(1, "[" + PI2QString(line.right(line.length() - line.find(":") - 1).trim()) + "]");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
int colon = line.find(fs);
|
|
||||||
if (colon < 0) continue;
|
|
||||||
PIString name = line.takeLeft(colon).trim();
|
|
||||||
PIString value = line.cutLeft(fs.size_s()).trim();
|
|
||||||
if (value.startsWith("\"")) value.cutLeft(1);
|
|
||||||
if (value.endsWith("\"")) value.cutRight(1);
|
|
||||||
if (name.endsWith(":")) name.cutRight(1);
|
|
||||||
if (name.isEmpty() && value.isEmpty()) continue;
|
|
||||||
ti = new QTreeWidgetItem(pi, QStringList() << PI2QString(name) << PI2QString(value));
|
|
||||||
//treeDump->addTopLevelItem(ti);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_buttonDumpMake_clicked() {
|
|
||||||
if (radioDumpCurrent->isChecked()) {
|
|
||||||
PICout::setBufferActive(true, true);
|
|
||||||
dumpApplication();
|
|
||||||
dump = PICout::buffer();
|
|
||||||
PICout::setBufferActive(false);
|
|
||||||
} else {
|
|
||||||
int pid = lineDumpCustom->text().toInt();
|
|
||||||
if (pid == 0) return;
|
|
||||||
if (system(QString("kill -USR1 %1").arg(pid).toLatin1().constData()) < 0) return;
|
|
||||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
|
||||||
PIString dp = PIDir::home().path() + "/_PIP_DUMP_" + PIString::fromNumber(pid);
|
|
||||||
PITimeMeasurer tm;
|
|
||||||
while (tm.elapsed_s() < 5. && !PIFile::isExists(dp)) {
|
|
||||||
piMSleep(10);
|
|
||||||
}
|
|
||||||
//piSleep(2.);
|
|
||||||
PIFile f(dp, PIIODevice::ReadOnly);
|
|
||||||
QApplication::restoreOverrideCursor();
|
|
||||||
if (!f.isOpened()) return;
|
|
||||||
dump = PIString(f.readAll());
|
|
||||||
f.remove();
|
|
||||||
}
|
|
||||||
buildDump();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_buttonDumpClipboard_clicked() {
|
|
||||||
dump = Q2PIString(QApplication::clipboard()->text());
|
|
||||||
buildDump();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_checkDumpHideService_toggled(bool on) {
|
|
||||||
QList<QTreeWidgetItem * > il = treeDump->findItems("", Qt::MatchContains | Qt::MatchRecursive);
|
|
||||||
foreach (QTreeWidgetItem * i, il) {
|
|
||||||
if (on) {
|
|
||||||
if (i->text(0).startsWith("class"))
|
|
||||||
i->setHidden(i->text(1).contains("__S__"));
|
|
||||||
} else
|
|
||||||
i->setHidden(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
#ifndef MAINWINDOW_H
|
|
||||||
#define MAINWINDOW_H
|
|
||||||
|
|
||||||
#include "ui_mainwindow.h"
|
|
||||||
#include <QImage>
|
|
||||||
#include <QTime>
|
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <qmath.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <QDebug>
|
|
||||||
#include "piqt.h"
|
|
||||||
#include "piconnection.h"
|
|
||||||
|
|
||||||
class MainWindow: public QMainWindow, private Ui::MainWindow
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
MainWindow(QWidget * parent = 0);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void changeEvent(QEvent * e);
|
|
||||||
void updateTree();
|
|
||||||
void updateProperties(PIObject * o);
|
|
||||||
PIConnection * currentConnection();
|
|
||||||
PIPacketExtractor * currentPacketExt();
|
|
||||||
|
|
||||||
void buildDump();
|
|
||||||
void buildDumpSection(QTreeWidgetItem * pi, PIString & str);
|
|
||||||
|
|
||||||
PIString dump;
|
|
||||||
|
|
||||||
private slots:
|
|
||||||
void on_buttonNewConnection_clicked();
|
|
||||||
void on_buttonAddDevice_clicked();
|
|
||||||
void on_buttonAddPacketExt_clicked();
|
|
||||||
void on_buttonRemove_clicked();
|
|
||||||
void on_buttonAddFromConfig_clicked();
|
|
||||||
void on_buttonToConfig_clicked();
|
|
||||||
void on_buttonAddChannel_clicked();
|
|
||||||
void on_treeConnections_currentItemChanged(QTreeWidgetItem * cur, QTreeWidgetItem * );
|
|
||||||
|
|
||||||
void on_buttonDumpMake_clicked();
|
|
||||||
void on_buttonDumpClipboard_clicked();
|
|
||||||
void on_checkDumpHideService_toggled(bool on);
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
|
||||||
@@ -1,692 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>MainWindow</class>
|
|
||||||
<widget class="QMainWindow" name="MainWindow">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>1134</width>
|
|
||||||
<height>854</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>PIQt Tool</string>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="centralwidget">
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="tab">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>PIConnection</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<item row="0" column="0" rowspan="2">
|
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
|
||||||
<property name="title">
|
|
||||||
<string>Control</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="9" column="0" colspan="2">
|
|
||||||
<spacer name="verticalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="1">
|
|
||||||
<widget class="QComboBox" name="comboSplit"/>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineNew_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>conn_conf</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="0">
|
|
||||||
<widget class="QPushButton" name="buttonAddFromConfig">
|
|
||||||
<property name="text">
|
|
||||||
<string>fromConfig</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QLineEdit" name="linePacketExt">
|
|
||||||
<property name="text">
|
|
||||||
<string>pe</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QComboBox" name="comboDevice"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QPushButton" name="buttonAddDevice">
|
|
||||||
<property name="text">
|
|
||||||
<string>addDevice</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineDevice">
|
|
||||||
<property name="text">
|
|
||||||
<string>eth://udp:127.0.0.1</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="lineNew">
|
|
||||||
<property name="text">
|
|
||||||
<string>conn</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QPushButton" name="buttonNewConnection">
|
|
||||||
<property name="text">
|
|
||||||
<string>New connection</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QPushButton" name="buttonAddPacketExt">
|
|
||||||
<property name="text">
|
|
||||||
<string>addPacketExtractor</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" colspan="2">
|
|
||||||
<spacer name="verticalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="2">
|
|
||||||
<spacer name="verticalSpacer_4">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="labelSplit">
|
|
||||||
<property name="text">
|
|
||||||
<string>split mode:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="labelDevice">
|
|
||||||
<property name="text">
|
|
||||||
<string>open mode:</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="0" colspan="2">
|
|
||||||
<widget class="QPushButton" name="buttonRemove">
|
|
||||||
<property name="text">
|
|
||||||
<string>remove</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="0" colspan="2">
|
|
||||||
<spacer name="verticalSpacer_5">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="0" colspan="2">
|
|
||||||
<widget class="QPlainTextEdit" name="textEdit">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>DejaVu Sans Mono</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="plainText">
|
|
||||||
<string>[conn_conf]
|
|
||||||
device.0 = file://piiodevice.h (ro)
|
|
||||||
filter.h&f.device.0 = file://piiodevice.h
|
|
||||||
filter.h&f.splitMode = header & footer
|
|
||||||
filter.h&f.payloadSize = 0
|
|
||||||
filter.h&f.packetSize = 0
|
|
||||||
filter.h&f.timeout = 100
|
|
||||||
filter.h&f.header = 0x2F 0x2F 0x21
|
|
||||||
filter.h&f.footer = 0xA
|
|
||||||
filter.h3.device.0 = h
|
|
||||||
filter.h3.splitMode = footer
|
|
||||||
filter.h3.payloadSize = 3
|
|
||||||
filter.h3.packetSize = 0
|
|
||||||
filter.h3.timeout = 100
|
|
||||||
filter.h3.header =
|
|
||||||
filter.h3.footer = 0x20
|
|
||||||
filter.h2.device.0 = h
|
|
||||||
filter.h2.splitMode = header & footer
|
|
||||||
filter.h2.payloadSize = 0
|
|
||||||
filter.h2.packetSize = 0
|
|
||||||
filter.h2.timeout = 100
|
|
||||||
filter.h2.header = 0x49
|
|
||||||
filter.h2.footer = 0x20
|
|
||||||
filter.h.device.0 = h&f
|
|
||||||
filter.h.splitMode = header
|
|
||||||
filter.h.payloadSize = 10
|
|
||||||
filter.h.packetSize = 0
|
|
||||||
filter.h.timeout = 100
|
|
||||||
filter.h.header = 0x50 0x49
|
|
||||||
filter.h.footer =
|
|
||||||
[]
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="tabStopWidth">
|
|
||||||
<number>40</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="16" column="0" colspan="2">
|
|
||||||
<widget class="QPlainTextEdit" name="textEdit_2">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>DejaVu Sans Mono</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="tabStopWidth">
|
|
||||||
<number>40</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="15" column="0" colspan="2">
|
|
||||||
<widget class="QPushButton" name="buttonToConfig">
|
|
||||||
<property name="text">
|
|
||||||
<string>toConfig</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="14" column="0" colspan="2">
|
|
||||||
<spacer name="verticalSpacer_6">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0" colspan="2">
|
|
||||||
<spacer name="verticalSpacer_7">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>10</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0" colspan="2">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="buttonAddChannel">
|
|
||||||
<property name="text">
|
|
||||||
<string>addChannel</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineChannel0">
|
|
||||||
<property name="text">
|
|
||||||
<string>eth://udp:127.0.0.2:5000</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelSplit_2">
|
|
||||||
<property name="text">
|
|
||||||
<string>-></string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineChannel1">
|
|
||||||
<property name="text">
|
|
||||||
<string>ser:///dev/ttyS0</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Connections</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QTreeWidget" name="treeConnections">
|
|
||||||
<property name="verticalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<attribute name="headerVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">1</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QGroupBox" name="groupBox_4">
|
|
||||||
<property name="title">
|
|
||||||
<string>Properties</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="labelObject">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTreeWidget" name="treeProperties">
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="verticalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<attribute name="headerDefaultSectionSize">
|
|
||||||
<number>150</number>
|
|
||||||
</attribute>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Name</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Type</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Value</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Devices</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QTreeWidget" name="treeDevices">
|
|
||||||
<property name="verticalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<attribute name="headerVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">1</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QGroupBox" name="groupBox_5">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Channels</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
||||||
<item>
|
|
||||||
<widget class="QTreeWidget" name="treeChannels">
|
|
||||||
<property name="verticalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<attribute name="headerVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="headerDefaultSectionSize">
|
|
||||||
<number>10</number>
|
|
||||||
</attribute>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">1</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>2</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>3</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab_2">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Dump</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="buttonDumpMake">
|
|
||||||
<property name="text">
|
|
||||||
<string>Make PIP dump</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="buttonDumpClipboard">
|
|
||||||
<property name="text">
|
|
||||||
<string>Take PIP dump from clipboard</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QGroupBox" name="groupBox_6">
|
|
||||||
<property name="title">
|
|
||||||
<string>Process</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioDumpCurrent">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Current</string>
|
|
||||||
</property>
|
|
||||||
<property name="checked">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Preferred</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="radioDumpCustom">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Custom:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineDumpCustom">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>1</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkDumpHideService">
|
|
||||||
<property name="text">
|
|
||||||
<string>Hide service objects</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTreeWidget" name="treeDump">
|
|
||||||
<property name="editTriggers">
|
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
|
||||||
</property>
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="verticalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalScrollMode">
|
|
||||||
<enum>QAbstractItemView::ScrollPerPixel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="headerHidden">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="columnCount">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
<attribute name="headerVisible">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="headerMinimumSectionSize">
|
|
||||||
<number>20</number>
|
|
||||||
</attribute>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">1</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string notr="true">2</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QToolBar" name="toolBar">
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>toolBar</string>
|
|
||||||
</property>
|
|
||||||
<property name="toolButtonStyle">
|
|
||||||
<enum>Qt::ToolButtonTextOnly</enum>
|
|
||||||
</property>
|
|
||||||
<attribute name="toolBarArea">
|
|
||||||
<enum>TopToolBarArea</enum>
|
|
||||||
</attribute>
|
|
||||||
<attribute name="toolBarBreak">
|
|
||||||
<bool>false</bool>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<resources/>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>radioDumpCustom</sender>
|
|
||||||
<signal>toggled(bool)</signal>
|
|
||||||
<receiver>lineDumpCustom</receiver>
|
|
||||||
<slot>setEnabled(bool)</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>439</x>
|
|
||||||
<y>91</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>480</x>
|
|
||||||
<y>90</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>radioDumpCustom</sender>
|
|
||||||
<signal>clicked()</signal>
|
|
||||||
<receiver>lineDumpCustom</receiver>
|
|
||||||
<slot>setFocus()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>456</x>
|
|
||||||
<y>87</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>480</x>
|
|
||||||
<y>86</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
<slots>
|
|
||||||
<slot>configChanged()</slot>
|
|
||||||
<slot>updateMap()</slot>
|
|
||||||
</slots>
|
|
||||||
</ui>
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
project(piqt_tools)
|
project(piqt_utils)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
if (NOT ${LIBPROJECT})
|
if (NOT ${LIBPROJECT})
|
||||||
find_package(PIP REQUIRED)
|
find_package(PIP REQUIRED)
|
||||||
@@ -56,6 +56,8 @@ if (DEFINED LIB)
|
|||||||
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
set(CMAKE_INSTALL_PREFIX ${MINGW_DIR})
|
||||||
install(FILES ${HDRS_UTILS} DESTINATION ${MINGW_INCLUDE})
|
install(FILES ${HDRS_UTILS} DESTINATION ${MINGW_INCLUDE})
|
||||||
install(TARGETS piqt_utils DESTINATION ${MINGW_LIB})
|
install(TARGETS piqt_utils DESTINATION ${MINGW_LIB})
|
||||||
|
get_filename_component(QTDIR ${QT_QMAKE_EXECUTABLE} PATH)
|
||||||
|
install(TARGETS piqt_utils DESTINATION ${QTDIR})
|
||||||
else ()
|
else ()
|
||||||
set(CMAKE_INSTALL_PREFIX /usr)
|
set(CMAKE_INSTALL_PREFIX /usr)
|
||||||
install(FILES ${HDRS_UTILS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
|
install(FILES ${HDRS_UTILS} DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
|
||||||
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 158 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 626 B After Width: | Height: | Size: 626 B |
|
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 588 B |
|
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 433 B |
|
Before Width: | Height: | Size: 525 B After Width: | Height: | Size: 525 B |
|
Before Width: | Height: | Size: 484 B After Width: | Height: | Size: 484 B |
|
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 235 B |
|
Before Width: | Height: | Size: 259 B After Width: | Height: | Size: 259 B |
|
Before Width: | Height: | Size: 326 B After Width: | Height: | Size: 326 B |
|
Before Width: | Height: | Size: 419 B After Width: | Height: | Size: 419 B |
|
Before Width: | Height: | Size: 654 B After Width: | Height: | Size: 654 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 722 B After Width: | Height: | Size: 722 B |
|
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 449 B |
|
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
|
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 641 B |
|
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 540 B |
|
Before Width: | Height: | Size: 726 B After Width: | Height: | Size: 726 B |
|
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 676 B |
|
Before Width: | Height: | Size: 731 B After Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 543 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 813 B After Width: | Height: | Size: 813 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 539 B After Width: | Height: | Size: 539 B |