git-svn-id: svn://db.shs.com.ru/libs@352 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2018-01-30 09:37:58 +00:00
parent eada1571ad
commit 92529d243e
54 changed files with 211 additions and 2377 deletions

View File

@@ -173,14 +173,19 @@ void CDUtils::CDCore::dataReceived(const PIString & from, const PIByteArray & da
else {
CDPacketType pt = (CDPacketType)sig;
switch(pt) {
case CD_Ping:
case CD_Ping: {
//piCoutObj << "ping";
break;
} break;
case CD_KDirectChange: {
PIByteArray ba = data;
PacketKDirectChange p;
ba >> p;
k_[p.path].setValue(p.value);
} break;
default: break;
}
}
}
}
}
@@ -232,6 +237,18 @@ void CDCore::K_Request() {
}
void CDUtils::CDCore::K_DirectChange(PIDeque<int> path, PIString value) {
PacketKDirectChange p;
p.header.session_id = 0;
p.header.type = CD_KDirectChange;
p.path = path;
p.value = value;
PIByteArray ba;
ba << p;
connection.writeByName("cd", ba);
}
void CDCore::sendThread() {
bool ok = datatr.send(send_data);
CDPacketType pt = (CDPacketType)wheader.type;

View File

@@ -37,6 +37,7 @@ public:
EVENT(K_ChangedGlobal)
EVENT_HANDLER(void, K_Send);
EVENT_HANDLER(void, K_Request);
EVENT_HANDLER2(void, K_DirectChange, PIDeque<int>, path, PIString, value);
void k_write(PIIODevice * d);
void k_read(PIIODevice * d);

View File

@@ -5,7 +5,7 @@
namespace CDUtils {
enum CDPacketType {CD_Ping, CD_Pong, CD_KQuery, CD_KSend, CD_Command, CD_XData, CD_XQuery};
enum CDPacketType {CD_Ping, CD_Pong, CD_KQuery, CD_KSend, CD_KDirectChange, CD_XData, CD_XQuery, CD_Command};
# pragma pack(push,1)
@@ -14,12 +14,21 @@ enum CDPacketType {CD_Ping, CD_Pong, CD_KQuery, CD_KSend, CD_Command, CD_XData,
int session_id;
};
struct PacketKDirectChange {
PacketHeader header;
PIDeque<int> path;
PIString value;
};
# pragma pack(pop)
inline PIByteArray & operator <<(PIByteArray & s, const PacketHeader & v) {s << v.type << v.session_id; return s;}
inline PIByteArray & operator >>(PIByteArray & s, PacketHeader & v) {s >> v.type >> v.session_id; return s;}
inline PIByteArray & operator <<(PIByteArray & s, const PacketKDirectChange & v) {s << v.header << v.path << v.value; return s;}
inline PIByteArray & operator >>(PIByteArray & s, PacketKDirectChange & v) {s >> v.header >> v.path >> v.value; return s;}
}
#endif // CDUTILS_PROTOCOL_H

View File

@@ -1,32 +1,29 @@
<RCC>
<qresource prefix="/">
<file>lang/qad_application_ru.ts</file>
<file>../icons/application-exit.png</file>
<file>../icons/dialog-close.png</file>
<file>../icons/edit-clear.png</file>
<file>../icons/edit-guides.png</file>
<file>../icons/view-grid.png</file>
<file>../icons/zoom-fit-best.png</file>
<file>../icons/edit-copy.png</file>
<file>../icons/edit-delete.png</file>
<file>../icons/configure.png</file>
<file>../icons/document-edit.png</file>
<file>../icons/document-new.png</file>
<file>../icons/document-save.png</file>
<file>../icons/document-save-all.png</file>
<file>../icons/document-save-as.png</file>
<file>../icons/document-open.png</file>
<file>../icons/document-close.png</file>
<file>../icons/edit-clear-locationbar-rtl.png</file>
<file>../icons/edit-find.png</file>
<file>../icons/list-add.png</file>
<file>../icons/edit-delete.png</file>
<file>../icons/item.png</file>
<file>../icons/node-add.png</file>
<file>../icons/node.png</file>
<file>../icons/edit-copy.png</file>
<file>../icons/edit-paste.png</file>
<file>../icons/expand_s_x.png</file>
<file>../icons/expand_s_y.png</file>
<file>../icons/expand_x.png</file>
<file>../icons/expand_y.png</file>
<file>../icons/edit-undo.png</file>
<file>../icons/edit-redo.png</file>
<file>../icons/border-line.png</file>
<file>../icons/legend.png</file>
<file>../icons/graphic.png</file>
<file>../icons/edockwidget.png</file>
<file>../icons/layer-visible-off.png</file>
<file>../icons/layer-visible-on.png</file>
<file>../icons/historyview.png</file>
<file>../icons/clear-history.png</file>
</qresource>

View File

@@ -1,494 +0,0 @@
#include <QScrollBar>
#include <QMessageBox>
#include <math.h>
#include "cd_pult.h"
#include "ui_cd_pult.h"
#include "piqt.h"
#include "pifile.h"
#include "qpiconfig.h"
using namespace CDUtils;
CD_Pult::CD_Pult(): QMainWindow(), config_("cd_pult.conf"),
config(piqt(config_), QIODevice::ReadWrite) {
//cout << sizeof(coeffsK.k_protocol->to_k) << endl;
ui = new Ui::CD_Pult();
ui->setupUi(this);
ui->configWidget->setQPIConfig(&config);
ui->configWidget->expandAll();
ui->list->viewport()->installEventFilter(this);
ui->treeCDK->viewport()->installEventFilter(this);
ui->scrollArea->setAutoFillBackground(false);
ui->scrollAreaWidgetContents->setAutoFillBackground(false);
ui->widget->setAutoFillBackground(false);
log_menu.addAction(ui->actionClear);
show_x = config.getValue("show_x", true);
if (!show_x)
ui->tabWidget->removeTab(1);
session.setFile("session_cd_pult.conf");
session.addEntry(this);
session.addEntry(ui->tabWidget);
session.addEntry(ui->checkKHideNormal);
session.addEntry(ui->checkKHideExpressions);
session.addEntry(ui->checkKAutoCalculate);
session.addEntry(ui->spinHistory);
session.addEntry(ui->spinBuffer);
needWrite = isPause = false;
timer = 0;
//x.resize(KX_X_PACKET_NUM);
//k.resize(K_NUM);
QPalette pal = palette();
QColor col;
ui->graphic->setGraphicsCount(0);
//renew();
/*ui->treeK->setColumnWidth(0, 60);
ui->treeK->setColumnWidth(1, 250);
ui->treeK->setColumnWidth(3, 100);
ui->treeK->setColumnWidth(4, 100);*/
//ui->table->setK(coeffsK.k()->data(), coeffsK.count());
//addToList(trUtf8("Read K file \"%1\": %2 coeffs, %3 bytes").arg(PI2QString(coeffs.fileName())).arg(K.size_s()).arg(coeffs.k_content.size_s()), Qt::darkMagenta);
/*CONNECT(void, &coeffs, sendFailed, this, pip_sendFailed);
CONNECT(void, &coeffs, sendSucceed, this, pip_sendSucceed);
CONNECT(void, &coeffs, receiveFailed, this, pip_receiveFailed);
CONNECT(void, &coeffs, receiveSucceed, this, pip_receiveSucceed);*/
CONNECTU(&K, sended, this, pip_sendSucceed);
CONNECTU(&K, sendFailed, this, pip_sendFailed);
CONNECTU(&K, received, this, pip_receiveSucceed);
CONNECTU(&K, receiveFailed, this, pip_receiveFailed);
connect(this, SIGNAL(q_k_sendFailed()), this, SLOT(k_sendFailed()), Qt::QueuedConnection);
connect(this, SIGNAL(q_k_sendSucceed()), this, SLOT(k_sendSucceed()), Qt::QueuedConnection);
connect(this, SIGNAL(q_k_receiveFailed()), this, SLOT(k_receiveFailed()), Qt::QueuedConnection);
connect(this, SIGNAL(q_k_receiveSucceed()), this, SLOT(k_receiveSucceed()), Qt::QueuedConnection);
connect(&timer_diag, SIGNAL(timeout()), this, SLOT(updateDiag()));
connect(&session, SIGNAL(loading(QPIConfig&)), this, SLOT(loading(QPIConfig&)));
connect(&session, SIGNAL(saving(QPIConfig&)), this, SLOT(saving(QPIConfig&)));
connect(ui->checkKHideNormal, SIGNAL(toggled(bool)), this, SLOT(filterTree()));
connect(ui->checkKHideExpressions, SIGNAL(toggled(bool)), this, SLOT(filterTree()));
connect(ui->lineKSearch, SIGNAL(textChanged(QString)), this, SLOT(filterTree()));
session.load();
on_spinBuffer_editingFinished();
K.reinitConnection(K.pultConfig());
K.configure(config_);
K.readFile();
updateKDesc();
updateCDesc();
timer_diag.start(40);
}
CD_Pult::~CD_Pult() {
session.save();
}
void CD_Pult::loading(QPIConfig & conf) {
kdesc_file = Q2PIString(conf.getValue("kdesc_file").stringValue());
cdesc_file = Q2PIString(conf.getValue("cdesc_file").stringValue());
}
void CD_Pult::saving(QPIConfig & conf) {
conf.setValue("kdesc_file", PI2QString(kdesc_file));
conf.setValue("cdesc_file", PI2QString(cdesc_file));
}
bool CD_Pult::eventFilter(QObject * o, QEvent * e) {
if (o == ui->list->viewport()) {
if (e->type() == QEvent::ContextMenu) {
clear_target = 0;
log_menu.popup(((QContextMenuEvent*)e)->globalPos());
}
return QMainWindow::eventFilter(o, e);
}
if (o == ui->treeCDK->viewport()) {
if (e->type() == QEvent::ContextMenu) {
clear_target = 1;
log_menu.popup(((QContextMenuEvent*)e)->globalPos());
}
return QMainWindow::eventFilter(o, e);
}
//int ind = o->property("index").toInt();
//qDebug() << "event" << i << e->type();
switch (e->type()) {
case QEvent::Enter:
ui->graphic->setAutoUpdate(false);
//for (int i = 0; i < KX_X_PACKET_NUM; ++i)
// ui->graphic->setGraphicLineWidth(ind == i ? 3. : 1., i);
ui->graphic->setAutoUpdate(true);
ui->graphic->update();
break;
case QEvent::Leave:
ui->graphic->setAutoUpdate(false);
//for (int i = 0; i < KX_X_PACKET_NUM; ++i)
// ui->graphic->setGraphicLineWidth(1., i);
ui->graphic->setAutoUpdate(true);
ui->graphic->update();
break;
default: break;
}
return QMainWindow::eventFilter(o, e);
}
void CD_Pult::timerEvent(QTimerEvent * e) {
/*if (e->timerId() == timer_update) {
if (need_update) {
need_update = false;
ui->graphic->updateGraphics();
}
}*/
if (e->timerId() == timer) {
static QString sPI = QString::number(atan(1) * 4., 'f', 14).leftJustified(14);
static int cnt = 0;
int si = qMax<int>(cnt - 6, 0);
++cnt;
cnt %= 23;
ui->labelWait->setText(QString(si, QChar(' ')) + sPI.mid(cnt - 6, 6).trimmed());
//if (!coeffs.isReady()) return;
//ui->table->setK(coeffsK.k()->data(), coeffsK.count());
//ui->table->showK();
}
}
void CD_Pult::addToList(const QString & s, const QColor & c) {
ui->list->addItem(QDateTime::currentDateTime().toString("dd/MM/yyyy hh:ss - ") + s);
ui->list->item(ui->list->count() - 1)->setTextColor(c);
ui->list->scrollToBottom();
}
void CD_Pult::on_actionClear_triggered() {
switch (clear_target) {
case 0:
ui->list->clear();
break;
case 1:
clearSelected();
break;
default: break;
}
}
void CD_Pult::clearSelected() {
/*QList<QTreeWidgetItem * > si = ui->treeK->selectedItems();
ui->treeK->setUpdatesEnabled(false);
ui->treeK->blockSignals(true);
foreach (QTreeWidgetItem * i, si) {
// int ki = i->text(0).toInt();
i->setText(2, "");
//coeffs.setFormula(ki, "");
}
ui->treeK->blockSignals(false);
ui->treeK->setUpdatesEnabled(true);
if (ui->checkKAutoCalculate->isChecked()) {
QApplication::processEvents();
//calculate();
}*/
}
QString CD_Pult::typeName(const QString & n) const {
if (n.isEmpty()) return "";
switch (n[0].toLatin1()) {
case 'l': return trUtf8("list"); break;
case 'b': return trUtf8("bool"); break;
case 'n': return trUtf8("int"); break;
case 'f': return trUtf8("double"); break;
case 'c': return trUtf8("color"); break;
case 'r': return trUtf8("rect"); break;
case 'a': return trUtf8("rect"); break;
case 'p': return trUtf8("point"); break;
case 'v': return trUtf8("vector"); break;
case 'i': return trUtf8("IP"); break;
case 'e': return trUtf8("enum"); break;
case 'F': return trUtf8("file"); break;
case 'D': return trUtf8("dir"); break;
}
return trUtf8("double");
}
void CD_Pult::makeTreeSection(CDSection & ks, QTreeWidgetItem * pi) {
PIMap<int, CDType>::iterator ki;
for (ki = ks.k.begin(); ki != ks.k.end(); ++ki) {
QTreeWidgetItem * ti = new QTreeWidgetItem(pi);
const CDType & ck(ki.value());
ti->setText(0, QString::number(ck.index()));
ti->setText(1, PI2QString(ck.name()));
ti->setText(2, typeName(PI2QString(ck.type())));
ti->setText(3, PI2QString(ck.formula()));
ti->setText(5, PI2QString(ck.comment()));
}
PIMap<int, CDSection>::iterator si;
for (si = ks.s.begin(); si != ks.s.end(); ++si) {
QTreeWidgetItem * ti = new QTreeWidgetItem(pi);
CDSection & cs(si.value());
ti->setText(0, QString("[%1]").arg(si.key()));
ti->setText(1, PI2QString(cs.alias));
ti->setText(2, PI2QString(cs.name));
makeTreeSection(cs, ti);
}
}
void CD_Pult::on_treeK_itemClicked(QTreeWidgetItem * item, int column) {
Qt::ItemFlags f = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
if (column == 2) f |= Qt::ItemIsEditable;
item->setFlags(f);
}
void CD_Pult::on_treeK_itemChanged(QTreeWidgetItem * item, int column) {
if (column != 2) return;
// int ki = item->text(0).toInt();
//coeffs.setFormula(ki, piqt(item->text(column)));
if (ui->checkKAutoCalculate->isChecked())
;//calculate();
}
void CD_Pult::on_buttonSendK_clicked() {
// on_buttonWrite_clicked();
K.send();
//coeffs.sendCoeffs();
if (timer != 0) killTimer(timer);
timer = startTimer(100);
}
void CD_Pult::on_buttonReceiveK_clicked() {
K.request();
// K.se
//coeffs.receiveCoeffs();
if (timer != 0) killTimer(timer);
timer = startTimer(100);
}
void CD_Pult::on_buttonShowAll_clicked() {
/*for (int i = 0; i < KX_X_PACKET_NUM; ++i) {
checks[i]->check.setChecked(true);
//ui->graphic->setGraphicVisible(true, i);
}*/
}
void CD_Pult::on_buttonHideAll_clicked() {
/*for (int i = 0; i < KX_X_PACKET_NUM; ++i) {
checks[i]->check.setChecked(false);
//ui->graphic->setGraphicVisible(false, i);
}*/
}
void CD_Pult::on_buttonRead_clicked() {
K.readFile();
addToList(trUtf8("Read K file \"%1\": %2 coeffs, %3 bytes").arg(PI2QString(K.file())).arg(K.count()).arg(K.fileSize()), Qt::darkMagenta);
updateTree();
}
void CD_Pult::on_buttonWrite_clicked() {
K.writeFile();
addToList(trUtf8("Write K file \"%1\": %2 coeffs, %3 bytes").arg(PI2QString(K.file())).arg(K.count()).arg(K.fileSize()), Qt::darkMagenta);
}
void CD_Pult::on_buttonSetKDesc_clicked() {
QString ret = QFileDialog::getOpenFileName(this, trUtf8("Select *.h file with K description"), PI2QString(kdesc_file), "C/C++ header files(*.h *.hpp);;All files(*)");
if (ret.isEmpty()) return;
kdesc_file = Q2PIString(QDir::current().relativeFilePath(ret));
PIFile f(kdesc_file, PIIODevice::ReadOnly);
piCout << "open description:" << Q2PIString(ret);
//K.update(&f);
updateKDesc(true);
}
void CD_Pult::on_buttonSetCDesc_clicked() {
QString ret = QFileDialog::getOpenFileName(this, trUtf8("Select *.h file with C description"), PI2QString(cdesc_file), "C/C++ header files(*.h *.hpp);;All files(*)");
if (ret.isEmpty()) return;
cdesc_file = Q2PIString(QDir::current().relativeFilePath(ret));
updateCDesc();
}
void CD_Pult::k_sendFailed() {
addToList(trUtf8("K not sended"), Qt::darkRed);
if (timer != 0) killTimer(timer);
}
void CD_Pult::k_sendSucceed() {
addToList(trUtf8("K sended"), Qt::darkGreen);;
if (timer != 0) killTimer(timer);
}
void CD_Pult::k_receiveFailed() {
addToList(trUtf8("K not received"), Qt::darkRed);
if (timer != 0) killTimer(timer);
}
void CD_Pult::k_receiveSucceed() {
addToList(trUtf8("K received"), Qt::darkGreen);
if (timer != 0) killTimer(timer);
updateTree();
}
void CD_Pult::on_spinBuffer_editingFinished() {
ui->graphic->setHistorySize(ui->spinBuffer->value());
}
void CD_Pult::updateGraph() {
ui->graphic->updateGraphics();
}
void CD_Pult::updateDiag() {
/*ui->labelKReceiver->setText(piqt(coeffs.k_protocol->receiverDeviceName() + " - " + coeffs.k_protocol->receiverDeviceState()));
ui->labelKSender->setText(piqt(coeffs.k_protocol->senderDeviceName()));
ui->spinKSended->setValue(coeffs.k_protocol->sendCount());
ui->spinKReceived->setValue(coeffs.k_protocol->receiveCount());
ui->spinKWrong->setValue(coeffs.k_protocol->wrongCount());
ui->spinKMissed->setValue(coeffs.k_protocol->missedCount());
ui->labelKType->setText("0x" + QString::number(coeffs.k_protocol->from_k.type, 16).toUpper().rightJustified(2, '0'));
ui->labelKAddrPult->setText("0x" + QString::number(coeffs.k_protocol->from_k.addr_to, 16).toUpper().rightJustified(2, '0'));
ui->labelKAddr->setText("0x" + QString::number(coeffs.k_protocol->to_k.addr_to, 16).toUpper().rightJustified(2, '0'));
ui->labelXReceiver->setText(piqt(prot_x->receiverDeviceName() + " - " + prot_x->receiverDeviceState()));
ui->labelXSender->setText(piqt(prot_x->senderDeviceName()));
ui->spinXSended->setValue(prot_x->sendCount());
ui->spinXReceived->setValue(prot_x->receiveCount());
ui->spinXWrong->setValue(prot_x->wrongCount());
ui->spinXMissed->setValue(prot_x->missedCount());
ui->labelXType->setText("0x" + QString::number(prot_x->from_x.type, 16).toUpper().rightJustified(2, '0'));
ui->labelXAddrPult->setText("0x" + QString::number(prot_x->from_x.addr_to, 16).toUpper().rightJustified(2, '0'));
ui->labelXAddr->setText("0x" + QString::number(prot_x->to_x.addr_to, 16).toUpper().rightJustified(2, '0'));
ui->labelCReceiver->setText(piqt(prot_c->receiverDeviceName() + " - " + prot_c->receiverDeviceState()));
ui->labelCSender->setText(piqt(prot_c->senderDeviceName()));
ui->spinCSended->setValue(prot_c->sendCount());
ui->spinCReceived->setValue(prot_c->receiveCount());
ui->spinCWrong->setValue(prot_c->wrongCount());
ui->spinCMissed->setValue(prot_c->missedCount());
ui->labelCType->setText("0x" + QString::number(prot_c->from_c.type, 16).toUpper().rightJustified(2, '0'));
ui->labelCAddrPult->setText("0x" + QString::number(prot_c->from_c.addr_to, 16).toUpper().rightJustified(2, '0'));
ui->labelCAddr->setText("0x" + QString::number(prot_c->to_c.addr_to, 16).toUpper().rightJustified(2, '0'));
*/
}
void CD_Pult::updateKDesc(bool ask_move) {
addToList(trUtf8("Update K description file \"%1\"").arg(PI2QString(kdesc_file)), Qt::darkMagenta);
PIFile f(kdesc_file, PIIODevice::ReadOnly);
//piCout << "call K.update():";
K.root() = CDSection();
K.update(&f);
updateTree(ask_move);
}
void CD_Pult::updateCDesc() {
//parseHeader(cdesc_file, cdesc);
updateCommands();
}
bool stringComp(const QString & s1, const QString & s2) {
if (s1.size() != s2.size())
return s1.size() > s2.size();
return s1 > s2;
}
void CD_Pult::updateTree(bool move) {
}
void CD_Pult::updateCommands() {
while (ui->layoutCommands->count() > 0)
delete ui->layoutCommands->itemAt(0)->widget();
/*QMapIterator<int, KDesc> it(cdesc);
while (it.hasNext()) {
it.next();
KDesc kd = it.value();
QPushButton * b = new QPushButton();
QString text = kd.name;
if (!kd.comment.isEmpty())
text += QString("\n(%1)").arg(kd.comment);
b->setText(text);
b->setProperty("_command", kd.index);
connect(b, SIGNAL(clicked()), this, SLOT(commandClicked()));
ui->layoutCommands->addWidget(b);
}*/
}
void CD_Pult::filterTree() {
/*bool hn = ui->checkKHideNormal->isChecked();
bool hs = ui->checkKHideExpressions->isChecked();
bool ok = false;
QString fl = ui->lineKSearch->text();
int lc = ui->treeK->topLevelItemCount();
for (int i = 0; i < lc; ++i) {
QTreeWidgetItem * ti = ui->treeK->topLevelItem(i);
if (fl.isEmpty())
ti->setHidden(false);
else
ti->setHidden(!ti->text(0).contains(fl, Qt::CaseInsensitive) &&
!ti->text(1).contains(fl, Qt::CaseInsensitive) &&
!ti->text(2).contains(fl, Qt::CaseInsensitive) &&
!ti->text(3).contains(fl, Qt::CaseInsensitive) &&
!ti->text(4).contains(fl, Qt::CaseInsensitive));
if (hn)
if (ti->data(0, Qt::UserRole).toBool())
ti->setHidden(true);
if (hs) {
ti->data(2, Qt::DisplayRole).toDouble(&ok);
if (!ok)
ti->setHidden(true);
}
}*/
}
void CD_Pult::markError(QTreeWidgetItem * item, const QString & tool_tip) {
int cc = item->columnCount();
for (int i = 0; i < cc; ++i)
item->setBackgroundColor(i, QColor(255, 200, 200));
if (item->toolTip(2).isEmpty())
item->setToolTip(2, tool_tip);
if (item->toolTip(3).isEmpty())
item->setToolTip(3, tool_tip);
item->setData(0, Qt::UserRole, false);
item->setText(3, "Error");
}
void CD_Pult::markNormal(QTreeWidgetItem * item) {
int cc = item->columnCount();
for (int i = 0; i < cc; ++i)
item->setBackground(i, Qt::NoBrush);
item->setToolTip(2, QString());
item->setToolTip(3, QString());
item->setData(0, Qt::UserRole, true);
}
void CD_Pult::progress(int val, int max) {
}
void CD_Pult::commandClicked() {
QPushButton * b = qobject_cast<QPushButton*>(sender());
if (!b) return;
//prot_c->sendCommand(b->property("_command").toInt());
}

View File

@@ -1,116 +0,0 @@
#ifndef CD_PULT_H
#define CD_PULT_H
#include <QDialog>
#include <QSpinBox>
#include <QFont>
#include <QRect>
#include <QFile>
#include <QVector>
#include <QDir>
#include <QTextStream>
#include <QDebug>
#include <QBoxLayout>
#include <QCheckBox>
#include <QMainWindow>
#include <QTimer>
#include <QTime>
#include <QMenu>
#include <QMetaObject>
#include <QTreeWidgetItem>
#include <QLabel>
#include "piqt.h"
#include "session_manager.h"
#include "qpievaluator.h"
#include "cdutils_core.h"
#include "cdutils_k.h"
#include "qcd_kmodel.h"
namespace Ui {
class CD_Pult;
}
class CD_Pult: public QMainWindow, public PIObject
{
Q_OBJECT
PIOBJECT(CD_Pult)
public:
CD_Pult();
~CD_Pult();
private:
bool eventFilter(QObject * o, QEvent * e);
void timerEvent(QTimerEvent * );
void addToList(const QString & s, const QColor & c);
QColor invertColor(QColor col) {return QColor(255 - col.red(), 255 - col.green(), 255 - col.blue());}
void stopWait();
bool calculateExpression(int i, QVector<int> trace);
void markError(QTreeWidgetItem * item, const QString & tool_tip = QString());
void markNormal(QTreeWidgetItem * item);
void progress(int val, int max);
void clearSelected();
QString typeName(const QString & n) const;
void makeTreeSection(CDUtils::CDSection & ks, QTreeWidgetItem * pi);
EVENT_HANDLER(void, pip_sendFailed) {emit q_k_sendFailed();}
EVENT_HANDLER(void, pip_sendSucceed) {emit q_k_sendSucceed();}
EVENT_HANDLER(void, pip_receiveFailed) {emit q_k_receiveFailed();}
EVENT_HANDLER(void, pip_receiveSucceed) {emit q_k_receiveSucceed();}
Ui::CD_Pult * ui;
PIString config_, name_x, name_c;
PIString kdesc_file, cdesc_file, xdesc_file;
QMenu log_menu;
QTimer timer_diag;
SessionManager session;
QPIConfig config;
//QVector<float> k, x;
int clear_target, timer;
bool needWrite, isPause, need_update, show_x;
private slots:
void loading(QPIConfig & conf);
void saving(QPIConfig & conf);
void updateGraph();
void updateDiag();
void updateKDesc(bool ask_move = false);
void updateCDesc();
void updateTree(bool move = false);
void updateCommands();
void filterTree();
//void calculate();
//void renew(bool write = true);
void commandClicked();
void k_sendFailed();
void k_sendSucceed();
void k_receiveFailed();
void k_receiveSucceed();
void on_spinBuffer_editingFinished();
void on_buttonSendK_clicked();
void on_buttonReceiveK_clicked();
void on_buttonShowAll_clicked();
void on_buttonHideAll_clicked();
void on_buttonRead_clicked();
void on_buttonWrite_clicked();
void on_buttonSetKDesc_clicked();
void on_buttonReparseKDesc_clicked() {updateKDesc(true);}
void on_buttonSetCDesc_clicked();
void on_buttonReparseCDesc_clicked() {updateCDesc();}
//void on_buttonCalculate_clicked() {calculate();}
//void on_buttonApply_clicked() {renew();}
void on_buttonPause_toggled(bool on) {isPause = on;}
void on_treeK_itemClicked(QTreeWidgetItem * item, int column);
void on_treeK_itemChanged(QTreeWidgetItem * item, int column);
void on_actionClear_triggered();
signals:
void q_k_sendFailed();
void q_k_sendSucceed();
void q_k_receiveFailed();
void q_k_receiveSucceed();
};
#endif // CD_PULT_H

View File

@@ -1,40 +0,0 @@
<RCC>
<qresource prefix="/">
<file>icons/dialog-close.png</file>
<file>icons/edit-clear-.png</file>
<file>icons/edit-guides.png</file>
<file>icons/view-grid.png</file>
<file>icons/zoom-fit-best.png</file>
<file>icons/configure.png</file>
<file>icons/alpha.png</file>
<file>icons/document-save.png</file>
<file>icons/edit-clear-locationbar-rtl.png</file>
<file>icons/edit-find.png</file>
<file>icons/list-add.png</file>
<file>icons/edit-delete.png</file>
<file>icons/item-add.png</file>
<file>icons/item.png</file>
<file>icons/node-add.png</file>
<file>icons/node.png</file>
<file>icons/edit-copy.png</file>
<file>icons/edit-paste.png</file>
<file>icons/expand_s_x.png</file>
<file>icons/expand_s_y.png</file>
<file>icons/expand_x.png</file>
<file>icons/expand_y.png</file>
<file>icons/media-playback-pause.png</file>
<file>icons/media-playback-stop.png</file>
<file>icons/media-record.png</file>
<file>icons/application-exit.png</file>
<file>icons/document-save-.png</file>
<file>icons/view-refresh.png</file>
<file>icons/document-open.png</file>
<file>icons/archive-extract.png</file>
<file>icons/document-export.png</file>
<file>icons/document-import.png</file>
<file>icons/zoom-fit-height.png</file>
<file>icons/layer-visible-off.png</file>
<file>icons/layer-visible-on.png</file>
<file>icons/accessories-calculator.png</file>
</qresource>
</RCC>

View File

@@ -1,1238 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CD_Pult</class>
<widget class="QMainWindow" name="CD_Pult">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1035</width>
<height>728</height>
</rect>
</property>
<property name="windowTitle">
<string>CD Pult</string>
</property>
<widget class="QWidget" name="page_2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Coefficients (K)</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="1">
<widget class="QPushButton" name="buttonReparseKDesc">
<property name="text">
<string>Update</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/view-refresh.png</normaloff>:/icons/view-refresh.png</iconset>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="buttonRead">
<property name="text">
<string>Read</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/archive-extract.png</normaloff>:/icons/archive-extract.png</iconset>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="buttonSendK">
<property name="text">
<string>Send</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/document-export.png</normaloff>:/icons/document-export.png</iconset>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="5">
<widget class="QListWidget" name="list">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy">
<enum>Qt::CustomContextMenu</enum>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
<property name="horizontalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="buttonReceiveK">
<property name="text">
<string>Receive</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/document-import.png</normaloff>:/icons/document-import.png</iconset>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="QLabel" name="labelWait">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="buttonWrite">
<property name="text">
<string>Write</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/document-save-.png</normaloff>:/icons/document-save-.png</iconset>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="buttonSetKDesc">
<property name="text">
<string>Make ...</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QCheckBox" name="checkKHideExpressions">
<property name="text">
<string>Hide expressions</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_9">
<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="QCheckBox" name="checkKHideNormal">
<property name="text">
<string>Show only errors</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<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="QLabel" name="label_17">
<property name="pixmap">
<pixmap resource="cd_pult.qrc">:/icons/edit-find.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_16">
<property name="text">
<string> Search:</string>
</property>
</widget>
</item>
<item>
<widget class="CLineEdit" name="lineKSearch">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkKAutoCalculate">
<property name="text">
<string>Auto calculate</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<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="QToolButton" name="buttonCalculate">
<property name="toolTip">
<string>Calculate</string>
</property>
<property name="statusTip">
<string>Calculate</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/accessories-calculator.png</normaloff>:/icons/accessories-calculator.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="progress">
<property name="value">
<number>100</number>
</property>
<property name="format">
<string>Calculate %p%</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="CDKView" name="treeCDK">
<property name="editTriggers">
<set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
<property name="horizontalScrollMode">
<enum>QAbstractItemView::ScrollPerPixel</enum>
</property>
<attribute name="headerMinimumSectionSize">
<number>20</number>
</attribute>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Commands (C)</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QPushButton" name="buttonSetCDesc">
<property name="text">
<string>Set C desc file ...</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonReparseCDesc">
<property name="text">
<string>Reparse C desc</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/view-refresh.png</normaloff>:/icons/view-refresh.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QGroupBox" name="groupCommands">
<property name="title">
<string>Commands</string>
</property>
<layout class="QVBoxLayout" name="layout_">
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>819</width>
<height>613</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QVBoxLayout" name="layoutCommands"/>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>66</width>
<height>441</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Graphics (X)</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QWidget" name="widgetChecks" native="true">
<layout class="QGridLayout" name="gridLayout_2">
<property name="horizontalSpacing">
<number>10</number>
</property>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="buttonShowAll">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Show all</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/layer-visible-on.png</normaloff>:/icons/layer-visible-on.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonHideAll">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Hide all</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/layer-visible-off.png</normaloff>:/icons/layer-visible-off.png</iconset>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="buttonRecord">
<property name="text">
<string>Start record</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/media-record.png</normaloff>:/icons/media-record.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="buttonPause">
<property name="text">
<string>Pause</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/media-playback-pause.png</normaloff>:/icons/media-playback-pause.png</iconset>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Show</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="spinHistory">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string> с</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>9999.000000000000000</double>
</property>
<property name="value">
<double>10.000000000000000</double>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="spinBuffer">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string> с</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>0.100000000000000</double>
</property>
<property name="maximum">
<double>9999.000000000000000</double>
</property>
<property name="value">
<double>60.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Graphic" name="graphic">
<property name="buttons">
<set>Graphic::Autofit|Graphic::BorderInputs|Graphic::Clear|Graphic::Configure|Graphic::CursorAxis|Graphic::Grid|Graphic::OnlyExpandX|Graphic::OnlyExpandY|Graphic::Save</set>
</property>
<property name="borderInputsVisible">
<bool>false</bool>
</property>
<property name="legendVisible">
<bool>false</bool>
</property>
<property name="historySize">
<double>60.000000000000000</double>
</property>
<property name="maxVisibleTime">
<double>10.000000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Configuration</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>K</string>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="formAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>receiver:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="labelKReceiver">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>sender:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelKSender">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>sended count:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="spinKSended">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>received count:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinKReceived">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>wrong received count:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QSpinBox" name="spinKWrong">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_13">
<property name="text">
<string>type:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="labelKType">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelKType_2">
<property name="text">
<string>address K:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelKAddr">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="labelKAddrPult">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>missed received count:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="spinKMissed">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelKType_3">
<property name="text">
<string>address pult:</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>X</string>
</property>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="formAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>receiver:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="labelXReceiver">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>sender:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelXSender">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelKType_4">
<property name="text">
<string>type:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="labelXType">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelKType_5">
<property name="text">
<string>address X:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelKType_6">
<property name="text">
<string>address pult:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="labelXAddrPult">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
<string>sended count:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="spinXSended">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_12">
<property name="text">
<string>received count:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinXReceived">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string>wrong received count:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QSpinBox" name="spinXWrong">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelXAddr">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_15">
<property name="text">
<string>missed received count:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="spinXMissed">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>C</string>
</property>
<layout class="QFormLayout" name="formLayout_3">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="formAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_18">
<property name="text">
<string>receiver:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="labelCReceiver">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_19">
<property name="text">
<string>sender:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="labelCSender">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelKType_7">
<property name="text">
<string>type:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="labelCType">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="labelKType_8">
<property name="text">
<string>address C:</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelKType_9">
<property name="text">
<string>address pult:</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="labelCAddrPult">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_20">
<property name="text">
<string>sended count:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="spinCSended">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>received count:</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinCReceived">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_22">
<property name="text">
<string>wrong received count:</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QSpinBox" name="spinCWrong">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="labelCAddr">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QLabel" name="label_23">
<property name="text">
<string>missed received count:</string>
</property>
</widget>
</item>
<item row="8" column="1">
<widget class="QSpinBox" name="spinCMissed">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="minimum">
<number>0</number>
</property>
<property name="maximum">
<number>1999999999</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPIConfigWidget" name="configWidget">
<property name="readOnlyName">
<bool>true</bool>
</property>
<property name="readOnlyType">
<bool>true</bool>
</property>
<property name="readOnlyComment">
<bool>true</bool>
</property>
<property name="columnTypeVisible">
<bool>false</bool>
</property>
<attribute name="headerMinimumSectionSize">
<number>20</number>
</attribute>
</widget>
</item>
<item>
<widget class="QPushButton" name="buttonApply">
<property name="text">
<string>Apply</string>
</property>
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/document-save-.png</normaloff>:/icons/document-save-.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<action name="actionClear">
<property name="icon">
<iconset resource="cd_pult.qrc">
<normaloff>:/icons/edit-clear-.png</normaloff>:/icons/edit-clear-.png</iconset>
</property>
<property name="text">
<string>Clear</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>Graphic</class>
<extends>QFrame</extends>
<header>graphic.h</header>
</customwidget>
<customwidget>
<class>CLineEdit</class>
<extends>QLineEdit</extends>
<header>clineedit.h</header>
</customwidget>
<customwidget>
<class>QPIConfigWidget</class>
<extends>QTreeWidget</extends>
<header>qpiconfigwidget.h</header>
</customwidget>
<customwidget>
<class>CDKView</class>
<extends>QTreeView</extends>
<header location="global">qcd_kview.h</header>
<slots>
<signal>busyStatusChanged(bool)</signal>
<slot>sendK()</slot>
<slot>receiveK()</slot>
<slot>saveK()</slot>
<slot>loadK()</slot>
<slot>clear()</slot>
<slot>clearK()</slot>
<slot>refresh()</slot>
</slots>
</customwidget>
</customwidgets>
<resources>
<include location="cd_pult.qrc"/>
<include location="cd_pult.qrc"/>
</resources>
<connections>
<connection>
<sender>spinHistory</sender>
<signal>valueChanged(double)</signal>
<receiver>graphic</receiver>
<slot>setMaxVisibleTime(double)</slot>
<hints>
<hint type="sourcelabel">
<x>919</x>
<y>107</y>
</hint>
<hint type="destinationlabel">
<x>932</x>
<y>132</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@@ -0,0 +1,13 @@
#include "cdpultwindow.h"
#include "ui_cdpultwindow.h"
CDPultWindow::CDPultWindow(QWidget *parent) : EMainWindow(parent), ui(new Ui::CDPultWindow) {
ui->setupUi(this);
}
CDPultWindow::~CDPultWindow() {
delete ui;
}

View File

@@ -0,0 +1,33 @@
#ifndef CDPULTWINDOW_H
#define CDPULTWINDOW_H
#include "emainwindow.h"
namespace Ui {
class CDPultWindow;
}
class CDPultWindow : public EMainWindow
{
Q_OBJECT
public:
explicit CDPultWindow(QWidget *parent = 0);
~CDPultWindow();
private:
void closeEvent(QCloseEvent * );
void timerEvent(QTimerEvent *);
void reset(bool full = false);
bool load(const QString & path);
bool save(const QString & path);
void loadingSession(QPIConfig & conf);
void savingSession(QPIConfig & conf);
void addToErrorList(QString msg);
QString loadFilter() {return "CD file(*.dat)";}
QString saveFilter() {return "CD file(*.dat)";}
Ui::CDPultWindow *ui;
};
#endif // CDPULTWINDOW_H

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CDPultWindow</class>
<widget class="EMainWindow" name="CDPultWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menuMain">
<property name="title">
<string>Main</string>
</property>
<addaction name="actionOpen"/>
<addaction name="actionSave"/>
<addaction name="actionSaveAs"/>
<addaction name="separator"/>
<addaction name="actionSend_K"/>
<addaction name="actionReceive_K"/>
<addaction name="separator"/>
<addaction name="actionParse"/>
</widget>
<addaction name="menuMain"/>
</widget>
<action name="actionOpen">
<property name="icon">
<iconset resource="../../qad/application/qad_application.qrc">
<normaloff>:/icons/document-open.png</normaloff>:/icons/document-open.png</iconset>
</property>
<property name="text">
<string>Open</string>
</property>
<property name="shortcut">
<string>Ctrl+O</string>
</property>
</action>
<action name="actionSave">
<property name="icon">
<iconset resource="../../qad/application/qad_application.qrc">
<normaloff>:/icons/document-save.png</normaloff>:/icons/document-save.png</iconset>
</property>
<property name="text">
<string>Save</string>
</property>
<property name="shortcut">
<string>Ctrl+S</string>
</property>
</action>
<action name="actionSaveAs">
<property name="text">
<string>SaveAs...</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+S</string>
</property>
</action>
<action name="actionSend_K">
<property name="text">
<string>Send K</string>
</property>
<property name="shortcut">
<string>Ctrl+D</string>
</property>
</action>
<action name="actionReceive_K">
<property name="text">
<string>Receive_K</string>
</property>
<property name="shortcut">
<string>Ctrl+R</string>
</property>
</action>
<action name="actionParse">
<property name="text">
<string>Parse...</string>
</property>
<property name="shortcut">
<string>Ctrl+Shift+P</string>
</property>
</action>
<addaction name="actionOpen"/>
<addaction name="actionSave"/>
<addaction name="actionSaveAs"/>
<addaction name="actionSend_K"/>
<addaction name="actionReceive_K"/>
<addaction name="actionParse"/>
<addaction name="menuMain"/>
<addaction name="separator"/>
<addaction name="separator"/>
</widget>
<customwidgets>
<customwidget>
<class>EMainWindow</class>
<extends>QMainWindow</extends>
<header>emainwindow.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources>
<include location="../../qad/application/qad_application.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -1,186 +0,0 @@
#include "form.h"
#include "ui_form.h"
#include <QFileDialog>
#include <QDebug>
#include "cdutils_k.h"
#include "cdutils_core.h"
#include "qcd_core.h"
#include "qcd_kmodel.h"
#include "pifile.h"
#include "evalspinbox.h"
using namespace CDUtils;
PIStringList takeMembers(PIString &in) {
int slen = in.length();
int st = -1, bcnt = 0;
PIChar cc;
PIStringList ret;
int rst = -1;
for (int i = 0; i < slen; i++) {
cc = in.at(i);
if (cc == '{') {
if (bcnt == 0) st = i;
bcnt++;
}
if (cc == '}' && st >= 0) {
bcnt--;
if (bcnt == 0) {
in.remove(st, i-st);
return ret;
}
}
if (cc == ';' && bcnt == 1) {
if (rst < 0) rst = st;
ret << in.mid(rst+1, i-rst-1);
rst = i;
}
}
return ret;
}
void parseStruct(PIString &in, CDSection * root, const PIStringList &c_types, PIVector<CDSection> &sections, PIVector<CDType> &enums);
void parseEnum(PIString &in, CDSection * root, const PIStringList &c_types, PIVector<CDSection> &sections, PIVector<CDType> &enums) {
PIString n = in.takeCWord();
//piCout << n;
PIVariantTypes::Enum e;
e.enum_name = n;
PIString ev = in.inBrackets('{', '}');
e << ev.split(",");
if (root) {
CDType & cdt((*root)[root->count(false)]);
cdt = CDType(cdt.index(), n, "e", "", "", "", CDType::cdK);
cdt.setEnumValues(e);
enums << cdt;
} else {
enums << CDType(0, n, "e", "", "", "", CDType::cdK);
enums.back().setEnumValues(e);
}
in.removeAll("{"+in+"}");
}
void parseMember(PIString &in, CDSection * root, const PIStringList &c_types, PIVector<CDSection> &sections, PIVector<CDType> &enums) {
PIString t = in.takeCWord();
if (t == "struct") {
parseStruct(in, root, c_types, sections, enums);
}
if (t == "enum") {
parseEnum(in, root, c_types, sections, enums);
}
if (root) {
if (c_types.contains(t) && root) {
PIString tt = "s";
if (t == "bool") tt = "b";
if (t == "int") tt = "n";
if (t == "double") tt = "f";
CDType & cdt((*root)[root->count(false)]);
cdt = CDType(cdt.index(), in.takeCWord(), tt, "", "", "", CDType::cdK);
}
piForeach(CDSection cd, sections) {
if (t == cd.name) {
cd.alias = in.takeCWord();
root->section(root->sectionsCount()) = cd;
}
}
piForeach(CDType en, enums) {
if (t == en.name()) {
in.takeCWord();
(*root)[root->count(false)] = en;
}
}
}
}
void parseStruct(PIString &in, CDSection * root, const PIStringList &c_types, PIVector<CDSection> &sections, PIVector<CDType> &enums) {
PIString t = in.takeCWord();
CDSection * c;
if (root) c = &(root->section(root->sectionsCount()));
else c = new CDSection();
c->name = t;
c->alias = t;
PIStringList members = takeMembers(in);
//piCout << members;
piForeach(PIString &s, members) {
if (s.trim().isEmpty()) continue;
parseMember(s, c, c_types, sections, enums);
}
sections << *c;
}
Form::Form(QWidget *parent) : QWidget(parent), ui(new Ui::Form) {
CDCore::instance()->initPult();
ui->setupUi(this);
ui->treeView->setKFile("");
EvalSpinBox * ev = new EvalSpinBox();
ev->setValue(2);
ui->groupBox->layout()->addWidget(ev);
PIFile f;
piCout << f.open("test.kh", PIIODevice::ReadOnly);
PIStringList c_types;
c_types << "bool" << "int" << "double" << "string" << "PIString";
PIString in;
while (!f.isEnd()) {
PIStringList s = f.readLine().trim().split("//");
if (!s.isEmpty())
in += s[0];
}
PIVector<CDSection> sections;
PIVector<CDType> enums;
int i=0;
while (!in.isEmpty() && i<100) {
if (!in[0].isAlpha()) in.takeSymbol();
parseMember(in, 0, c_types, sections, enums);
i++;
}
piForeach(CDSection cd, sections) {
if (cd.name == "K") K.root() = cd;
}
ui->treeView->refresh();
}
Form::~Form() {
delete ui;
}
void Form::on_pushButton_3_clicked() {
ui->treeView->setKFile(QFileDialog::getSaveFileName(this, "Save"));
ui->treeView->saveK();
ui->treeView->setKFile("");
}
void Form::on_pushButton_4_clicked() {
ui->treeView->setKFile(QFileDialog::getOpenFileName(this, "Open"));
ui->treeView->loadK();
ui->treeView->setKFile("");
qDebug() << QCDCore::instance()->bindWindow(this);
QCDCore::instance()->bindWidget(ui->spinRadar_Antenna_SwitchRate, K["NVA.NVA_FrameStitch"]);
}
void Form::on_pushButton_6_clicked() {
QString fn = QFileDialog::getOpenFileName(this, trUtf8("Select *.h file with K description"), "k_description.h", "C/C++ header files(*.h *.hpp);;All files(*)");
if (fn.isEmpty()) return;
if (mode_dlg.exec() == QDialog::Rejected) return;
ui->treeView->buildFromHeader(fn, mode_dlg.mode());
/*piCout << K.root()["Radar_WaveFreqTune"];
piCout << K.root()["11.NVA_PulseGenFineTune"];
piCout << K.root()[".NVA.NVA_PulseGenFineTune"];
piCout << K.root()["NVA_A.1.NVA_Clk"];*/
}
void Form::on_buttonCalc_clicked() {
ui->treeView->calculateK();
ui->treeView->refresh();
}

View File

@@ -1,31 +0,0 @@
#ifndef FORM_H
#define FORM_H
#include <QWidget>
#include <qcd_modedialog.h>
namespace Ui {
class Form;
}
class Form : public QWidget
{
Q_OBJECT
public:
explicit Form(QWidget *parent = 0);
~Form();
private slots:
void on_pushButton_3_clicked();
void on_pushButton_4_clicked();
void on_pushButton_6_clicked();
void on_buttonCalc_clicked();
private:
Ui::Form * ui;
QCDModeDialog mode_dlg;
};
#endif // FORM_H

View File

@@ -1,249 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>731</width>
<height>508</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QSplitter" name="splitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_3">
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="pushButton_4">
<property name="text">
<string>Load</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Send</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Receive</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="pushButton_6">
<property name="text">
<string>update from KDescription</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButton_5">
<property name="text">
<string>Clear</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QPushButton" name="buttonCalc">
<property name="text">
<string>Calculate</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="buttonRefresh">
<property name="text">
<string>Refresh</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="CDKView" name="treeView"/>
</item>
</layout>
</widget>
<widget class="QGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>GroupBox</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="checkRadar_ADA_On">
<property name="text">
<string>CheckBox</string>
</property>
</widget>
</item>
<item>
<widget class="SpinSlider" name="spinSliderRadar_Antenna_Distance"/>
</item>
<item>
<widget class="QSpinBox" name="spinRadar_Antenna_SwitchRate"/>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>SpinSlider</class>
<extends>QWidget</extends>
<header>spinslider.h</header>
</customwidget>
<customwidget>
<class>CDKView</class>
<extends>QTreeView</extends>
<header location="global">qcd_kview.h</header>
<slots>
<signal>busyStatusChanged(bool)</signal>
<slot>sendK()</slot>
<slot>receiveK()</slot>
<slot>saveK()</slot>
<slot>loadK()</slot>
<slot>clear()</slot>
<slot>clearK()</slot>
<slot>refresh()</slot>
</slots>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>pushButton_2</sender>
<signal>clicked()</signal>
<receiver>treeView</receiver>
<slot>receiveK()</slot>
<hints>
<hint type="sourcelabel">
<x>264</x>
<y>60</y>
</hint>
<hint type="destinationlabel">
<x>264</x>
<y>152</y>
</hint>
</hints>
</connection>
<connection>
<sender>treeView</sender>
<signal>busyStatusChanged(bool)</signal>
<receiver>pushButton_2</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>264</x>
<y>174</y>
</hint>
<hint type="destinationlabel">
<x>264</x>
<y>60</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton_5</sender>
<signal>clicked()</signal>
<receiver>treeView</receiver>
<slot>clearK()</slot>
<hints>
<hint type="sourcelabel">
<x>264</x>
<y>89</y>
</hint>
<hint type="destinationlabel">
<x>264</x>
<y>188</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton</sender>
<signal>clicked()</signal>
<receiver>treeView</receiver>
<slot>sendK()</slot>
<hints>
<hint type="sourcelabel">
<x>137</x>
<y>60</y>
</hint>
<hint type="destinationlabel">
<x>198</x>
<y>152</y>
</hint>
</hints>
</connection>
<connection>
<sender>treeView</sender>
<signal>busyStatusChanged(bool)</signal>
<receiver>pushButton</receiver>
<slot>setDisabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>177</x>
<y>246</y>
</hint>
<hint type="destinationlabel">
<x>98</x>
<y>46</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonRefresh</sender>
<signal>clicked()</signal>
<receiver>treeView</receiver>
<slot>refresh()</slot>
<hints>
<hint type="sourcelabel">
<x>223</x>
<y>114</y>
</hint>
<hint type="destinationlabel">
<x>217</x>
<y>134</y>
</hint>
</hints>
</connection>
</connections>
</ui>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1005 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1017 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 571 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 929 B

View File

@@ -1,10 +1,10 @@
#include <QApplication>
#include "form.h"
#include "cdpultwindow.h"
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
Form w;
CDPultWindow w;
w.show();
return a.exec();
}