/** setup principal GUI elements */ void spqrMainWindow::make_tabs() { delete tabs; setCentralWidget(tabs = new QStackedWidget_KeybTabs); connect(tabs, SIGNAL(currentChanged(int)), SLOT(currentChanged(int))); tabs->addWidget(new CodeMirrorFile); tabs->addWidget(con); tabs->addWidget(new HelpDocView); connect(source(), SIGNAL(helpRequestTopic(QString)), SLOT(helpRequest(QString))); connect(source(), SIGNAL(textModified()), SLOT(textModified())); connect(source(), SIGNAL(userMessage(CodeMirror::messageKind,QString)), SLOT(userMessage(CodeMirror::messageKind,QString))); connect(helpDoc(), SIGNAL(loadFinished(bool)), SLOT(adjustLocation())); connect(helpDoc(), SIGNAL(titleChanged(QString)), SLOT(adjustTitle())); connect(helpDoc(), SIGNAL(loadProgress(int)), SLOT(setProgress(int))); connect(helpDoc(), SIGNAL(loadFinished(bool)), SLOT(finishLoading(bool))); }
void HttpInterface::sendEvent(const std::string nodeName, const strings& args) { size_t eventPos; if (commonDefinitions.events.contains(UTF8ToWString(args[0]), &eventPos)) { // build event and emit UserMessage::DataVector data; for (size_t i=1; i<args.size(); ++i) data.push_back(atoi(args[i].c_str())); UserMessage userMessage(eventPos, data); userMessage.serialize(asebaStream); asebaStream->flush(); } else if (verbose) cerr << "sendEvent " << nodeName << ": no event " << args[0] << endl; }
/** report message and return false */ bool CodeMirrorFile::error(QString msg) { emit userMessage(err, msg); return false; }