Skip to content

FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.

1.2 KB
Raw Blame
// src/screens/economics/panels/BisPanel.h
// BIS (Bank for International Settlements) — SDMX API, no API key required.
// 13 statistical domains: exchange rates, central bank rates, credit, house prices, etc.
// Script: bis_data.py
#pragma once

#include "screens/economics/panels/EconPanelBase.h"

#include <QComboBox>
#include <QLineEdit>

namespace fincept::screens {

class BisPanel : public EconPanelBase {
    Q_OBJECT
  public:
    explicit BisPanel(QWidget* parent = nullptr);
    void activate() override;

  protected:
    void build_controls(QHBoxLayout* thl) override;
    void on_fetch() override;
    void on_result(const QString& request_id, const services::EconomicsResult& result) override;
    void changeEvent(QEvent* event) override;

  private:
    void on_dataset_changed(int index);
    void retranslateUi() override;

    QComboBox* dataset_combo_ = nullptr;
    QLineEdit* country_input_ = nullptr;
    QLineEdit* start_input_ = nullptr;
    QLineEdit* end_input_ = nullptr;

    // Cached for retranslateUi
    QLabel* dataset_lbl_ = nullptr;
    QLabel* country_lbl_ = nullptr;
    QLabel* from_lbl_ = nullptr;
    QLabel* to_lbl_ = nullptr;
};

} // namespace fincept::screens