146 inline static std::string_view logger_name =
"ores.qt.main_window";
148 [[nodiscard]]
static auto& lg() {
150 static auto instance = make_logger(logger_name);
163 explicit MainWindow(QWidget* parent =
nullptr);
181 void setInstanceInfo(
const QString& name,
const QColor& color = QColor());
211 bool eventFilter(QObject* watched, QEvent* event)
override;
220 void onLoginTriggered();
225 void onDisconnectTriggered();
230 void onAboutTriggered();
235 void onMyAccountTriggered();
240 void onMySessionsTriggered();
245 void onDetachAllTriggered();
273 void onWindowMenuAboutToShow();
282 void onRecordSessionToggled(
bool checked);
287 void onOpenRecordingTriggered();
292 void onSetRecordingDirectoryTriggered();
300 void onConnectionBrowserTriggered();
307 void onConnectionConnectRequested(
const boost::uuids::uuid& connectionId,
308 const QString& connectionName);
315 void onEnvironmentConnectRequested(
const boost::uuids::uuid& environmentId,
316 const QString& environmentName);
318 void onModernLoginTriggered();
326 void onLoginSuccess(
const QString& username);
334 void showSignUpDialog(
const QString& host,
int port);
343 void showSystemProvisionerWizard(
344 const QString& username = {},
const QString& password = {});
353 void showTenantOnboardingWizard();
362 void showTenantProvisioningWizard();
367 struct LoginDialogOptions {
372 QString connectionName;
373 bool showSavedConnections =
true;
374 bool showSignUpButton =
true;
383 void showLoginDialog();
393 void showLoginDialog(
const LoginDialogOptions& options);
402 void updateMenuState();
410 void updateStatusBarFields();
419 QString buildConnectionTooltip()
const;
427 void createControllers();
432 void performDisconnectCleanup();
441 bool initializeConnectionManager();
448 MdiAreaWithBackground* mdiArea_;
451 QLabel* connectionStatusIconLabel_;
454 QWidget* userStatusWidget_;
455 QLabel* userStatusNameLabel_;
458 QWidget* serverStatusWidget_;
459 QLabel* serverStatusNameLabel_;
462 QWidget* tenantStatusWidget_;
463 QLabel* tenantStatusNameLabel_;
466 QWidget* partyStatusWidget_;
467 QLabel* partyStatusNameLabel_;
475 QList<QPointer<DetachableMdiSubWindow>> allDetachableWindows_;
478 QIcon connectedIcon_;
481 QIcon disconnectedIcon_;
484 QIcon reconnectingIcon_;
487 QIcon recordOffIcon_;
499 std::unique_ptr<CurrencyController> currencyController_;
507 std::unique_ptr<CountryController> countryController_;
515 std::unique_ptr<AccountController> accountController_;
523 std::unique_ptr<RoleController> roleController_;
531 std::unique_ptr<TenantController> tenantController_;
539 std::unique_ptr<SystemSettingController> systemSettingController_;
547 std::unique_ptr<ChangeReasonCategoryController> changeReasonCategoryController_;
555 std::unique_ptr<ChangeReasonController> changeReasonController_;
563 std::unique_ptr<OriginDimensionController> originDimensionController_;
571 std::unique_ptr<NatureDimensionController> natureDimensionController_;
579 std::unique_ptr<TreatmentDimensionController> treatmentDimensionController_;
587 std::unique_ptr<CodingSchemeAuthorityTypeController> codingSchemeAuthorityTypeController_;
595 std::unique_ptr<DataDomainController> dataDomainController_;
603 std::unique_ptr<SubjectAreaController> subjectAreaController_;
611 std::unique_ptr<CatalogController> catalogController_;
619 std::unique_ptr<CodingSchemeController> codingSchemeController_;
627 std::unique_ptr<MethodologyController> methodologyController_;
635 std::unique_ptr<DatasetController> datasetController_;
643 std::unique_ptr<DatasetBundleController> datasetBundleController_;
645 std::unique_ptr<PartyTypeController> partyTypeController_;
646 std::unique_ptr<PartyStatusController> partyStatusController_;
647 std::unique_ptr<PartyIdSchemeController> partyIdSchemeController_;
648 std::unique_ptr<ContactTypeController> contactTypeController_;
649 std::unique_ptr<PartyController> partyController_;
650 std::unique_ptr<CounterpartyController> counterpartyController_;
651 std::unique_ptr<BusinessCentreController> businessCentreController_;
652 std::unique_ptr<BusinessUnitController> businessUnitController_;
653 std::unique_ptr<BusinessUnitTypeController> businessUnitTypeController_;
654 std::unique_ptr<PortfolioController> portfolioController_;
655 std::unique_ptr<BookController> bookController_;
656 std::unique_ptr<BookStatusController> bookStatusController_;
657 std::unique_ptr<QueueMonitorController> queueMonitorController_;
658 std::unique_ptr<PurposeTypeController> purposeTypeController_;
659 std::unique_ptr<RoundingTypeController> roundingTypeController_;
660 std::unique_ptr<MonetaryNatureController> monetaryNatureController_;
661 std::unique_ptr<CurrencyMarketTierController> currencyMarketTierController_;
662 std::unique_ptr<TradeController> tradeController_;
663 std::unique_ptr<DayCountFractionTypeController> dayCountFractionTypeController_;
664 std::unique_ptr<BusinessDayConventionTypeController> businessDayConventionTypeController_;
665 std::unique_ptr<FloatingIndexTypeController> floatingIndexTypeController_;
666 std::unique_ptr<PaymentFrequencyTypeController> paymentFrequencyTypeController_;
667 std::unique_ptr<LegTypeController> legTypeController_;
668 std::unique_ptr<InstrumentController> instrumentController_;
669 std::unique_ptr<FxInstrumentController> fxInstrumentController_;
670 std::unique_ptr<BondInstrumentController> bondInstrumentController_;
671 std::unique_ptr<CreditInstrumentController> creditInstrumentController_;
672 std::unique_ptr<EquityInstrumentController> equityInstrumentController_;
673 std::unique_ptr<CommodityInstrumentController> commodityInstrumentController_;
674 std::unique_ptr<JobDefinitionController> jobDefinitionController_;
675 std::unique_ptr<AppController> appController_;
676 std::unique_ptr<AppVersionController> appVersionController_;
677 std::unique_ptr<ComputeDashboardController> computeDashboardController_;
678 std::unique_ptr<ComputeConsoleController> computeConsoleController_;
679 std::unique_ptr<ServiceDashboardController> serviceDashboardController_;
680 std::unique_ptr<ReportTypeController> reportTypeController_;
681 std::unique_ptr<ConcurrencyPolicyController> concurrencyPolicyController_;
682 std::unique_ptr<ReportDefinitionController> reportDefinitionController_;
683 std::unique_ptr<ReportInstanceController> reportInstanceController_;
684 std::unique_ptr<OreImportController> oreImportController_;
687 std::shared_ptr<eventing::service::event_bus> eventBus_;
690 ClientManager* clientManager_;
693 ImageCache* imageCache_;
696 ChangeReasonCache* changeReasonCache_;
699 BadgeCache* badgeCache_;
702 std::string username_;
705 std::string httpBaseUrl_;
711 QSystemTrayIcon* systemTrayIcon_;
714 QMenu* trayContextMenu_;
717 std::vector<eventing::service::subscription> eventSubscriptions_;
720 QString instanceName_;
723 QColor instanceColor_;
726 QLabel* instanceColorIndicator_;
729 DetachableMdiSubWindow* eventViewerWindow_;
732 DetachableMdiSubWindow* telemetryViewerWindow_;
735 std::unique_ptr<connections::service::connection_manager> connectionManager_;
738 DetachableMdiSubWindow* connectionBrowserWindow_{
nullptr};
741 DetachableMdiSubWindow* dataLibrarianWindow_{
nullptr};
742 DetachableMdiSubWindow* portfolioExplorerSubWindow_{
nullptr};
743 DetachableMdiSubWindow* orgExplorerSubWindow_{
nullptr};
746 DetachableMdiSubWindow* shellWindow_{
nullptr};
749 DetachableMdiSubWindow* mySessionsWindow_{
nullptr};
752 DetachableMdiSubWindow* myAccountWindow_{
nullptr};
755 QString activeConnectionName_;
758 QString masterPassword_;
761 DetachableMdiSubWindow* aboutSubWindow_{
nullptr};