61 inline static std::string_view logger_name =
62 "ores.qt.import_trade_dialog";
64 [[nodiscard]]
static auto& lg() {
66 static auto instance = make_logger(logger_name);
83 const std::vector<ore::xml::trade_import_item>& items,
84 const QString& source_label,
86 const QString& username,
87 QWidget* parent =
nullptr);
105 void onImportClicked();
106 void onCancelClicked();
107 void onSelectAllChanged(Qt::CheckState state);
108 void onTradeCheckChanged();
109 void onApplyNettingSetToAll();
110 void onApplyCounterpartyToAll();
114 void populateTradeTable();
115 void populateCounterpartyCombos();
116 void loadCounterparties();
117 void updateImportButtonState();
118 void updateSelectionCount();
122 std::vector<ore::xml::trade_import_item> items_;
123 std::vector<std::string> validation_errors_;
124 std::vector<refdata::domain::counterparty> counterparties_;
125 QString source_label_;
130 QDateEdit* tradeDateEdit_;
131 QDateEdit* effectiveDateEdit_;
132 QDateEdit* terminationDateEdit_;
133 QComboBox* lifecycleEventCombo_;
134 QLineEdit* defaultNettingSetEdit_;
135 QComboBox* defaultCounterpartyCombo_;
136 QLabel* counterpartyStatusLabel_;
141 QCheckBox* selectAllCheckbox_;
142 QLabel* selectionCountLabel_;
143 QTableWidget* tradeTable_;
146 QProgressBar* progressBar_;
147 QLabel* statusLabel_;
148 QPushButton* importButton_;
149 QPushButton* cancelButton_;
151 bool importInProgress_;
152 std::atomic<bool> cancelRequested_;