git-svn-id: svn://db.shs.com.ru/libs@161 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -59,8 +59,9 @@ void QCDCore::K_ChangedGlobal() {
|
||||
void QCDCore::slotBool(bool v) {
|
||||
QWidget * w = (QWidget*)sender();
|
||||
if (!w || updating) return;
|
||||
PIDeque<int> path = binded_widgets.value(w);
|
||||
CDCore::instance()->k()[path].setValue(PIString::fromBool(v));
|
||||
QList<PIDeque<int> > pathes = binded_widgets.values(w);
|
||||
foreach (const PIDeque<int> & path, pathes)
|
||||
CDCore::instance()->k()[path].setValue(PIString::fromBool(v));
|
||||
emit updateViewRequest();
|
||||
}
|
||||
|
||||
@@ -68,8 +69,9 @@ void QCDCore::slotBool(bool v) {
|
||||
void QCDCore::slotInt(int v) {
|
||||
QWidget * w = (QWidget*)sender();
|
||||
if (!w || updating) return;
|
||||
PIDeque<int> path = binded_widgets.value(w);
|
||||
CDCore::instance()->k()[path].setValue(PIString::fromNumber(v));
|
||||
QList<PIDeque<int> > pathes = binded_widgets.values(w);
|
||||
foreach (const PIDeque<int> & path, pathes)
|
||||
CDCore::instance()->k()[path].setValue(PIString::fromNumber(v));
|
||||
emit updateViewRequest();
|
||||
}
|
||||
|
||||
@@ -77,8 +79,9 @@ void QCDCore::slotInt(int v) {
|
||||
void QCDCore::slotDouble(double v) {
|
||||
QWidget * w = (QWidget*)sender();
|
||||
if (!w || updating) return;
|
||||
PIDeque<int> path = binded_widgets.value(w);
|
||||
CDCore::instance()->k()[path].setValue(PIString::fromNumber(v));
|
||||
QList<PIDeque<int> > pathes = binded_widgets.values(w);
|
||||
foreach (const PIDeque<int> & path, pathes)
|
||||
CDCore::instance()->k()[path].setValue(PIString::fromNumber(v));
|
||||
emit updateViewRequest();
|
||||
}
|
||||
|
||||
@@ -86,8 +89,9 @@ void QCDCore::slotDouble(double v) {
|
||||
void QCDCore::slotText(QString v) {
|
||||
QWidget * w = (QWidget*)sender();
|
||||
if (!w || updating) return;
|
||||
PIDeque<int> path = binded_widgets.value(w);
|
||||
CDCore::instance()->k()[path].setValue(Q2PIString(v));
|
||||
QList<PIDeque<int> > pathes = binded_widgets.values(w);
|
||||
foreach (const PIDeque<int> & path, pathes)
|
||||
CDCore::instance()->k()[path].setValue(Q2PIString(v));
|
||||
emit updateViewRequest();
|
||||
}
|
||||
|
||||
@@ -124,7 +128,7 @@ bool QCDCore::bindWidget(QWidget * w) {
|
||||
}
|
||||
|
||||
|
||||
bool QCDCore::bindWidget(QWidget * w, const CDType & k) {
|
||||
bool QCDCore::bindWidget(QWidget * w, const CDType k) {
|
||||
if (!w) return false;
|
||||
QString cn = w->metaObject()->className();
|
||||
bool ok = false;
|
||||
@@ -148,7 +152,8 @@ bool QCDCore::bindWidget(QWidget * w, const CDType & k) {
|
||||
bindView(w);
|
||||
}
|
||||
if (!ok) return false;
|
||||
binded_widgets[w] = k.path();
|
||||
piCout << k.name() << k.path();
|
||||
binded_widgets.insert(w, k.path());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user