Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen

- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -30,7 +30,6 @@ AvailStreamsModel::AvailStreamsModel(Interface::Dtc *avmDtc,
, m_cnrRoot(new NGLTreeItem(QVariant()))
, m_tvcRoot(new NGLTreeItem(QVariant()))
, m_changes(false)
, m_logger(getLogger("AudioSettingsAvailStreamsModel"))
{
Q_ASSERT(avmDtc);
@@ -110,7 +109,7 @@ QVariant AvailStreamsModel::data(const QModelIndex &index, int role) const
{
NGLTreeItem *item = privateData(index);
StreamData data = item->data().value<StreamData>();
DEBUG_LOG(m_logger) << data.name;
DEBUG_LOG() << data.name;
return data.name;
}
@@ -54,8 +54,6 @@ private:
NGLTreeItem *m_tvcRoot;
bool m_changes;
QVector<QPair<bool , int> > m_changedStreams;
NGL::INGLLogger &m_logger;
};
class AvailStreamsFilter final : public QSortFilterProxyModel
@@ -18,7 +18,6 @@ AudioSettingsDialog::AudioSettingsDialog(QWidget *parent)
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::OkApplyCancel)
, m_ui(new Ui::AudioSettingsDialog)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("AudioSettingsDialog"))
{
m_ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
@@ -123,7 +122,7 @@ void AudioSettingsDialog::retranslate()
void AudioSettingsDialog::onOperatorChanged(const OperatorManagement::User &data, DataModification modType)
{
DEBUG_LOG(m_logger) << "************** onOperatorChanged ";
DEBUG_LOG() << "************** onOperatorChanged ";
switch (modType)
{
case DataModification::eRemoved:
@@ -246,7 +245,7 @@ void AudioSettingsDialog::onDownButtonClicked()
void AudioSettingsDialog::onSelectionChangedAllocation(const QItemSelection &selected, const QItemSelection &deselected)
{
DEBUG_LOG(m_logger) << "onSelectionChangedAllocation selected.isEmpty()=" << selected.isEmpty();
DEBUG_LOG() << "onSelectionChangedAllocation selected.isEmpty()=" << selected.isEmpty();
Q_UNUSED(deselected);
QModelIndex first = m_ui->treeViewAllocated->model()->index(0, 0);
int rowCnt = m_ui->treeViewAllocated->model()->rowCount();
@@ -282,7 +281,7 @@ bool AudioSettingsDialog::apply()
bool AudioSettingsDialog::applyRemove()
{
RemoveCnrTvcProfileRequest removeRequest;
DEBUG_LOG(m_logger) << "AudioSettingsDialog::applyRemove";
DEBUG_LOG() << "AudioSettingsDialog::applyRemove";
for (const auto &profile : std::as_const(m_cnrTvcProfileMap))
{
@@ -305,7 +304,7 @@ bool AudioSettingsDialog::applyRemove()
bool AudioSettingsDialog::applyModify()
{
ModifyCnrTvcProfileRequest modifyRequest;
DEBUG_LOG(m_logger) << "AudioSettingsDialog::applyModify";
DEBUG_LOG() << "AudioSettingsDialog::applyModify";
for (const auto &profile : std::as_const(m_cnrTvcProfileMap))
{
@@ -383,7 +382,7 @@ void AudioSettingsDialog::onSelectionOperatorChanged(const int index)
m_ui->pushButtonUp->setEnabled(false);
m_ui->pushButtonDown->setEnabled(false);
m_operatorId = m_ui->operatorComboBox->currentData().toInt();
DEBUG_LOG(m_logger) << "onSelectionOperatorChanged" << " operatorStr=" << m_ui->operatorComboBox->currentText() << " m_operatorId= " << m_operatorId;
DEBUG_LOG() << "onSelectionOperatorChanged" << " operatorStr=" << m_ui->operatorComboBox->currentText() << " m_operatorId= " << m_operatorId;
fillOperatorList();
m_modelAllocated->resetChangeState();
m_modelAvailable->resetChangeState();
@@ -14,7 +14,6 @@ namespace AudioVideoManagement
AllocatedStreamsModel::AllocatedStreamsModel(QObject *parent)
: NGLTreeModel(parent, new NGLTreeItem(QVariant(QLatin1String("root"))), { tr("Allocated") })
, m_logger(getLogger("AudioSettingsUsedStreamsModel"))
{
setMimeType(StreamData::mimeType());
}
@@ -32,7 +31,7 @@ QVariant AllocatedStreamsModel::data(const QModelIndex &index, int role) const
{
NGLTreeItem *item = privateData(index);
StreamData data = item->data().value<StreamData>();
DEBUG_LOG(m_logger) << data.name;
DEBUG_LOG() << data.name;
return data.name;
}
@@ -93,14 +92,14 @@ bool AllocatedStreamsModel::dropMimeData(const QMimeData *data, Qt::DropAction a
qDeleteAll(droppedItems);
emit droppedStreamNames(streams);
m_changes = true;
DEBUG_LOG(m_logger) << data->data(QStringLiteral("NGLTreeModel/dragDrop"));
DEBUG_LOG() << data->data(QStringLiteral("NGLTreeModel/dragDrop"));
return NGLTreeModel::dropMimeData(data, action, row, 0, QModelIndex());
}
void AllocatedStreamsModel::setNewStreamData(const QVector<StreamData> &newData)
{
DEBUG_LOG(m_logger) << "set new stream data, count: " << newData.size();
DEBUG_LOG() << "set new stream data, count: " << newData.size();
resetModel();
for (const StreamData &sd : newData)
m_rootItem->appendChild(new NGLTreeItem(QVariant::fromValue(sd)));
@@ -117,15 +116,15 @@ QVector<StreamData> AllocatedStreamsModel::getStreamDataVector() const
const NGLTreeItem *item = m_rootItem->child(i);
const StreamData sd = item->data().value<StreamData>();
result.append(sd);
DEBUG_LOG(m_logger) << "result.append(sd.name):" << sd.name;
DEBUG_LOG() << "result.append(sd.name):" << sd.name;
}
DEBUG_LOG(m_logger) << "getStreamDataVector() size: " << result.size();
DEBUG_LOG() << "getStreamDataVector() size: " << result.size();
return result;
}
void AllocatedStreamsModel::changeOrder(const QModelIndex &idx, bool up)
{
DEBUG_LOG(m_logger) << "changeOrder "
DEBUG_LOG() << "changeOrder "
<< " index = " << idx.row()
<< " up = " << up
<< " m_rootItem->childCount()= " << m_rootItem->childCount();
@@ -42,7 +42,6 @@ signals:
private:
bool m_changes{false};
QVector<QPair<bool , int> > m_changedStreams;
NGL::INGLLogger &m_logger;
};
}
@@ -22,7 +22,6 @@ AvmSequenceModel::AvmSequenceModel(QObject *parent)
tr("Volume"),
tr("Description")},
parent)
, m_logger(getLogger("AvmSequenceModel"))
{}
void AvmSequenceModel::setTimezoneHoursOffset(int timezoneHoursOffset)
@@ -63,7 +63,6 @@ private:
QVector<int> m_highlightedRows;
int m_timezoneHoursOffset = 0;
LOGGER_T m_logger;
};
class AvmSequenceProxyModel final : public LtsWidgets::LtsColumnFilterProxyModel
@@ -62,7 +62,6 @@ TopicEditor::TopicEditor(LtsSession::LtsSession *session, const TopicEditorBase:
, m_model(new AvmSequenceModel(this))
, m_playbackMenu(nullptr)
, m_ui(new Ui::AVTopicEditor)
, m_logger(getLogger("TopicEditor"))
{
Q_ASSERT(session);
@@ -380,7 +379,7 @@ void TopicEditor::onEditSequence()
if (!m_playbackMenu)
return;
DEBUG_LOG(m_logger) << "slotEditSequence ";
DEBUG_LOG() << "slotEditSequence ";
const auto selRows = m_ui->tvSequences->selectionModel()->selectedRows();
if (selRows.size() != 1)
@@ -393,7 +392,7 @@ void TopicEditor::onEditSequence()
m_model->setHighlightedRow(row);
const AvsSequence selectedSeq = m_model->getRowData(row);
DEBUG_LOG(m_logger) << "selectedSeq.internalStreamName=" << selectedSeq.internalStreamName;
DEBUG_LOG() << "selectedSeq.internalStreamName=" << selectedSeq.internalStreamName;
m_playbackMenu->setStreamName(selectedSeq.internalStreamName);
m_ui->dtStart->setMsecsSinceEpoch(std::chrono::milliseconds(selectedSeq.start.time_since_epoch()).count());
@@ -67,7 +67,6 @@ private:
QString m_topicStreamName;
Ui::AVTopicEditor *m_ui{nullptr};
NGL::INGLLogger &m_logger;
};
}
@@ -64,7 +64,6 @@ AvailableStreamsModel::AvailableStreamsModel(const std::shared_ptr<Interface::Dt
, m_ismDtc(ismDtc)
, m_session(session)
, m_streamNameMapping(streamNameMapping)
, m_logger(getLogger("AvailableStreamsModel"))
{
Q_ASSERT(ismDtc);
Q_ASSERT(streamNameMapping);
@@ -165,7 +164,7 @@ QMimeData *AvailableStreamsModel::mimeData(const QModelIndexList &indexes) const
bool AvailableStreamsModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent)
{
INFO_LOG(m_logger) << "dropMimeData: action = " << action
INFO_LOG() << "dropMimeData: action = " << action
<< ", row = " << row
<< ", parent: valid = " << parent.isValid();
@@ -185,7 +184,7 @@ bool AvailableStreamsModel::dropMimeData(const QMimeData *data, Qt::DropAction a
void AvailableStreamsModel::initModel()
{
beginResetModel();
INFO_LOG(m_logger) << "initModel";
INFO_LOG() << "initModel";
m_rootItem->removeAllChildren();
@@ -251,7 +250,7 @@ void AvailableStreamsModel::initModel()
{
if (videoTeam.exerciseId() != m_session->exerciseId())
continue;
DEBUG_LOG(m_logger) << "add new videoteam" << videoTeam;
DEBUG_LOG() << "add new videoteam" << videoTeam;
StreamModelData item;
item.name = QString::fromStdString(videoTeam.streamName().c_str());
item.mountingPointId = -1 * videoTeam.id();
@@ -96,8 +96,6 @@ private:
const std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
LtsSession::LtsSession *m_session;
StreamNameMapping *m_streamNameMapping;
NGL::INGLLogger &m_logger;
};
}
Q_DECLARE_METATYPE(AudioVideoManagement::StreamModelData)
@@ -18,7 +18,6 @@ ChooseMenu::ChooseMenu(Interface::Dtc *dtc, AvsMenus *avsMenus, QWidget *parent)
, m_dtc(dtc)
, m_avsMenus(avsMenus)
, m_ui(new Ui::ChooseMenuStruct)
, m_logger(getLogger("ChooseMenu"))
{
Q_ASSERT(dtc);
Q_ASSERT(avsMenus);
@@ -86,11 +85,11 @@ void ChooseMenu::onMenuStructChanged(const MenuStruct &data, DataModification mo
bool ChooseMenu::apply()
{
int menuId = m_ui->cbAudio->currentData().toInt();
INFO_LOG(m_logger) << "MenuId Audio: " << menuId;
INFO_LOG() << "MenuId Audio: " << menuId;
m_avsMenus->setAnnouncementMenu(menuId);
menuId = m_ui->cbVideo->currentData().toInt();
INFO_LOG(m_logger) << "MenuId Video: " << menuId;
INFO_LOG() << "MenuId Video: " << menuId;
m_avsMenus->setVideoMenu(menuId);
return true;
@@ -50,7 +50,6 @@ private:
Interface::Dtc *m_dtc;
AvsMenus *m_avsMenus;
Ui::ChooseMenuStruct *m_ui;
NGL::INGLLogger &m_logger;
};
}
@@ -15,7 +15,6 @@ MenuEdit::MenuEdit(QWidget *parent)
, m_availStreamsModel(nullptr)
, m_usedStreamsModel(nullptr)
, m_isAudio(false)
, m_logger(getLogger("AudioVideoManagementEdit"))
, m_requestHelper(new LtsUtils::RequestHelper(this))
{
m_ui->setupUi(this);
@@ -47,11 +46,11 @@ bool MenuEdit::init(LtsSession::LtsSession *session,
StreamNameMapping *streamNameMapping,
const MenuStruct &ms)
{
DEBUG_LOG(m_logger) << "MenuEdit::init()";
DEBUG_LOG() << "MenuEdit::init()";
if (!ftc || !dtc)
{
ERROR_LOG(m_logger) << "MenuEdit::init() Invalid shared_ptr!";
ERROR_LOG() << "MenuEdit::init() Invalid shared_ptr!";
return false;
}
@@ -120,7 +119,7 @@ void MenuEdit::onRemove()
return;
slotChangesMade();
DEBUG_LOG(m_logger) << "index row: " << index.row();
DEBUG_LOG() << "index row: " << index.row();
m_usedStreamsModel->removeRow(index.row(), index.parent());
}
else
@@ -132,7 +131,7 @@ void MenuEdit::onRemove()
return;
slotChangesMade();
DEBUG_LOG(m_logger) << "index row: " << index.row();
DEBUG_LOG() << "index row: " << index.row();
m_usedStreamsModel->removeRow(index.row(), index.parent());
}
@@ -141,7 +140,7 @@ void MenuEdit::onRemove()
void MenuEdit::onModelDataChanged()
{
INFO_LOG(m_logger) << "onModelDataChanged";
INFO_LOG() << "onModelDataChanged";
m_ui->menuTreeView->expandAll();
}
@@ -68,7 +68,6 @@ private:
UsedStreamsModel *m_usedStreamsModel;
bool m_isAudio;
QString m_name;
NGL::INGLLogger &m_logger;
LtsUtils::RequestHelper *m_requestHelper;
AudioVideoManagement::MenuStruct m_lastDdsMenuStruct;
@@ -26,7 +26,6 @@ MenuEditView::MenuEditView(const QString &menuGroup, LtsSession::LtsSession *ses
, m_session(session)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_ui(new Ui::MenuEditView)
, m_logger(getLogger("AudioVideoManagementDialog"))
{
m_ui->setupUi(this);
m_ui->widget->setSelectionMode(QAbstractItemView::SingleSelection);
@@ -150,7 +149,7 @@ void MenuEditView::onEditMenuStruct()
AudioVideoManagement::MenuStruct ms = m_model->getRowData(row);
ms.isAudio(m_isAudio);
DEBUG_LOG(m_logger) << "---onEditMenuStruct () "
DEBUG_LOG() << "---onEditMenuStruct () "
<< " id: " << ms.id()
<< " name: " << ms.name();
@@ -205,15 +204,15 @@ void MenuEditView::onExportButtonClicked()
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
if (fileId > 0)
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
DEBUG_LOG() << "Saved file with id = " << fileId;
else
ERROR_LOG(m_logger) << "Could not save file in library ";
ERROR_LOG() << "Could not save file in library ";
}
void MenuEditView::onImportButtonClicked()
{
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
DEBUG_LOG() << " onImportButtonClicked() ";
QByteArray content;
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml}, m_session->exerciseId(), FileManagement::toString(FileManagement::XmlType::AVMMenuEditView));
@@ -240,7 +239,7 @@ void MenuEditView::onImportButtonClicked()
});
}
}
INFO_LOG(m_logger) << "--- onImportButtonClicked() ";
INFO_LOG() << "--- onImportButtonClicked() ";
}
}
}
@@ -76,9 +76,6 @@ private:
LtsSession::LtsSession *m_session;
LtsUtils::RequestHelper *m_requestHelper;
Ui::MenuEditView *m_ui;
LOGGER_T m_logger;
};
}
@@ -21,7 +21,6 @@ MenuViewModel::MenuViewModel(QObject *parent)
parent)
, m_isAudio(false)
, m_dtc(nullptr)
, m_logger(getLogger("MenuViewModel"))
{}
@@ -78,7 +77,7 @@ QByteArray MenuViewModel::modelToJson(int row) const
QJsonObject obj;
obj[QStringLiteral("XmlType")] = FileManagement::toString(FileManagement::XmlType::AVMMenuEditView);
DEBUG_LOG(m_logger) << "row =" << ": " << row;
DEBUG_LOG() << "row =" << ": " << row;
const AudioVideoManagement::MenuStruct &menuStruct = m_vecData.at(row);
obj[QStringLiteral("id")] = 0;
@@ -123,7 +122,7 @@ QVector<AudioVideoManagement::MenuStruct> MenuViewModel::jsonToMenuStructs(const
const QJsonArray arrEntry(obj.value(QStringLiteral("menuEntries")).toArray());
menuStruct.menuEntries().resize(arrEntry.size());
INFO_LOG(m_logger) << "arrEntry.size()=" << arrEntry.size();
INFO_LOG() << "arrEntry.size()=" << arrEntry.size();
for (int j = 0; j < arrEntry.size(); ++j)
{
const QJsonObject objEntry(arrEntry.at(j).toObject());
@@ -30,6 +30,5 @@ protected:
private:
bool m_isAudio;
std::shared_ptr<AudioVideoManagement::Interface::Dtc> m_dtc;
LOGGER_T m_logger;
};
}
@@ -13,7 +13,6 @@ namespace AudioVideoManagement
NewMenuStruct::NewMenuStruct(QWidget *parent)
: LtsWidgets::LtsFramelessDialog(parent, LtsWidgets::Behaviour::Modal)
, m_ui(new Ui::NewMenuStruct)
, m_logger(getLogger("NewMenu"))
{
m_ui->setupUi(this);
m_ui->ltsDialogButtonBox->getButton(LtsWidgets::DialogButton::Ok)->hide();
@@ -30,7 +30,6 @@ Q_SIGNALS:
private:
Ui::NewMenuStruct *m_ui;
LOGGER_T m_logger;
};
}
@@ -296,7 +296,6 @@ AvmPlaybackMenu::AvmPlaybackMenu(QWidget *parent)
: QWidget(parent)
, m_ui(new Ui::Playback)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("AvmPlaybackMenu"))
{}
@@ -388,12 +387,12 @@ bool AvmPlaybackMenu::init(LtsSession::LtsSession *session, AvaSession *avaSessi
m_presetStreamName = streamName;
if (m_presetStreamName)
DEBUG_LOG(m_logger) << "init stream preset: " << m_presetStreamName.get();
DEBUG_LOG() << "init stream preset: " << m_presetStreamName.get();
m_presetStartTime = startTime;
if (m_presetStartTime)
DEBUG_LOG(m_logger) << "init time preset: " << std::chrono::milliseconds(m_presetStartTime.get().time_since_epoch()).count();
DEBUG_LOG() << "init time preset: " << std::chrono::milliseconds(m_presetStartTime.get().time_since_epoch()).count();
m_session = session;
m_playbackApp = std::move(appHandle);
@@ -1007,37 +1006,37 @@ void AvmPlaybackMenu::preselectStream(const QString &fallbackInternalStreamName)
const QString currentStreamName(m_presetStreamName.is_initialized() ? *m_presetStreamName : QString());
const QString currentInternalName(currentStreamName.isEmpty() ? fallbackInternalStreamName : QString());
DEBUG_LOG(m_logger) << "currentStreamName: " << currentStreamName;
DEBUG_LOG(m_logger) << "currentInternalName: " << currentInternalName;
DEBUG_LOG() << "currentStreamName: " << currentStreamName;
DEBUG_LOG() << "currentInternalName: " << currentInternalName;
m_presetStreamName.reset();
if (!currentInternalName.isEmpty() || !currentStreamName.isEmpty())
{
DEBUG_LOG(m_logger) << "stream preset set - searching for '" << currentStreamName << "'..";
DEBUG_LOG() << "stream preset set - searching for '" << currentStreamName << "'..";
bool found = false;
for (int i = 0; i < m_ui->cbStreams->count(); i++)
{
const AvaStream &curStream = m_ui->cbStreams->itemData(i).value<AvaStream>();
DEBUG_LOG(m_logger) << "stream " << i << ": " << curStream.displayName << " (" << curStream.internalName << ")";
DEBUG_LOG() << "stream " << i << ": " << curStream.displayName << " (" << curStream.internalName << ")";
if ((!currentInternalName.isEmpty() && curStream.displayName == currentInternalName) ||
(!currentStreamName.isEmpty() && curStream.internalName == currentStreamName))
{
found = true;
DEBUG_LOG(m_logger) << "stream preset set, found & selected";
DEBUG_LOG() << "stream preset set, found & selected";
m_ui->cbStreams->setCurrentIndex(i);
break;
}
}
if (!found)
WARNING_LOG(m_logger) << "new stream list does not contain old selected stream (" << currentInternalName << ") !";
WARNING_LOG() << "new stream list does not contain old selected stream (" << currentInternalName << ") !";
}
else
DEBUG_LOG(m_logger) << "no stream preset set";
DEBUG_LOG() << "no stream preset set";
}
@@ -1098,7 +1097,7 @@ void AvmPlaybackMenu::setSavedPos(qint64 msecs)
void AvmPlaybackMenu::onTimelineComplete(const AvaTimeline &timeline)
{
DEBUG_LOG(m_logger) << "onTimelineComplete";
DEBUG_LOG() << "onTimelineComplete";
m_intervalModel.setData(timeline.parts());
m_ui->tavIntervals->resizeColumnsToContents();
@@ -1116,7 +1115,7 @@ void AvmPlaybackMenu::onTimelineComplete(const AvaTimeline &timeline)
m_savedPos.reset();
}
DEBUG_LOG(m_logger) << "onTimelineComplete " << std::chrono::milliseconds(newPos.time_since_epoch()).count();
DEBUG_LOG() << "onTimelineComplete " << std::chrono::milliseconds(newPos.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), newPos);
m_timelineIsComplete = true;
@@ -1143,7 +1142,7 @@ void AvmPlaybackMenu::onStreamPositionReceived(const QString &dialogId, const QS
return;
m_lastAvsPos = pos;
DEBUG_LOG(m_logger) << "onStreamPositionReceived: last avs pos now: " << std::chrono::milliseconds((*m_lastAvsPos).time_since_epoch()).count() << " - direct apply? " << m_avaCtrl->isEmpty();
DEBUG_LOG() << "onStreamPositionReceived: last avs pos now: " << std::chrono::milliseconds((*m_lastAvsPos).time_since_epoch()).count() << " - direct apply? " << m_avaCtrl->isEmpty();
if (m_avaCtrl->isEmpty())
applyAvsPos();
@@ -1199,13 +1198,13 @@ void AvmPlaybackMenu::onUiTimeChanged(AvaTimePoint t)
m_currentButtonState != ButtonStates::Stopped)
return;
DEBUG_LOG(m_logger) << "onUiTimeChanged " << std::chrono::milliseconds(t.time_since_epoch()).count();
DEBUG_LOG() << "onUiTimeChanged " << std::chrono::milliseconds(t.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), t);
}
void AvmPlaybackMenu::onStreamSelectionChanged(const QVector<AvaStream> &selectedStreams)
{
DEBUG_LOG(m_logger) << "onStreamSelectionChanged count = " << selectedStreams.count();
DEBUG_LOG() << "onStreamSelectionChanged count = " << selectedStreams.count();
Q_ASSERT(!selectedStreams.isEmpty());
@@ -1232,7 +1231,7 @@ void AvmPlaybackMenu::onStreamSelectionChanged(const QVector<AvaStream> &selecte
void AvmPlaybackMenu::onIntervalActivated(const QModelIndex &index)
{
AvaTimelinePart interval = m_intervalModel.getRowData(index.row());
DEBUG_LOG(m_logger) << "start = " << std::chrono::milliseconds(interval.first.time_since_epoch()).count();
DEBUG_LOG() << "start = " << std::chrono::milliseconds(interval.first.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), interval.first);
@@ -1303,7 +1302,7 @@ void AvmPlaybackMenu::selectMarker(const MarkerManagement::Marker &marker)
(void)blocker;
const auto &rowData = marker;
DEBUG_LOG(m_logger) << "AvmPlaybackMenu::onMarkerClicked name = " << QString::fromStdString(rowData.name())
DEBUG_LOG() << "AvmPlaybackMenu::onMarkerClicked name = " << QString::fromStdString(rowData.name())
<< " note = " << QString::fromStdString(rowData.note());
bool selectMarkerStream = false;
@@ -1320,7 +1319,7 @@ void AvmPlaybackMenu::selectMarker(const MarkerManagement::Marker &marker)
for (const MarkerManagement::MarkerDescription &desc : rowData.descriptions())
{
DEBUG_LOG(m_logger) << " description = " << QString::fromStdString(desc.content())
DEBUG_LOG() << " description = " << QString::fromStdString(desc.content())
<< " desc.markerType()=" << desc.markerType();
if ((desc.markerType() == MarkerManagement::MarkerType::Video && m_isAudio == false) ||
(desc.markerType() == MarkerManagement::MarkerType::Audio && m_isAudio == true))
@@ -1346,7 +1345,7 @@ void AvmPlaybackMenu::selectMarker(const MarkerManagement::Marker &marker)
avaStream.displayName = m_streamNameMapping->displayName(avaStream.internalName);
m_ui->cbMarkerStreams->addItem(avaStream.displayName, QVariant::fromValue(avaStream));
DEBUG_LOG(m_logger) << "streams[" << avaStream.internalName << "]"
DEBUG_LOG() << "streams[" << avaStream.internalName << "]"
<< " internaName=" << avaStream.internalName
<< " displayName=" << avaStream.displayName;
if (bIsSelected && selectedStream.internalName.isEmpty())
@@ -1364,7 +1363,7 @@ void AvmPlaybackMenu::selectMarker(const MarkerManagement::Marker &marker)
qint64 time = rowData.timeStamp() - rowData.timeStampOffset();
DEBUG_LOG(m_logger) << "marker time: " << time << " (" << QDateTime::fromMSecsSinceEpoch(time).toString(QStringLiteral("dd.MM.yy HH:mm:ss.zzz")) << ")";
DEBUG_LOG() << "marker time: " << time << " (" << QDateTime::fromMSecsSinceEpoch(time).toString(QStringLiteral("dd.MM.yy HH:mm:ss.zzz")) << ")";
std::chrono::milliseconds t(time);
AvaTimePoint p(std::chrono::duration_cast<AvaDuration>(t));
@@ -1404,7 +1403,7 @@ void AvmPlaybackMenu::onSetMarkerClicked()
if (!m_selectedStreams || m_selectedStreams.get().isEmpty())
{
new LtsWidgets::LtsMessageDialogNew(this, tr("No stream selected to create a marker from."));
WARNING_LOG(m_logger) << "onSetMarkerClicked called, but no selected streams available";
WARNING_LOG() << "onSetMarkerClicked called, but no selected streams available";
return;
}
@@ -1445,7 +1444,7 @@ void AvmPlaybackMenu::onStartClicked()
{
DEBUG_LOG(m_logger) << "onStartClicked"
DEBUG_LOG() << "onStartClicked"
<< " dialogId=" << m_playbackApp.dialogId()
<< " currentSpeed=" << currentSpeed()
@@ -1460,7 +1459,7 @@ void AvmPlaybackMenu::onStartClicked()
return;
}
WARNING_LOG(m_logger) << "onStartClicked called, but no selected streams available";
WARNING_LOG() << "onStartClicked called, but no selected streams available";
return;
}
@@ -1502,14 +1501,14 @@ void AvmPlaybackMenu::onAllStreams()
void AvmPlaybackMenu::onIntervalBackwardClicked()
{
const AvaTimelinePart &targetInterval = m_intervalModel.previousInterval();
DEBUG_LOG(m_logger) << "onIntervalBackwardClicked " << std::chrono::milliseconds(targetInterval.first.time_since_epoch()).count();
DEBUG_LOG() << "onIntervalBackwardClicked " << std::chrono::milliseconds(targetInterval.first.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), targetInterval.first);
}
void AvmPlaybackMenu::onIntervalForwardClicked()
{
const AvaTimelinePart &targetInterval = m_intervalModel.nextInterval();
DEBUG_LOG(m_logger) << "onIntervalForwardClicked " << std::chrono::milliseconds(targetInterval.first.time_since_epoch()).count();
DEBUG_LOG() << "onIntervalForwardClicked " << std::chrono::milliseconds(targetInterval.first.time_since_epoch()).count();
m_avaCtrl->setAbsPosition(m_playbackApp.dialogId(), ALL_STREAMS(), targetInterval.first);
}
@@ -210,8 +210,6 @@ private:
bool m_videoScreenSelectionDone { false };
bool m_timelineIsComplete { false };
ButtonStates m_buttonStateBeforePlaybackAppPause { ButtonStates::AllOff };
LOGGER_T m_logger;
};
}
@@ -23,7 +23,6 @@ UsedStreamsModel::UsedStreamsModel(const std::shared_ptr<Interface::Dtc> avmDtc,
, m_dummyId(-10000000)
, m_menuStruct(ms)
, m_streamNameMapping(streamNameMapping)
, m_logger(getLogger("UsedStreamsModel"))
{
Q_ASSERT(streamNameMapping);
@@ -130,7 +129,7 @@ bool UsedStreamsModel::dropMimeData(const QMimeData *data, Qt::DropAction action
if (!checkDrop(data, index(row, column), parent, action))
return false;
INFO_LOG(m_logger) << "dropMimeData: action = " << action
INFO_LOG() << "dropMimeData: action = " << action
<< ", row = " << row
<< ", parent: valid = " << parent.isValid();
@@ -201,7 +200,7 @@ bool UsedStreamsModel::canDropMimeData(const QMimeData *data, Qt::DropAction act
stream >> idParent >> idItem >> group >> itemData >> mountId;
ms = itemData.value<StreamModelData>();
INFO_LOG(m_logger) << "Insert:"
INFO_LOG() << "Insert:"
<< "\n ms.name=" << ms.name
<< "\n ms.isGroup=" << ms.isGroup
<< "\n ms.parentId=" << ms.parentId
@@ -302,7 +301,7 @@ void UsedStreamsModel::insertChildren(NGLTreeItem *parent, int parentId, const s
if (me.isGroup())
{
DEBUG_LOG(m_logger) << "insertChildren"
DEBUG_LOG() << "insertChildren"
<< me.mountingPointId()
<< me.name();
insertChildren(treeItem, me.id(), entries);
@@ -336,7 +335,7 @@ bool UsedStreamsModel::checkSingleItem(NGLTreeItem *target, StreamModelData &toC
bool retValue = true;
if (!target)
{
ERROR_LOG(m_logger) << "Nullptr exception";
ERROR_LOG() << "Nullptr exception";
return false;
}
else
@@ -344,10 +343,10 @@ bool UsedStreamsModel::checkSingleItem(NGLTreeItem *target, StreamModelData &toC
StreamModelData msTarget = target->data().value<StreamModelData>();
if (msTarget.id == toCheck.parentId)
DEBUG_LOG(m_logger) << "Drag&drag in same folder.";
DEBUG_LOG() << "Drag&drag in same folder.";
else if (msTarget.isGroup && toCheck.isGroup)
{
DEBUG_LOG(m_logger) << "Trying to drop folder into folder";
DEBUG_LOG() << "Trying to drop folder into folder";
retValue = false;
}
else
@@ -429,18 +428,18 @@ bool UsedStreamsModel::checkDrop(const QMimeData *data, const QModelIndex &index
else if ((movedFolders.at(0) != item.parentId) && (movedFolders.contains(item.parentId)) && (action == Qt::MoveAction))
{
DEBUG_LOG(m_logger) << "Ignoring items in sub folder while moving.";
DEBUG_LOG() << "Ignoring items in sub folder while moving.";
continue;
}
else if (!movedFolders.contains(item.parentId) && (action == Qt::MoveAction))
{
DEBUG_LOG(m_logger) << "Only allow items from same folder to be moved.";
DEBUG_LOG() << "Only allow items from same folder to be moved.";
return false;
}
if (!checkSingleItem(itemToCheck, item))
{
DEBUG_LOG(m_logger) << "Not able to add item with name: " << item.name;
DEBUG_LOG() << "Not able to add item with name: " << item.name;
return false;
}
@@ -453,7 +452,7 @@ bool UsedStreamsModel::checkDrop(const QMimeData *data, const QModelIndex &index
}
else
{
DEBUG_LOG(m_logger) << "More than one folder selected.";
DEBUG_LOG() << "More than one folder selected.";
return false;
}
}
@@ -464,7 +463,7 @@ bool UsedStreamsModel::checkDrop(const QMimeData *data, const QModelIndex &index
if (countDropped + countAgainst > 12)
{
DEBUG_LOG(m_logger) << "Trying to add to many items to folder";
DEBUG_LOG() << "Trying to add to many items to folder";
return false;
}
return true;
@@ -552,7 +551,7 @@ void UsedStreamsModel::onDataChanged(const InfrastructureManagement::MainStructu
const DataModification modType)
{
beginResetModel();
INFO_LOG(m_logger) << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount()
INFO_LOG() << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount()
<< " data.elements().size()=" << data.elements().size();
switch (modType)
@@ -563,7 +562,7 @@ void UsedStreamsModel::onDataChanged(const InfrastructureManagement::MainStructu
case DataModification::eAdded:
for (const InfrastructureManagement::StructureElement &se : data.elements())
{
INFO_LOG(m_logger) << "se.id()" << se.id()
INFO_LOG() << "se.id()" << se.id()
<< " se.displayName()" << se.displayName()
<< " m_rootItem->childCount()" << m_rootItem->childCount();
const QString newName = QString::fromStdString(se.displayName());
@@ -578,7 +577,7 @@ void UsedStreamsModel::onDataChangedMvs(const VideoTeam &data, const DataModific
{
beginResetModel();
INFO_LOG(m_logger) << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount();
INFO_LOG() << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount();
switch (modType)
{
@@ -587,7 +586,7 @@ void UsedStreamsModel::onDataChangedMvs(const VideoTeam &data, const DataModific
case DataModification::eModified:
case DataModification::eAdded:
INFO_LOG(m_logger) << "se.id()" << data.id()
INFO_LOG() << "se.id()" << data.id()
<< " se.displayName()" << data.streamName()
<< " m_rootItem->childCount()" << m_rootItem->childCount();
const QString newName = QString::fromStdString(data.streamName());
@@ -603,8 +602,8 @@ void UsedStreamsModel::onStreamNameDataChanged(int32_t mountingPointId, const QS
Q_UNUSED(internalName)
beginResetModel();
INFO_LOG(m_logger) << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount();
INFO_LOG(m_logger) << "se.id()" << mountingPointId
INFO_LOG() << "onDataChanged m_rootItem->childCount()" << m_rootItem->childCount();
INFO_LOG() << "se.id()" << mountingPointId
<< " se.displayName()" << displayName
<< " m_rootItem->childCount()" << m_rootItem->childCount();
updateStreamNames(mountingPointId, displayName, m_rootItem);
@@ -615,7 +614,7 @@ void UsedStreamsModel::onStreamNameDataChanged(int32_t mountingPointId, const QS
void UsedStreamsModel::updateStreamNames(const int mountingPointId, const QString &newName, NGLTreeItem *item)
{
INFO_LOG(m_logger) << "updateStreamNames mountingPointId=" << mountingPointId
INFO_LOG() << "updateStreamNames mountingPointId=" << mountingPointId
<< " newName=" << newName;
int childCount = item->childCount();
@@ -624,17 +623,17 @@ void UsedStreamsModel::updateStreamNames(const int mountingPointId, const QStrin
NGLTreeItem *child = item->child(i);
if (!child->data().canConvert<StreamModelData>())
ERROR_LOG(m_logger) << "Error convert item";
ERROR_LOG() << "Error convert item";
StreamModelData usedStream = child->data().value<StreamModelData>();
INFO_LOG(m_logger) << "i=" << i
INFO_LOG() << "i=" << i
<< " usedStream.mountingPointId=" << usedStream.mountingPointId
<< " usedStream.name=" << usedStream.name
<< " mountingPointId=" << mountingPointId
<< " newName=" << newName;
if (mountingPointId == usedStream.mountingPointId)
{
INFO_LOG(m_logger) << "Set new DisplayName id=" << usedStream.id
INFO_LOG() << "Set new DisplayName id=" << usedStream.id
<< " mountingPointId=" << usedStream.mountingPointId
<< " name=" << usedStream.name
<< " new Name =" << newName;
@@ -70,7 +70,6 @@ private:
int m_dummyId;
MenuStruct m_menuStruct;
StreamNameMapping *m_streamNameMapping;
NGL::INGLLogger &m_logger;
};
}
@@ -50,15 +50,14 @@ private:
TopicReplay::TopicReplay(DataInterface *dataIfc, bool isAudio)
: m_isAudio(isAudio)
, m_dataIfc(dataIfc)
, m_logger(getLogger("TopicReplay"))
{
DEBUG_LOG(m_logger) << "TopicReplay::TopicReplay()";
DEBUG_LOG() << "TopicReplay::TopicReplay()";
Q_ASSERT(dataIfc);
}
TopicReplay::~TopicReplay()
{
DEBUG_LOG(m_logger) << "TopicReplay::~TopicReplay()";
DEBUG_LOG() << "TopicReplay::~TopicReplay()";
if (m_isPlaying)
playbackStop();
@@ -66,7 +65,7 @@ TopicReplay::~TopicReplay()
QWidget *TopicReplay::createWidget()
{
DEBUG_LOG(m_logger) << "TopicReplay::createWidget()";
DEBUG_LOG() << "TopicReplay::createWidget()";
Q_ASSERT(!m_screenPlacementHelper);
if (m_isAudio)
@@ -81,19 +80,19 @@ QWidget *TopicReplay::createWidget()
void TopicReplay::slotSetScriptResponse(const AudioVideoManagement::AvaStreamInfo &streamInfo, AudioVideoManagement::AvaStreamState streamState)
{
if (streamState == AudioVideoManagement::AvaStreamState::NotPossible)
ERROR_LOG(m_logger) << "Script could not be set";
ERROR_LOG() << "Script could not be set";
else
ERROR_LOG(m_logger) << "Script set!";
ERROR_LOG() << "Script set!";
ERROR_LOG(m_logger) << "streamInfo: start" << streamInfo.duration.count();
ERROR_LOG(m_logger) << "streamState: " << static_cast<int>(streamState);
ERROR_LOG() << "streamInfo: start" << streamInfo.duration.count();
ERROR_LOG() << "streamState: " << static_cast<int>(streamState);
}
bool TopicReplay::playbackInit(const QJsonObject &attributes)
{
DEBUG_LOG(m_logger) << "TopicReplay::playbackInit()";
DEBUG_LOG(m_logger) << QJsonDocument(attributes).toJson();
DEBUG_LOG() << "TopicReplay::playbackInit()";
DEBUG_LOG() << QJsonDocument(attributes).toJson();
if (m_screenPlacementHelper && !m_isAudio)
m_screenPlacementHelper->show();
@@ -104,7 +103,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
AvaControl *ctrl = getAvaControl();
if (ctrl == nullptr)
{
ERROR_LOG(m_logger) << "no ava control!";
ERROR_LOG() << "no ava control!";
return false;
}
@@ -112,7 +111,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
if (!topicData.isValid)
{
ERROR_LOG(m_logger) << "topicData is invalid";
ERROR_LOG() << "topicData is invalid";
return false;
}
@@ -123,7 +122,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
PlaybackApp *app = m_isAudio ? m_dataIfc->audioPresentationApp() : m_dataIfc->videoPresentationApp();
if (app == nullptr || app->inUse())
{
ERROR_LOG(m_logger) << "app invalid or in use!";
ERROR_LOG() << "app invalid or in use!";
return false;
}
@@ -143,7 +142,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
if (!m_appHandle)
{
ERROR_LOG(m_logger) << "appHandle: missing app after creating appHandle!";
ERROR_LOG() << "appHandle: missing app after creating appHandle!";
return false;
}
@@ -151,7 +150,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
NGL::Settings s({});
bool isLocal = s.isDatabaseConnectionLocal();
DEBUG_LOG(m_logger) << "isLocal? " << isLocal;
DEBUG_LOG() << "isLocal? " << isLocal;
AvaScriptSource source;
if (isLocal)
@@ -169,7 +168,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
source = AvaScriptSource::ServerVideo;
}
DEBUG_LOG(m_logger) << "source: " << static_cast<int>(source);
DEBUG_LOG() << "source: " << static_cast<int>(source);
ctrl->setScript(m_appHandle.dialogId(), m_scriptName,
source, topicData.streamList(),
@@ -181,7 +180,7 @@ bool TopicReplay::playbackInit(const QJsonObject &attributes)
bool TopicReplay::playbackStart(int secondsOffset)
{
DEBUG_LOG(m_logger) << "TopicReplay::playbackStart()";
DEBUG_LOG() << "TopicReplay::playbackStart()";
if (m_screenPlacementHelper && !m_isAudio)
m_screenPlacementHelper->show();
@@ -189,7 +188,7 @@ bool TopicReplay::playbackStart(int secondsOffset)
AvaControl *ctrl = getAvaControl();
if (ctrl == nullptr)
{
ERROR_LOG(m_logger) << "ctrl == nullptr";
ERROR_LOG() << "ctrl == nullptr";
return false;
}
@@ -197,7 +196,7 @@ bool TopicReplay::playbackStart(int secondsOffset)
if (!m_appHandle)
{
ERROR_LOG(m_logger) << "appHandle: missing app!";
ERROR_LOG() << "appHandle: missing app!";
return false;
}
@@ -205,13 +204,13 @@ bool TopicReplay::playbackStart(int secondsOffset)
ctrl->startScript(m_appHandle.dialogId(), m_scriptName);
m_isPlaying = true;
DEBUG_LOG(m_logger) << "m_isPlaying = true";
DEBUG_LOG() << "m_isPlaying = true";
return true;
}
bool TopicReplay::playbackPause()
{
DEBUG_LOG(m_logger) << "TopicReplay::playbackPause()";
DEBUG_LOG() << "TopicReplay::playbackPause()";
if (m_screenPlacementHelper)
m_screenPlacementHelper->hide();
@@ -222,13 +221,13 @@ bool TopicReplay::playbackPause()
AvaControl *ctrl = getAvaControl();
if (ctrl == nullptr)
{
ERROR_LOG(m_logger) << "no ctrl!";
ERROR_LOG() << "no ctrl!";
return false;
}
if (!m_appHandle)
{
ERROR_LOG(m_logger) << "appHandle: missing app!";
ERROR_LOG() << "appHandle: missing app!";
return false;
}
@@ -238,7 +237,7 @@ bool TopicReplay::playbackPause()
bool TopicReplay::playbackStop()
{
DEBUG_LOG(m_logger) << "TopicReplay::playbackStop()";
DEBUG_LOG() << "TopicReplay::playbackStop()";
if (m_screenPlacementHelper)
m_screenPlacementHelper->hide();
@@ -249,13 +248,13 @@ bool TopicReplay::playbackStop()
AvaControl *ctrl = getAvaControl();
if (ctrl == nullptr)
{
ERROR_LOG(m_logger) << "no ctrl!";
ERROR_LOG() << "no ctrl!";
return false;
}
if (!m_appHandle)
{
ERROR_LOG(m_logger) << "appHandle: missing app!";
ERROR_LOG() << "appHandle: missing app!";
return false;
}
@@ -275,7 +274,7 @@ bool TopicReplay::exportTopic(const QJsonObject &attributes,
VdControl *ctrl = getVdControl();
if (ctrl == nullptr)
{
ERROR_LOG(m_logger) << "ctrl missing!";
ERROR_LOG() << "ctrl missing!";
exportNotifier->setExportFailed();
return false;
}
@@ -287,7 +286,7 @@ bool TopicReplay::exportTopic(const QJsonObject &attributes,
if (!topicData.isValid)
{
ERROR_LOG(m_logger) << "topicData is invalid";
ERROR_LOG() << "topicData is invalid";
exportNotifier->setExportFailed();
return false;
}
@@ -305,7 +304,7 @@ bool TopicReplay::exportTopic(const QJsonObject &attributes,
void TopicReplay::onWidgetPlaced(const QRect &geometry)
{
WARNING_LOG(m_logger) << "TopicReplay::onWidgetPlaced() - geo: " << geometry.x() << "/" << geometry.y()
WARNING_LOG() << "TopicReplay::onWidgetPlaced() - geo: " << geometry.x() << "/" << geometry.y()
<< " m_isAudio=" << m_isAudio;
m_dialogGeometry = geometry;
@@ -316,17 +315,17 @@ void TopicReplay::onWidgetPlaced(const QRect &geometry)
PlaybackApp *app = m_isAudio ? m_dataIfc->audioPresentationApp() : m_dataIfc->videoPresentationApp();
if (app == nullptr)
{
ERROR_LOG(m_logger) << "app missing!";
ERROR_LOG() << "app missing!";
return;
}
if (!app->inUse())
{
ERROR_LOG(m_logger) << "app not in use - waiting for playbackInit to aquire it";
ERROR_LOG() << "app not in use - waiting for playbackInit to aquire it";
return;
}
DEBUG_LOG(m_logger) << "setGeometry";
DEBUG_LOG() << "setGeometry";
app->setGeometry(*m_dialogGeometry);
}
@@ -25,7 +25,6 @@ CombatNetRadioDialog::CombatNetRadioDialog(LtsSession::LtsSession *session, cons
, m_ui(new Ui::CombatNetRadioDialog)
, m_menuGroup(menuGroup)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("CombatNetRadioDialog"))
{
m_ui->setupUi(this);
setUnchangeable(true);
@@ -60,7 +59,7 @@ bool CombatNetRadioDialog::init(const std::shared_ptr<Interface::Dtc> &avmDtc,
avmFtc->enableModifyCnrConfig() &&
avmFtc->enableRemoveCnrConfig()))
{
ERROR_LOG(m_logger) << "Could not enable topics";
ERROR_LOG() << "Could not enable topics";
return false;
}
@@ -79,7 +78,7 @@ bool CombatNetRadioDialog::init(const std::shared_ptr<Interface::Dtc> &avmDtc,
{
m_filter.reset();
m_model.reset();
ERROR_LOG(m_logger) << "Could not init model";
ERROR_LOG() << "Could not init model";
return false;
}
@@ -192,14 +191,14 @@ void CombatNetRadioDialog::onExportButtonClicked()
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
if (fileId > 0)
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
DEBUG_LOG() << "Saved file with id = " << fileId;
else
ERROR_LOG(m_logger) << "Could not save file in library ";
ERROR_LOG() << "Could not save file in library ";
}
void CombatNetRadioDialog::onImportButtonClicked()
{
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
DEBUG_LOG() << " onImportButtonClicked() ";
QByteArray content;
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml}, m_session->exerciseId(), FileManagement::toString(FileManagement::XmlType::AVMCombatNetRadio));
@@ -94,8 +94,5 @@ private:
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
ExerciseManagement::Interface::Dtc *m_exmDtc{nullptr};
std::shared_ptr<FileManagement::ForeignGuiInterface> m_flmGui;
LOGGER_T m_logger;
};
}
@@ -26,7 +26,6 @@ CombatNetRadioDialogModel::CombatNetRadioDialogModel(int32_t exerciseId, QObject
tr("Global")
}, parent)
, m_exerciseId(exerciseId)
, m_logger(getLogger("CombatNetRadioDialogModel"))
{
}
@@ -41,7 +40,7 @@ QVariant CombatNetRadioDialogModel::data(const QModelIndex &index, int role) con
switch (index.column())
{
case CHANNEL:
INFO_LOG(m_logger)<<"CombatNetRadioDialogModel::data role =" << role
INFO_LOG()<<"CombatNetRadioDialogModel::data role =" << role
<< " row = " << index.row();
return QString::fromStdString(m_cnrChannels.value(config.cnrChannelId()).name());
case RADIO_CIRCUIT:
@@ -62,14 +61,14 @@ QVariant CombatNetRadioDialogModel::data(const QModelIndex &index, int role) con
if (unit.id() != unitId)
return {};
INFO_LOG(m_logger) << " config.unitId()=" << unitId
INFO_LOG() << " config.unitId()=" << unitId
<< " Str=" << unit.name();
QString unitStr;
if (unit.designator().size() > 0)
unitStr = QString::fromStdString(unit.designator()) + QLatin1Char('/');
unitStr.append(QString::fromStdString(unit.tacticalIdentifier()));
INFO_LOG(m_logger) << "unitStr = " << unitStr;
INFO_LOG() << "unitStr = " << unitStr;
return unitStr;
}
@@ -99,7 +98,7 @@ bool CombatNetRadioDialogModel::init(const std::shared_ptr<Interface::Dtc> &avmD
if (!ppmDtc->visibleParties(m_parties, LtsSessionData::LtsSessionData::getInstance()->getVisibleParties(m_exerciseId)))
{
ERROR_LOG(m_logger) << "Could not retrieve visible Parties!";
ERROR_LOG() << "Could not retrieve visible Parties!";
return false;
}
m_units = ppmDtc->units();
@@ -46,8 +46,6 @@ private:
QMap<int32_t, CnrChannel> m_cnrChannels;
QMap<int32_t, ParticipantManagement::Party> m_parties;
QMap<int32_t, ParticipantManagement::Participant> m_units;
LOGGER_T m_logger;
};
@@ -92,7 +92,6 @@ EditCombatNetRadioDialog::EditCombatNetRadioDialog(const boost::optional<int32_t
, m_avmFtc(avmFtc)
, m_exmDtc(exmDtc)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("EditCombatNetRadioDialog"))
{
Q_ASSERT(ppmDtc);
Q_ASSERT(avmDtc);
@@ -174,7 +173,7 @@ bool EditCombatNetRadioDialog::apply()
if (m_ui->cbUnit->currentIndex() > 0)
{
request.unitId().set(m_ui->cbUnit->currentData().toInt());
INFO_LOG(m_logger)<< "currentIndex="<<m_ui->cbUnit->currentIndex()
INFO_LOG()<< "currentIndex="<<m_ui->cbUnit->currentIndex()
<< " unitId ="<<request.unitId().get();
}
@@ -190,7 +189,7 @@ void EditCombatNetRadioDialog::init(LtsSession::LtsSession *session)
QMap<qint32, ParticipantManagement::Party> parties;
if (!m_ppmDtc->visibleParties(parties, LtsSessionData::LtsSessionData::getInstance()->getVisibleParties(m_exerciseId)))
ERROR_LOG(m_logger) << "Could not retrieve visible Parties!";
ERROR_LOG() << "Could not retrieve visible Parties!";
for (const ParticipantManagement::Party &party : std::as_const(parties))
m_ui->cbParty->addItem(ParticipantManagement::trPartyName(party.name()), party.id());
@@ -490,10 +489,10 @@ void EditCombatNetRadioDialog::onPartyIndexChanged(int index)
if (unit.designator().size() > 0)
{
unitStr = QString::fromStdString(unit.designator()) + QLatin1Char('/');
INFO_LOG(m_logger)<<"Designator != leer: unitStr = " << unitStr;
INFO_LOG()<<"Designator != leer: unitStr = " << unitStr;
}
unitStr += QString::fromStdString(unit.tacticalIdentifier());
INFO_LOG(m_logger) << "unitStr =" << unitStr
INFO_LOG() << "unitStr =" << unitStr
<< " id =" << unit.id();
m_ui->cbUnit->addItem(unitStr, unit.id());
@@ -562,14 +561,14 @@ void EditCombatNetRadioDialog::onExportButtonClicked()
QByteArray byteArray = cnrConfigRequestToJson();
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_exerciseId, byteArray);
if (fileId > 0)
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
DEBUG_LOG() << "Saved file with id = " << fileId;
else
ERROR_LOG(m_logger) << "Could not save file in library ";
ERROR_LOG() << "Could not save file in library ";
}
void EditCombatNetRadioDialog::onImportButtonClicked()
{
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
DEBUG_LOG() << " onImportButtonClicked() ";
QByteArray content;
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml}, m_exerciseId, FileManagement::toString(FileManagement::XmlType::AVMEditCombatNetRadio));
@@ -589,7 +588,7 @@ void EditCombatNetRadioDialog::onImportButtonClicked()
{
ModifyCnrConfigRequest req = jsonToModifyCnrConfig(content);
setUiValues(toConfig(req));
INFO_LOG(m_logger) << "--- onImportButtonClicked() ";
INFO_LOG() << "--- onImportButtonClicked() ";
}
}
}
@@ -117,7 +117,5 @@ private:
QVector<QString> m_takenNames;
std::unique_ptr<LtsUtils::RequestHelper> m_requestHelper;
bool m_isGlobal;
LOGGER_T m_logger;
};
}
@@ -15,7 +15,6 @@ LoadCombatNetRadioDialog::LoadCombatNetRadioDialog(const QByteArray &data,
: LtsWidgets::LtsFramelessDialog(parent, LtsWidgets::Behaviour::Modal)
, m_ui(new Ui::LoadCombatNetRadioDialog)
, m_model(new LoadCombatNetRadioDialogModel(data, session))
, m_logger(getLogger("LoadCombatNetRadioDialog"))
{
m_ui->setupUi(this);
m_ui->dataView->setModel(m_model);
@@ -60,7 +60,5 @@ private:
std::unique_ptr<Ui::LoadCombatNetRadioDialog> m_ui;
LoadCombatNetRadioDialogModel *m_model;
bool m_isApplied = false;
LOGGER_T m_logger;
};
}
@@ -34,9 +34,8 @@ LoadCombatNetRadioDialogModel::LoadCombatNetRadioDialogModel(const QByteArray &d
tr("Conflict(s)")
}, parent)
, m_exerciseId(session == nullptr ? 0 : session->exerciseId())
, m_logger(getLogger("LoadCombatNetRadioDialogModel"))
{
DEBUG_LOG(m_logger) << "Own exercise id: " << m_exerciseId;
DEBUG_LOG() << "Own exercise id: " << m_exerciseId;
if (session != nullptr)
{
@@ -45,28 +44,28 @@ LoadCombatNetRadioDialogModel::LoadCombatNetRadioDialogModel(const QByteArray &d
if (!session->getDtc<AudioVideoManagement::DataInterface>(avmDtc)
|| !avmDtc->enableCnrChannel()
|| !avmDtc->enableCnrConfig())
ERROR_LOG(m_logger) << "Could not get AVM data";
ERROR_LOG() << "Could not get AVM data";
else
{
m_cnrChannels = avmDtc->cnrChannels();
m_cnrConfigs = avmDtc->cnrConfigs();
}
DEBUG_LOG(m_logger) << "cnrconfigs: " << m_cnrConfigs.size();
DEBUG_LOG(m_logger) << "ownExerciseId: " << m_exerciseId;
DEBUG_LOG() << "cnrconfigs: " << m_cnrConfigs.size();
DEBUG_LOG() << "ownExerciseId: " << m_exerciseId;
std::shared_ptr<ExerciseManagement::Interface::Dtc> exmDtc;
if (!session->getDtc<ExerciseManagement::DataInterface>(exmDtc)
|| !exmDtc->enableExercise())
ERROR_LOG(m_logger) << "Could not get EXM data";
ERROR_LOG() << "Could not get EXM data";
else
m_exercises = exmDtc->exercises();
DEBUG_LOG(m_logger) << "exercises: " << m_exercises.size();
DEBUG_LOG() << "exercises: " << m_exercises.size();
}
else
ERROR_LOG(m_logger) << "Got invalid session.";
ERROR_LOG() << "Got invalid session.";
m_vecData = jsonToCnrConfigVector(data);
@@ -378,7 +377,7 @@ QVector<Core::RemoveElementRequest> LoadCombatNetRadioDialogModel::removeRequest
{
if (!m_conflictedCnrIds.contains(idxCounter))
{
WARNING_LOG(m_logger) << "Tried to get remove request for row " << idxCounter << " but it is not present.";
WARNING_LOG() << "Tried to get remove request for row " << idxCounter << " but it is not present.";
continue;
}
@@ -107,7 +107,5 @@ private:
QVector<Qt::CheckState> m_includeStates;
QVector<int32_t> m_disabledRows;
QVector<Conflicts> m_conflicts;
LOGGER_T m_logger;
};
}
@@ -67,7 +67,6 @@ EditFrequencyPlanningDialog::EditFrequencyPlanningDialog(LtsSession::LtsSession
, m_exerciseId(session->exerciseId())
, m_isEdit(EditFrequencyPlanningSetResourceDialog::DialogMode::Assign)
, m_activeFrequencyPlanningStatus(0)
, m_logger(getLogger("EditFrequencyPlanningDialog"))
{
m_ui->setupUi(this);
@@ -139,7 +138,7 @@ void EditFrequencyPlanningDialog::retranslate()
void EditFrequencyPlanningDialog::onRemoveFrequencyPlanningReply(const Core::FunctionReplyObject &reply)
{
if (reply.error())
ERROR_LOG(m_logger) << reply.str();
ERROR_LOG() << reply.str();
m_requestHelper->requestReply(reply);
}
@@ -186,7 +185,7 @@ void EditFrequencyPlanningDialog::onAddClicked()
if (cnrConfigId <= 0)
return;
DEBUG_LOG(m_logger) << "---RessourceDialog aufrufen...."
DEBUG_LOG() << "---RessourceDialog aufrufen...."
<< " cnrConfigId: " << cnrConfigId
<< " radioCircuit: " << cnrConfigRow.radioCircuit()
<< " FrequencySetId: " << m_frequencyDataModel->getFrequencySetId();
@@ -271,7 +270,7 @@ void EditFrequencyPlanningDialog::enableSelectedUnassignButton()
m_buttonBox->setText(LtsWidgets::DialogButton::Add, tr("Assign"));
}
DEBUG_LOG(m_logger) << "---enableAssignUnassignButtons()...."
DEBUG_LOG() << "---enableAssignUnassignButtons()...."
<< " cnrConfigId: " << cnrConfigId
<< " radioCircuitId: " << cnrConfigRow.radioCircuit();
@@ -283,7 +282,7 @@ void EditFrequencyPlanningDialog::enableSelectedUnassignButton()
void EditFrequencyPlanningDialog::onAssignRadioCircuit(const FrequencyPlanningData &fpd)
{
DEBUG_LOG(m_logger) << "---onAssignRadioCircuit()...."
DEBUG_LOG() << "---onAssignRadioCircuit()...."
<< "CnrConfigId: " << fpd.cnrConfigId();
m_frequencyDataModel->setFrequencyPlanningData(fpd);
@@ -371,14 +370,14 @@ void EditFrequencyPlanningDialog::onExportButtonClicked()
QByteArray byteArray = m_frequencyDataModel->uiToJson();
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
if (fileId > 0)
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
DEBUG_LOG() << "Saved file with id = " << fileId;
else
ERROR_LOG(m_logger) << "Could not save file in library ";
ERROR_LOG() << "Could not save file in library ";
}
void EditFrequencyPlanningDialog::onImportButtonClicked()
{
DEBUG_LOG(m_logger) << "--- onImportButtonClicked() ";
DEBUG_LOG() << "--- onImportButtonClicked() ";
QByteArray content;
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml}, m_session->exerciseId(), FileManagement::toString(FileManagement::XmlType::AVMEditFrequencyPlanning));
@@ -150,11 +150,10 @@ EditFrequencyPlanningFrequencyDataModel::EditFrequencyPlanningFrequencyDataModel
, m_ismDtc(ismDtc)
, m_ppmDtc(ppmDtc)
, m_initPlan(initPlanning)
, m_logger(getLogger("EditFrequencyPlanningDataModel"))
{
Q_ASSERT(avmDtc);
Q_ASSERT(ppmDtc);
DEBUG_LOG(m_logger) << "---EditFrequencyPlanningDataMod m_frequencyPlanningData[c.id()];el() ";
DEBUG_LOG() << "---EditFrequencyPlanningDataMod m_frequencyPlanningData[c.id()];el() ";
int frequencySetId = initPlanning.frequencySetId();
std::vector<FrequencySetDataWithId> fsdVec = m_avmDtc->frequencySet(frequencySetId).data();
@@ -385,14 +384,14 @@ QVariant EditFrequencyPlanningFrequencyDataModel::data(const QModelIndex &index,
return QStringLiteral("-");
const auto unit = m_units[unitId];
INFO_LOG(m_logger) << " config.unitId()=" << unitId
INFO_LOG() << " config.unitId()=" << unitId
<< " Str=" << unit.name();
QString unitStr;
if (unit.designator().size() > 0)
unitStr = QString::fromStdString(unit.designator()) + QLatin1Char('/');
unitStr.append(QString::fromStdString(unit.tacticalIdentifier()));
INFO_LOG(m_logger) << "unitStr = " << unitStr;
INFO_LOG() << "unitStr = " << unitStr;
return unitStr;
}
@@ -607,7 +606,7 @@ void EditFrequencyPlanningFrequencyDataModel::setFrequencePlanningId(int id)
m_initPlan.id(id);
return;
}
WARNING_LOG(m_logger) << "Trying to set a new frequency planning id but there is alreay an id set ("
WARNING_LOG() << "Trying to set a new frequency planning id but there is alreay an id set ("
<< m_initPlan.id() << " - " << id << ")";
}
@@ -784,12 +783,12 @@ bool EditFrequencyPlanningFrequencyDataModel::checkResourceAssignments()
{
if (inner != outer)
{
DEBUG_LOG(m_logger) << "---ist ungleich cnrConfigId(A): " << p.cnrConfigId()
DEBUG_LOG() << "---ist ungleich cnrConfigId(A): " << p.cnrConfigId()
<< " (B): " << pI.cnrConfigId();
}
else
{
DEBUG_LOG(m_logger) << "---ist gleich cnrConfigId(A): " << p.cnrConfigId()
DEBUG_LOG() << "---ist gleich cnrConfigId(A): " << p.cnrConfigId()
<< " (B): " << pI.cnrConfigId();
if (!m_multipleAssignedCnrIds.contains(p.cnrConfigId()) )
m_multipleAssignedCnrIds.append(p.cnrConfigId());
@@ -809,7 +808,7 @@ bool EditFrequencyPlanningFrequencyDataModel::checkResourceAssignments()
qs.append(QString::number(id));
qs.append(QStringLiteral(", "));
}
DEBUG_LOG(m_logger) << "---Number of multiple assigned frequency set data: " << m_multipleAssignedCnrIds.size()
DEBUG_LOG() << "---Number of multiple assigned frequency set data: " << m_multipleAssignedCnrIds.size()
<< " cnrConfigIds: " << qs;
#endif
return bOk;
@@ -24,7 +24,6 @@ EditFrequencyPlanningResourceDataModel::EditFrequencyPlanningResourceDataModel(c
}, parent)
, m_assignedFrequencySetDataIds(assignedFrequencySetDataIds)
, m_frequencyBand(frequencyBand)
, m_logger(getLogger("EditFrequencyPlanningResourceDataModel"))
{
}
@@ -89,7 +88,7 @@ bool EditFrequencyPlanningResourceDataModel::isFiltered(const AudioVideoManageme
if (m_assignedFrequencySetDataIds.contains(data.id()))
{
DEBUG_LOG(m_logger) << "---m_assignments.size(): " << m_assignedFrequencySetDataIds.size()
DEBUG_LOG() << "---m_assignments.size(): " << m_assignedFrequencySetDataIds.size()
<< " frequencySetDataId: " << data.id() << " ist bereits enthalten";
return true;
}
@@ -42,7 +42,6 @@ EditFrequencyPlanningResourceDialog::EditFrequencyPlanningResourceDialog(int fre
, m_ui(new Ui::EditFrequencyPlanningResourceDialog)
, m_frequencySetId(frequencySetId)
, m_dialogMode(dialogMode)
, m_logger(getLogger("EditFrequencyPlanningResourceDialog"))
{
m_ui->setupUi(this);
@@ -32,7 +32,6 @@ EditFrequencyPlanningSetResourceDialog::EditFrequencyPlanningSetResourceDialog(
, m_avmDtc(avmDtc)
, m_frequencyResourceDataModel(nullptr)
, m_config(m_avmDtc->cnrConfig(cnrConfigId))
, m_logger(getLogger("EditFrequencyPlanningSetResourceDialog"))
{
m_ui->setupUi(this);
@@ -38,11 +38,10 @@ FrequencyPlanningDialog::FrequencyPlanningDialog(LtsSession::LtsSession *session
, m_ismDtc(nullptr)
, m_flmGui(nullptr)
, m_activeFrequencyPlanningStatus(0)
, m_logger(getLogger("FrequencyPlanningDialog"))
{
m_ui->setupUi(this);
DEBUG_LOG(m_logger) << "---FrequencyPlanningDialog() ";
DEBUG_LOG() << "---FrequencyPlanningDialog() ";
m_ui->dataView->setSelectionMode(QAbstractItemView::SingleSelection);
m_ui->dataView->treeView()->setSelectionBehavior(QAbstractItemView::SelectRows);
@@ -92,7 +91,7 @@ bool FrequencyPlanningDialog::init(const std::shared_ptr<Interface::Dtc> &avmDtc
avmDtc->enableActiveFrequencyPlanning() &&
ismDtc->enableMainStructureElement()))
{
ERROR_LOG(m_logger) << "Could not enable topics";
ERROR_LOG() << "Could not enable topics";
return false;
}
@@ -109,7 +108,7 @@ bool FrequencyPlanningDialog::init(const std::shared_ptr<Interface::Dtc> &avmDtc
{
delete m_model;
m_model = nullptr;
ERROR_LOG(m_logger) << "Could not init model";
ERROR_LOG() << "Could not init model";
return false;
}
@@ -301,7 +300,7 @@ void FrequencyPlanningDialog::onEditClicked()
return;
const FrequencyPlanning &fp = m_model->data(currentIndex, Qt::UserRole).value<FrequencyPlanning>();
DEBUG_LOG(m_logger) << "---onEditClicked() FrequencyPlanningId: " << fp.id() << " FrequencySetDataId: " << fp.frequencySetId();
DEBUG_LOG() << "---onEditClicked() FrequencyPlanningId: " << fp.id() << " FrequencySetDataId: " << fp.frequencySetId();
m_copy = false;
showEditDialog(m_model->data(currentIndex, Qt::UserRole).value<FrequencyPlanning>());
@@ -441,14 +440,14 @@ void FrequencyPlanningDialog::onExportButtonClicked()
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
if (fileId > 0)
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
DEBUG_LOG() << "Saved file with id = " << fileId;
else
ERROR_LOG(m_logger) << "Could not save file in library ";
ERROR_LOG() << "Could not save file in library ";
}
void FrequencyPlanningDialog::onImportButtonClicked()
{
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
DEBUG_LOG() << " onImportButtonClicked() ";
if (m_model->rowCount() > 0)
{
QHash<LtsWidgets::Button, QString> texts({{LtsWidgets::Button::Yes, tr("Ok")}});
@@ -485,7 +484,7 @@ void FrequencyPlanningDialog::onImportButtonClicked()
return m_avmFtc->modifyFrequencyPlanningRequest(request, this);
});
}
INFO_LOG(m_logger) << "--- onImportButtonClicked() ";
INFO_LOG() << "--- onImportButtonClicked() ";
}
}
}
@@ -124,7 +124,5 @@ private:
std::shared_ptr<FileManagement::ForeignGuiInterface> m_flmGui;
QMap<int, EditFrequencyPlanningDialog*> m_editDlgMap;
int m_activeFrequencyPlanningStatus;
LOGGER_T m_logger;
};
}
@@ -21,9 +21,8 @@ FrequencyPlanningDialogModel::FrequencyPlanningDialogModel(int32_t exerciseId, Q
tr("Active")
}, parent)
, m_exerciseId(exerciseId)
, m_logger(getLogger("FrequencyPlanningDialogModel"))
{
DEBUG_LOG(m_logger) << "---FrequencyPlanningDialogModel() ";
DEBUG_LOG() << "---FrequencyPlanningDialogModel() ";
}
QVariant FrequencyPlanningDialogModel::data(const QModelIndex &index, int role) const
@@ -83,7 +82,7 @@ FrequencySet FrequencyPlanningDialogModel::frequencySetByIndex(const QModelIndex
void FrequencyPlanningDialogModel::onFrequencyPlanningChanged(const FrequencyPlanning &data, DataModification modType)
{
INFO_LOG(m_logger) << "onFrequencyPlanningChanged "
INFO_LOG() << "onFrequencyPlanningChanged "
<< " data.exerciseId()" << data.exerciseId()
<< " m_exerciseId=" << m_exerciseId;
if ((data.exerciseId().is_set() && data.exerciseId().get() != m_exerciseId)
@@ -101,7 +100,7 @@ QByteArray FrequencyPlanningDialogModel::modelToJson()
for (int row = 0; row < rowCount(); row++)
{
DEBUG_LOG(m_logger) << "row =" << ": " << row;
DEBUG_LOG() << "row =" << ": " << row;
QJsonObject inner;
const FrequencyPlanning &planning = m_vecData.at(row);
@@ -53,7 +53,6 @@ private:
QMap<int32_t, FrequencySet> m_frequencySets;
friend class FrequencyPlanningDialogProxyModel;
LOGGER_T m_logger;
};
class FrequencyPlanningDialogProxyModel final : public LtsWidgets::LtsColumnFilterProxyModel
@@ -22,7 +22,6 @@ FrequencyPlanningWidget::FrequencyPlanningWidget(const std::shared_ptr<Interface
, m_ui(new Ui::FrequencyPlanningWidget)
, m_assignedFrequencySetDataIds(allocatedDataSets)
, m_avmDtc(avmDtc)
, m_logger(getLogger("EditFrequencyPlanningResourceDialog"))
{
m_ui->setupUi(this);
@@ -15,9 +15,8 @@ InitFrequencyPlanningDialog::InitFrequencyPlanningDialog(LtsSession::LtsSession
, m_ui(new Ui::InitFrequencyPlanningDialog)
, m_dateOfCreation(session->partitionTime())
, m_session(session)
, m_logger(getLogger("InitFrequencyPlanningDialog"))
{
DEBUG_LOG(m_logger) << "---InitFrequencyPlanningDialog() ";
DEBUG_LOG() << "---InitFrequencyPlanningDialog() ";
m_ui->setupUi(this);
QMap<int32_t, FrequencySet> frequencySets = avmDtc->frequencySets();
@@ -40,7 +40,5 @@ private:
Ui::InitFrequencyPlanningDialog *m_ui;
qint64 m_dateOfCreation;
LtsSession::LtsSession *m_session;
LOGGER_T m_logger;
};
}
@@ -13,7 +13,6 @@ LoadFrequencyPlanningDialog::LoadFrequencyPlanningDialog(const QByteArray &data,
: LtsWidgets::LtsFramelessDialog(parent, LtsWidgets::Behaviour::Modal)
, m_ui(new Ui::LoadFrequencyPlanningDialog)
, m_model(new LoadFrequencyPlanningDialogModel(initPlan, avmDtc, ismDtc, this))
, m_logger(getLogger("LoadFrequencyPlanningDialog"))
{
m_ui->setupUi(this);
@@ -62,7 +62,5 @@ private:
std::unique_ptr<Ui::LoadFrequencyPlanningDialog> m_ui;
LoadFrequencyPlanningDialogModel *m_model;
bool m_isApplied = false;
LOGGER_T m_logger;
};
}
@@ -140,10 +140,9 @@ LoadFrequencyPlanningDialogModel::LoadFrequencyPlanningDialogModel(const Frequen
, m_initPlan(initPlan)
, m_parentPlan(initPlan)
, m_exerciseId(initPlan.exerciseId().is_set() ? initPlan.exerciseId().get() : 0)
, m_logger(getLogger("EditFrequencyPlanningDataModel"))
{
Q_ASSERT(avmDtc);
DEBUG_LOG(m_logger) << "---EditFrequencyPlanningDataMod m_frequencyPlanningData[c.id()];el() ";
DEBUG_LOG() << "---EditFrequencyPlanningDataMod m_frequencyPlanningData[c.id()];el() ";
m_initPlan.data().clear();
@@ -168,7 +167,7 @@ void LoadFrequencyPlanningDialogModel::setData(const QByteArray &data)
if (m_initPlan.frequencySetId() != obj.value<int>("frequencySetId"))
{
ERROR_LOG(m_logger) << "false frequency set!";
ERROR_LOG() << "false frequency set!";
return;
}
@@ -620,7 +619,7 @@ void LoadFrequencyPlanningDialogModel::checkConflicts()
if (!item || !item->data().canConvert<ItemData>())
{
DEBUG_LOG(m_logger) << "Could not get item for row " << row;
DEBUG_LOG() << "Could not get item for row " << row;
continue;
}
@@ -874,7 +873,7 @@ QVector<FrequencyPlanningData> LoadFrequencyPlanningDialogModel::planningData()
if (!item || !item->data().canConvert<ItemData>())
{
DEBUG_LOG(m_logger) << "Could not get item for row " << row;
DEBUG_LOG() << "Could not get item for row " << row;
continue;
}
@@ -32,7 +32,6 @@ ElokaDialog::ElokaDialog(LtsSession::LtsSession *session, AvaSession *avaSession
, m_usedCnr()
, m_usedTvc()
, m_usedAnnouncement()
, m_logger(getLogger("ElokaDialog"))
{
Q_ASSERT(session);
Q_ASSERT(avaSession);
@@ -110,7 +109,7 @@ void ElokaDialog::setAvaSessionStatus(bool established)
void ElokaDialog::onAddClicked()
{
DEBUG_LOG(m_logger) << "**** onAddClicked() ";
DEBUG_LOG() << "**** onAddClicked() ";
ElokaEditDialog *dialog = new ElokaEditDialog(m_session, m_avaSession, m_avmDtc, m_streamNameMapping,
ElokaData(), this);
@@ -129,7 +128,7 @@ void ElokaDialog::onAddClicked()
void ElokaDialog::onEditClicked()
{
DEBUG_LOG(m_logger) << "**** onEditClicked() ";
DEBUG_LOG() << "**** onEditClicked() ";
const QModelIndex idx = m_ui->tvEloka->currentIndex();
@@ -155,7 +154,7 @@ void ElokaDialog::onEditClicked()
void ElokaDialog::onRemoveClicked()
{
DEBUG_LOG(m_logger) << "**** onRemoveClicked() ";
DEBUG_LOG() << "**** onRemoveClicked() ";
const QModelIndex idx = m_ui->tvEloka->currentIndex();
@@ -185,7 +184,7 @@ void ElokaDialog::onPrint()
void ElokaDialog::onQueryElokaResponse(const QVector<AvaEloka> &&eloka)
{
DEBUG_LOG(m_logger) << "onQueryElokaResponse";
DEBUG_LOG() << "onQueryElokaResponse";
m_elokaListCollector.start();
m_elokaModel->clear();
@@ -110,7 +110,6 @@ ElokaEditDialog::ElokaEditDialog(LtsSession::LtsSession *session, AvaSession *av
, m_tvcConfigMap()
, m_announcementMap()
, m_userProfile()
, m_logger(getLogger("ElokaEditDialog"))
{
Q_ASSERT(session);
Q_ASSERT(avaSession);
@@ -352,7 +351,7 @@ void ElokaEditDialog::getActiveCnrs()
void ElokaEditDialog::onCnrConfigChanged(const CnrConfig &data,
DataModification modType)
{
DEBUG_LOG(m_logger) << "onCnrConfigChanged";
DEBUG_LOG() << "onCnrConfigChanged";
switch (modType)
{
case DataModification::eAdded:
@@ -375,7 +374,7 @@ void ElokaEditDialog::onCnrConfigChanged(const CnrConfig &data,
void ElokaEditDialog::onTvcConfigChanged(const TvcConfig &data,
DataModification modType)
{
DEBUG_LOG(m_logger) << "onTvcConfigChanged";
DEBUG_LOG() << "onTvcConfigChanged";
switch (modType)
{
@@ -399,7 +398,7 @@ void ElokaEditDialog::onTvcConfigChanged(const TvcConfig &data,
void ElokaEditDialog::onStreamChanged(const Stream &data,
DataModification modType)
{
DEBUG_LOG(m_logger) << "onStreamChanged";
DEBUG_LOG() << "onStreamChanged";
if ((data.type() != StreamType_def::AudioOut) &&
(data.type() != StreamType_def::AudioInOut))
@@ -428,7 +427,7 @@ void ElokaEditDialog::onCnrTvcProfileChanged(const CnrTvcProfile &data,
DataModification modType)
{
Q_UNUSED(modType);
DEBUG_LOG(m_logger) << "onCnrTvcProfileChanged";
DEBUG_LOG() << "onCnrTvcProfileChanged";
if (data.exerciseId() != m_session->exerciseId() ||
data.operatorId() != LtsSessionData::LtsSessionData::getInstance()->getOperatorId())
@@ -536,7 +535,7 @@ void ElokaEditDialog::setCurrentCircuit(const ElokaData &data)
void ElokaEditDialog::onGetElokaListResponse(const QVector<QString> &actions)
{
DEBUG_LOG(m_logger) << "onGetElokaListResponse";
DEBUG_LOG() << "onGetElokaListResponse";
if (!m_elokaData.internalName.isEmpty())
setUnchangeable(true);
@@ -20,7 +20,6 @@ ElokaModel::ElokaModel(LtsSession::LtsSession *session, QObject *parent)
tr("Start Time")
},
parent)
, m_logger(getLogger("ElokaModel"))
{
Q_ASSERT(session);
@@ -24,7 +24,6 @@ MvsDialog::MvsDialog(const QString &menuGroup, LtsSession::LtsSession *session,
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_avmDtc(nullptr)
, m_avmFtc(nullptr)
, m_logger(getLogger("MvsDialog"))
{
m_ui->setupUi(this);
setOnlineHelpFilename(QStringLiteral("Situation-Configuration_Video_Teams"));
@@ -59,7 +58,7 @@ bool MvsDialog::init(const std::shared_ptr<AudioVideoManagement::Interface::Dtc>
{
delete m_model;
m_model = nullptr;
ERROR_LOG(m_logger) << "Could not init model";
ERROR_LOG() << "Could not init model";
return false;
}
@@ -179,14 +178,14 @@ void MvsDialog::onExportButtonClicked()
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
if (fileId > 0)
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
DEBUG_LOG() << "Saved file with id = " << fileId;
else
ERROR_LOG(m_logger) << "Could not save file in library ";
ERROR_LOG() << "Could not save file in library ";
}
void MvsDialog::onImportButtonClicked()
{
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
DEBUG_LOG() << " onImportButtonClicked() ";
QByteArray content;
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml}, m_session->exerciseId(), FileManagement::toString(FileManagement::XmlType::AVMMvsDialog));
@@ -212,7 +211,7 @@ void MvsDialog::onImportButtonClicked()
return m_avmFtc->videoTeamModifyRequest(request, this);
});
}
INFO_LOG(m_logger) << "--- onImportButtonClicked() ";
INFO_LOG() << "--- onImportButtonClicked() ";
}
}
}
@@ -83,7 +83,5 @@ private:
std::shared_ptr<AudioVideoManagement::Interface::Dtc> m_avmDtc;
std::shared_ptr<AudioVideoManagement::Interface::Ftc> m_avmFtc;
std::shared_ptr<FileManagement::ForeignGuiInterface> m_flmGui;
LOGGER_T m_logger;
};
}
@@ -42,7 +42,6 @@ EditVideoTeamDialog::EditVideoTeamDialog(int32_t id, const std::shared_ptr<Audio
, m_exerciseId(exerciseId)
, m_id(id)
, m_avmDtc(avmDtc)
, m_logger(getLogger("EditVideoTeamDialog"))
{
Q_ASSERT(m_id >= 0);
m_ui->setupUi(this);
@@ -64,7 +64,5 @@ private:
std::shared_ptr<AudioVideoManagement::Interface::Dtc> m_avmDtc;
QMap<QString, int32_t> m_takenTeams;
QMap<QString, int32_t> m_teamsToIndex;
LOGGER_T m_logger;
};
}
@@ -18,7 +18,6 @@ MvsModel::MvsModel(QObject *parent)
tr("Stream Name")
}, parent)
, m_exerciseId(-1)
, m_logger(getLogger("MvsModel"))
{}
QVariant MvsModel::data(const QModelIndex &index, int role) const
@@ -78,7 +77,7 @@ QByteArray MvsModel::modelToJson()
for (int row = 0; row < rowCount(); row++)
{
DEBUG_LOG(m_logger) << "row =" << ": " << row;
DEBUG_LOG() << "row =" << ": " << row;
QJsonObject inner;
const VideoTeam &config = m_vecData.at(row);
inner[QStringLiteral("id")] = config.id();
@@ -119,7 +118,7 @@ QVector<VideoTeamModifyRequest> MvsModel::jsonToVideoTeamVector(const QByteArray
config.exerciseId(m_exerciseId);
config.streamName(obj[QStringLiteral("streamName")].toString().toStdString());
INFO_LOG(m_logger) << "insertRow: " << config.name()
INFO_LOG() << "insertRow: " << config.name()
<< " VideoTeamId=" << config.id();
result.append(std::move(config));
}
@@ -39,8 +39,6 @@ private:
int32_t m_exerciseId;
QMap<int32_t, AudioVideoManagement::VideoTeam> m_videoTeams;
LOGGER_T m_logger;
};
}
@@ -22,7 +22,6 @@ MvsVideoTeamDialog::MvsVideoTeamDialog(QWidget *parent)
, m_ftc(nullptr)
, m_flmGui(nullptr)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("MvsVideoTeamDialog"))
{
m_ui->setupUi(this);
@@ -170,7 +169,7 @@ void MvsVideoTeamDialog::setData()
bool MvsVideoTeamDialog::apply()
{
VideoReceiverModifyActiveRequest req;
DEBUG_LOG(m_logger) << "apply m_videoTeamButtonGroup.size=" << m_videoTeamButtonGroup.size();
DEBUG_LOG() << "apply m_videoTeamButtonGroup.size=" << m_videoTeamButtonGroup.size();
QMap<int, QButtonGroup *> ::const_iterator itBg;
for (itBg = m_videoTeamButtonGroup.constBegin(); itBg != m_videoTeamButtonGroup.constEnd(); ++itBg)
{
@@ -178,9 +177,9 @@ bool MvsVideoTeamDialog::apply()
int mainStructureElementId = itBg.value()->checkedId();
int oldActiveId = m_dtc->getActiveVideoReceiver(teamId);
DEBUG_LOG(m_logger) << "Team id = " << teamId;
DEBUG_LOG(m_logger) << "Main structure element id = " << mainStructureElementId;
DEBUG_LOG(m_logger) << "Old active video receiver = " << oldActiveId;
DEBUG_LOG() << "Team id = " << teamId;
DEBUG_LOG() << "Main structure element id = " << mainStructureElementId;
DEBUG_LOG() << "Old active video receiver = " << oldActiveId;
if (itBg.value()->checkedId() == 0)
{
@@ -200,7 +199,7 @@ bool MvsVideoTeamDialog::apply()
req.isActive(true);
req.id(m_receiverIds.value(QPair<int, int>(mainStructureElementId, teamId)));
}
DEBUG_LOG(m_logger) << "itBg.key=" << itBg.key()
DEBUG_LOG() << "itBg.key=" << itBg.key()
<< " mainStructureElementId=" << mainStructureElementId
<< " teamId=" << teamId
<< " id=" << req.id()
@@ -87,7 +87,5 @@ private:
QHash<QPair<int, int>, int> m_receiverIds;
QVector <int> mainStructureElementIds;
LOGGER_T m_logger;
};
}
@@ -69,7 +69,6 @@ EditTrainingVoiceCommunicationDialog::EditTrainingVoiceCommunicationDialog(int32
, m_avmFtc(avmFtc)
, m_exmDtc(exmDtc)
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_logger(getLogger("EditTrainingVoiceCommunicationDialog"))
{
Q_ASSERT(id >= 0);
Q_ASSERT(exmDtc);
@@ -106,7 +106,5 @@ private:
ExerciseManagement::Interface::Dtc *m_exmDtc;
QVector<QString> m_takenNames;
std::unique_ptr<LtsUtils::RequestHelper> m_requestHelper;
LOGGER_T m_logger;
};
}
@@ -24,7 +24,6 @@ TrainingVoiceCommunicationDialog::TrainingVoiceCommunicationDialog(const QString
, m_requestHelper(new LtsUtils::RequestHelper(this))
, m_avmDtc(nullptr)
, m_avmFtc(nullptr)
, m_logger(getLogger("TrainingVoiceCommunicationDialog"))
{
m_ui->setupUi(this);
@@ -53,7 +52,7 @@ bool TrainingVoiceCommunicationDialog::init(const std::shared_ptr<Interface::Dtc
avmFtc->enableModifyTvcConfig() &&
avmFtc->enableRemoveTvcConfig()))
{
ERROR_LOG(m_logger) << "Could not enable topics";
ERROR_LOG() << "Could not enable topics";
return false;
}
@@ -69,7 +68,7 @@ bool TrainingVoiceCommunicationDialog::init(const std::shared_ptr<Interface::Dtc
{
m_filter.reset();
m_model.reset();
ERROR_LOG(m_logger) << "Could not init model";
ERROR_LOG() << "Could not init model";
return false;
}
@@ -168,14 +167,14 @@ void TrainingVoiceCommunicationDialog::onExportButtonClicked()
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
if (fileId > 0)
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
DEBUG_LOG() << "Saved file with id = " << fileId;
else
ERROR_LOG(m_logger) << "Could not save file in library ";
ERROR_LOG() << "Could not save file in library ";
}
void TrainingVoiceCommunicationDialog::onImportButtonClicked()
{
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
DEBUG_LOG() << " onImportButtonClicked() ";
QByteArray content;
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml}, m_session->exerciseId(), FileManagement::toString(FileManagement::XmlType::AVMTrainingVoiceCommunication));
@@ -202,7 +201,7 @@ void TrainingVoiceCommunicationDialog::onImportButtonClicked()
});
}
(void) m_requestHelper->startRequests();
INFO_LOG(m_logger) << "--- onImportButtonClicked() ";
INFO_LOG() << "--- onImportButtonClicked() ";
}
}
@@ -86,7 +86,5 @@ private:
std::shared_ptr<Interface::Ftc> m_avmFtc;
std::shared_ptr<FileManagement::ForeignGuiInterface> m_flmGui;
ExerciseManagement::Interface::Dtc *m_exmDtc{nullptr};
LOGGER_T m_logger;
};
}
@@ -21,7 +21,6 @@ TrainingVoiceCommunicationDialogModel::TrainingVoiceCommunicationDialogModel(QOb
tr("Global")
}, parent)
, m_exerciseId(-1)
, m_logger(getLogger("TrainingVoiceCommunicationDialogModel"))
{
}
@@ -114,7 +113,7 @@ QVector<ModifyTvcConfigRequest> TrainingVoiceCommunicationDialogModel::jsonToTvc
config.recording(obj[QLatin1String("recording")].toBool());
config.tetraChannelId(obj[QLatin1String("tetraChannelId")].toInt());
INFO_LOG(m_logger) << "insertRow: " << config.radioCircuit()
INFO_LOG() << "insertRow: " << config.radioCircuit()
<< " tvcChannelId=" << config.tetraChannelId();
result.push_back(std::move(config));
}
@@ -39,8 +39,6 @@ private:
int32_t m_exerciseId;
QMap<int32_t, AudioVideoManagement::TvcChannel> m_tetraChannels;
LOGGER_T m_logger;
};
@@ -3,7 +3,7 @@
#pragma once
#include <Plugins/AudioVideoManagement/Shared/avmshared_export.h>
#include <Lts/Plugins/AudioVideoManagement/Shared/avmshared_export.h>
#include <QObject>
#include <QRect>
#include <boost/optional.hpp>
@@ -3,7 +3,7 @@
#pragma once
#include <Plugins/AudioVideoManagement/Shared/avmshared_export.h>
#include <Lts/Plugins/AudioVideoManagement/Shared/avmshared_export.h>
#include <QString>
#include <QObject>
#include <memory>
@@ -3,7 +3,7 @@
#pragma once
#include <Plugins/AudioVideoManagement/Shared/avmshared_export.h>
#include <Lts/Plugins/AudioVideoManagement/Shared/avmshared_export.h>
#include <QString>
#include <memory>
#include <chrono>
@@ -3,7 +3,7 @@
#pragma once
#include <Plugins/AudioVideoManagement/Shared/avmshared_export.h>
#include <Lts/Plugins/AudioVideoManagement/Shared/avmshared_export.h>
namespace AudioVideoManagement
{
@@ -2,7 +2,7 @@
#include <QObject>
#include <AudioVideoManagement/ava_types.h>
#include <Plugins/AudioVideoManagement/Shared/avmshared_export.h>
#include <Lts/Plugins/AudioVideoManagement/Shared/avmshared_export.h>
namespace AudioVideoManagement {