| 496 | } |
| 497 | |
| 498 | void ImportFileWidget::initSlots() { |
| 499 | // SLOTs for the general part of the data source configuration |
| 500 | connect(ui.cbSourceType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, QOverload<int>::of(&ImportFileWidget::sourceTypeChanged)); |
| 501 | connect(m_cbFileName, &KUrlComboBox::urlActivated, this, [=](const QUrl& url) { |
| 502 | fileNameChanged(url.toLocalFile()); |
| 503 | }); |
| 504 | connect(ui.leHost, &QLineEdit::textChanged, this, &ImportFileWidget::hostChanged); |
| 505 | connect(ui.lePort, &QLineEdit::textChanged, this, &ImportFileWidget::portChanged); |
| 506 | connect(ui.cbSerialPort, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &ImportFileWidget::portChanged); |
| 507 | connect(ui.tvJson, &QTreeView::clicked, this, &ImportFileWidget::refreshPreview); |
| 508 | |
| 509 | connect(ui.bOpen, &QPushButton::clicked, this, &ImportFileWidget::selectFile); |
| 510 | connect(ui.bOpenDBC, &QPushButton::clicked, this, &ImportFileWidget::selectDBCFile); |
| 511 | connect(ui.bFileInfo, &QPushButton::clicked, this, &ImportFileWidget::showFileInfo); |
| 512 | connect(ui.cbFileType, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &ImportFileWidget::fileTypeChanged); |
| 513 | connect(ui.cbUpdateType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ImportFileWidget::updateTypeChanged); |
| 514 | connect(ui.cbReadingType, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ImportFileWidget::readingTypeChanged); |
| 515 | connect(ui.cbFilter, QOverload<int>::of(&KComboBox::activated), this, &ImportFileWidget::filterChanged); |
| 516 | connect(ui.bRefreshPreview, &QPushButton::clicked, this, &ImportFileWidget::refreshPreview); |
| 517 | |
| 518 | if (m_asciiOptionsWidget) { |
| 519 | connect(m_asciiOptionsWidget.get(), &AsciiOptionsWidget::headerLineChanged, this, &ImportFileWidget::updateStartRow); |
| 520 | connect(m_asciiOptionsWidget.get(), &AsciiOptionsWidget::columnModesChanged, this, &ImportFileWidget::checkValid); |
| 521 | } |
| 522 | |
| 523 | connect(ui.cbMcapTopics, QOverload<int>::of(&KComboBox::activated), this, &ImportFileWidget::changeMcapTopic); |
| 524 | |
| 525 | #ifdef HAVE_MQTT |
| 526 | connect(ui.cbConnection, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ImportFileWidget::mqttConnectionChanged); |
| 527 | connect(ui.cbFileType, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() { |
| 528 | Q_EMIT checkFileType(); |
| 529 | }); |
| 530 | connect(ui.bManageConnections, &QPushButton::clicked, this, &ImportFileWidget::showMQTTConnectionManager); |
| 531 | connect(ui.bLWT, &QPushButton::clicked, this, &ImportFileWidget::showWillSettings); |
| 532 | connect(m_subscriptionWidget, &MQTTSubscriptionWidget::makeSubscription, this, &ImportFileWidget::subscribeTopic); |
| 533 | connect(m_subscriptionWidget, &MQTTSubscriptionWidget::MQTTUnsubscribeFromTopic, this, &ImportFileWidget::unsubscribeTopic); |
| 534 | connect(m_subscriptionWidget, &MQTTSubscriptionWidget::enableWill, this, &ImportFileWidget::enableWill); |
| 535 | connect(m_subscriptionWidget, &MQTTSubscriptionWidget::subscriptionChanged, this, &ImportFileWidget::refreshPreview); |
| 536 | #endif |
| 537 | } |
| 538 | |
| 539 | /*! |
| 540 | * \brief Called when the current target data containter was changed in ImportDilaog |
no outgoing calls
no test coverage detected