git-svn-id: svn://db.shs.com.ru/libs@398 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -93,6 +93,21 @@ void KDockWidget::clear() {
|
||||
}
|
||||
|
||||
|
||||
void KDockWidget::changedGlobal() {
|
||||
for (int i = 0; i < k_list.size_s(); ++i) {
|
||||
if (!K.exists(k_list[i])) {
|
||||
k_list.remove(i);
|
||||
info_list.remove(i);
|
||||
removeRow(i);
|
||||
--i;
|
||||
continue;
|
||||
}
|
||||
QLabel * lbl = qobject_cast<QLabel*>(lay->itemAt(i, QFormLayout::LabelRole)->widget());
|
||||
if (lbl) lbl->setText(PI2QString(K[k_list[i]].pathString().join(".")) + ":");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool KDockWidget::eventFilter(QObject * o, QEvent * e) {
|
||||
//if (o == graphic->viewport()) {
|
||||
switch (e->type()) {
|
||||
@@ -244,6 +259,12 @@ void CDDirectK::addArea() {
|
||||
}
|
||||
|
||||
|
||||
void CDDirectK::changedGlobal() {
|
||||
foreach (KDockWidget * d, docks)
|
||||
d->changedGlobal();
|
||||
}
|
||||
|
||||
|
||||
void CDDirectK::removeArea() {
|
||||
KDockWidget * d = qobject_cast<KDockWidget * >(sender());
|
||||
if (!d) return;
|
||||
|
||||
@@ -17,6 +17,7 @@ public:
|
||||
QByteArray save() const;
|
||||
void load(QByteArray ba);
|
||||
void clear();
|
||||
void changedGlobal();
|
||||
|
||||
QFormLayout * lay;
|
||||
|
||||
@@ -62,6 +63,7 @@ private:
|
||||
QMainWindow * da;
|
||||
|
||||
public slots:
|
||||
void changedGlobal();
|
||||
|
||||
private slots:
|
||||
void removeArea();
|
||||
|
||||
@@ -102,6 +102,19 @@ void GDockWidget::load(QByteArray ba) {
|
||||
}
|
||||
|
||||
|
||||
void GDockWidget::changedGlobal() {
|
||||
for (int i = 0; i < x_list.size_s(); ++i) {
|
||||
if (!X.exists(x_list[i])) {
|
||||
x_list.remove(i);
|
||||
graphic->graphic()->removeGraphic(i);
|
||||
--i;
|
||||
continue;
|
||||
}
|
||||
graphic->graphic()->setGraphicName(PI2QString(X[x_list[i]].pathString().join(".")), i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool GDockWidget::eventFilter(QObject * o, QEvent * e) {
|
||||
//if (o == graphic->viewport()) {
|
||||
switch (e->type()) {
|
||||
@@ -297,6 +310,12 @@ void CDGraphics::receivedX() {
|
||||
}
|
||||
|
||||
|
||||
void CDGraphics::changedGlobal() {
|
||||
foreach (GDockWidget * d, docks)
|
||||
d->changedGlobal();
|
||||
}
|
||||
|
||||
|
||||
void CDGraphics::removeGraphic() {
|
||||
GDockWidget * d = qobject_cast<GDockWidget * >(sender());
|
||||
if (!d) return;
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
void drawX(const PIMap<PIString, PIVector<double> > & data);
|
||||
QByteArray save() const;
|
||||
void load(QByteArray ba);
|
||||
void changedGlobal();
|
||||
|
||||
CDGraphicWidget * graphic;
|
||||
|
||||
@@ -76,6 +77,7 @@ private:
|
||||
|
||||
public slots:
|
||||
void receivedX();
|
||||
void changedGlobal();
|
||||
|
||||
private slots:
|
||||
void removeGraphic();
|
||||
|
||||
@@ -46,6 +46,8 @@ CDPultWindow::CDPultWindow(QWidget *parent) : EMainWindow(parent), Ui::CDPultWin
|
||||
connect(widgetK, SIGNAL(addToLog(CDViewWidget::LogIcon,QString)), this, SLOT(addToLog(CDViewWidget::LogIcon,QString)));
|
||||
connect(widgetX, SIGNAL(addToLog(CDViewWidget::LogIcon,QString)), this, SLOT(addToLog(CDViewWidget::LogIcon,QString)));
|
||||
connect(widgetC, SIGNAL(addToLog(CDViewWidget::LogIcon,QString)), this, SLOT(addToLog(CDViewWidget::LogIcon,QString)));
|
||||
connect(widgetK->view, SIGNAL(changedGlobal()), widgetDirectK, SLOT(changedGlobal()));
|
||||
connect(widgetX->view, SIGNAL(changedGlobal()), widgetGraphics, SLOT(changedGlobal()));
|
||||
connect(widgetX->view, SIGNAL(receivedX()), widgetGraphics, SLOT(receivedX()));
|
||||
QCDCore::instance()->bindWidget(widgetK->view);
|
||||
QCDCore::instance()->setDirectKEnabled(true);
|
||||
|
||||
Reference in New Issue
Block a user