Changeset 5086 in ntrip


Ignore:
Timestamp:
Apr 1, 2013, 10:27:33 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/GnssCenter/main
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GnssCenter/main/app.cpp

    r5001 r5086  
    4444  }
    4545}
     46
     47// 
     48////////////////////////////////////////////////////////////////////////////
     49void t_app::slotMessage(QByteArray msg) {
     50  qDebug() << msg;
     51}
  • trunk/GnssCenter/main/app.h

    r5001 r5086  
    1818  const QString& confFileName() const {return _confFileName;}
    1919
     20 public slots:
     21  void slotMessage(QByteArray msg);
     22
    2023 private:
    2124  QString                _confFileName;
  • trunk/GnssCenter/main/mainwin.cpp

    r5061 r5086  
    1919#include "settings.h"
    2020#include "mdiarea.h"
     21#include "app.h"
    2122
    2223using namespace std;
     
    135136  t_pluginAction* action = dynamic_cast<t_pluginAction*>(sender());
    136137  QWidget* widget = action->_factIface->create();
     138  t_app* app = dynamic_cast<t_app*>(qApp);
     139  if (app) {
     140    const QMetaObject* metaObj = widget->metaObject();
     141    QByteArray bncMessageName = QMetaObject::normalizedSignature("bncMessage(QByteArray)");
     142    if (metaObj->indexOfSignal(bncMessageName) != -1) {
     143      connect(widget, SIGNAL(bncMessage(QByteArray)), app, SLOT(slotMessage(QByteArray)));
     144    }
     145  }
    137146  widget->setMinimumSize(500, 300);
    138147  QMdiSubWindow* subWindow = _mdi->addSubWindow((QWidget*) widget);
Note: See TracChangeset for help on using the changeset viewer.