/********************************************************************************
** Form generated from reading UI file 'opsaiconfig.ui'
**
** Created by: Qt User Interface Compiler version 6.11.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/

#ifndef UI_OPSAICONFIG_H
#define UI_OPSAICONFIG_H

#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QCheckBox>
#include <QtWidgets/QDoubleSpinBox>
#include <QtWidgets/QGroupBox>
#include <QtWidgets/QHBoxLayout>
#include <QtWidgets/QLabel>
#include <QtWidgets/QSpacerItem>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QWidget>
#include <klocalizedstring.h>
#include "kurlrequester.h"

QT_BEGIN_NAMESPACE

class Ui_OpsAIConfig
{
public:
    QVBoxLayout *verticalLayout;
    QGroupBox *aiGroupBox;
    QVBoxLayout *verticalLayout_2;
    QLabel *label;
    QHBoxLayout *horizontalLayout_weights;
    QLabel *label_weights;
    KUrlRequester *kcfg_AIGuiderWeightsFile;
    QHBoxLayout *horizontalLayout_gain;
    QLabel *label_gain;
    QDoubleSpinBox *kcfg_AIPredictionGain;
    QCheckBox *kcfg_AIProportionalBackoff;
    QCheckBox *kcfg_AIShadowMode;
    QCheckBox *kcfg_AIPIDAutoTune;
    QCheckBox *kcfg_AIDarkGuiding;
    QHBoxLayout *horizontalLayout_darkGuidingInterval;
    QLabel *label_darkGuidingInterval;
    QDoubleSpinBox *kcfg_AIDarkGuidingInterval;
    QSpacerItem *verticalSpacer;

    void setupUi(QWidget *OpsAIConfig)
    {
        if (OpsAIConfig->objectName().isEmpty())
            OpsAIConfig->setObjectName("OpsAIConfig");
        OpsAIConfig->resize(372, 604);
        verticalLayout = new QVBoxLayout(OpsAIConfig);
        verticalLayout->setSpacing(3);
        verticalLayout->setObjectName("verticalLayout");
        verticalLayout->setContentsMargins(3, 3, 3, 3);
        aiGroupBox = new QGroupBox(OpsAIConfig);
        aiGroupBox->setObjectName("aiGroupBox");
        verticalLayout_2 = new QVBoxLayout(aiGroupBox);
        verticalLayout_2->setSpacing(6);
        verticalLayout_2->setObjectName("verticalLayout_2");
        label = new QLabel(aiGroupBox);
        label->setObjectName("label");
        label->setWordWrap(true);

        verticalLayout_2->addWidget(label);

        horizontalLayout_weights = new QHBoxLayout();
        horizontalLayout_weights->setObjectName("horizontalLayout_weights");
        label_weights = new QLabel(aiGroupBox);
        label_weights->setObjectName("label_weights");

        horizontalLayout_weights->addWidget(label_weights);

        kcfg_AIGuiderWeightsFile = new KUrlRequester(aiGroupBox);
        kcfg_AIGuiderWeightsFile->setObjectName("kcfg_AIGuiderWeightsFile");

        horizontalLayout_weights->addWidget(kcfg_AIGuiderWeightsFile);


        verticalLayout_2->addLayout(horizontalLayout_weights);

        horizontalLayout_gain = new QHBoxLayout();
        horizontalLayout_gain->setObjectName("horizontalLayout_gain");
        label_gain = new QLabel(aiGroupBox);
        label_gain->setObjectName("label_gain");

        horizontalLayout_gain->addWidget(label_gain);

        kcfg_AIPredictionGain = new QDoubleSpinBox(aiGroupBox);
        kcfg_AIPredictionGain->setObjectName("kcfg_AIPredictionGain");
        kcfg_AIPredictionGain->setDecimals(2);
        kcfg_AIPredictionGain->setMinimum(0.000000000000000);
        kcfg_AIPredictionGain->setMaximum(1.000000000000000);
        kcfg_AIPredictionGain->setSingleStep(0.050000000000000);

        horizontalLayout_gain->addWidget(kcfg_AIPredictionGain);


        verticalLayout_2->addLayout(horizontalLayout_gain);

        kcfg_AIProportionalBackoff = new QCheckBox(aiGroupBox);
        kcfg_AIProportionalBackoff->setObjectName("kcfg_AIProportionalBackoff");

        verticalLayout_2->addWidget(kcfg_AIProportionalBackoff);

        kcfg_AIShadowMode = new QCheckBox(aiGroupBox);
        kcfg_AIShadowMode->setObjectName("kcfg_AIShadowMode");
        kcfg_AIShadowMode->setVisible(false);

        verticalLayout_2->addWidget(kcfg_AIShadowMode);

        kcfg_AIPIDAutoTune = new QCheckBox(aiGroupBox);
        kcfg_AIPIDAutoTune->setObjectName("kcfg_AIPIDAutoTune");

        verticalLayout_2->addWidget(kcfg_AIPIDAutoTune);

        kcfg_AIDarkGuiding = new QCheckBox(aiGroupBox);
        kcfg_AIDarkGuiding->setObjectName("kcfg_AIDarkGuiding");

        verticalLayout_2->addWidget(kcfg_AIDarkGuiding);

        horizontalLayout_darkGuidingInterval = new QHBoxLayout();
        horizontalLayout_darkGuidingInterval->setObjectName("horizontalLayout_darkGuidingInterval");
        label_darkGuidingInterval = new QLabel(aiGroupBox);
        label_darkGuidingInterval->setObjectName("label_darkGuidingInterval");

        horizontalLayout_darkGuidingInterval->addWidget(label_darkGuidingInterval);

        kcfg_AIDarkGuidingInterval = new QDoubleSpinBox(aiGroupBox);
        kcfg_AIDarkGuidingInterval->setObjectName("kcfg_AIDarkGuidingInterval");
        kcfg_AIDarkGuidingInterval->setDecimals(1);
        kcfg_AIDarkGuidingInterval->setMinimum(0.100000000000000);
        kcfg_AIDarkGuidingInterval->setMaximum(10.000000000000000);
        kcfg_AIDarkGuidingInterval->setSingleStep(0.100000000000000);

        horizontalLayout_darkGuidingInterval->addWidget(kcfg_AIDarkGuidingInterval);


        verticalLayout_2->addLayout(horizontalLayout_darkGuidingInterval);

        verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding);

        verticalLayout_2->addItem(verticalSpacer);


        verticalLayout->addWidget(aiGroupBox);


        retranslateUi(OpsAIConfig);

        QMetaObject::connectSlotsByName(OpsAIConfig);
    } // setupUi

    void retranslateUi(QWidget *OpsAIConfig)
    {
        aiGroupBox->setTitle(tr2i18n("AI Guiding Configuration", nullptr));
#if QT_CONFIG(tooltip)
        aiGroupBox->setToolTip(tr2i18n("Settings for the experimental AI feed-forward guider. Select the AI algorithm in the Guide options and load a matching trained weights file to activate it.", nullptr));
#endif // QT_CONFIG(tooltip)
        label->setText(tr2i18n("AI Guiding configuration. To train the AI model or load trained weights for your mount, use the AI Guiding button (below Clear Calibration) on the main Guide tab.", nullptr));
        label_weights->setText(tr2i18n("Weights File:", nullptr));
#if QT_CONFIG(tooltip)
        label_weights->setToolTip(tr2i18n("Trained AI model weights (JSON). Generate them with the AI Guiding Assistant or via EkosLive Cloud training. The file must match your mount type and current guide settings (exposure, binning, gains) or it is rejected when guiding starts.", nullptr));
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(tooltip)
        kcfg_AIGuiderWeightsFile->setToolTip(tr2i18n("Trained AI model weights (JSON). Generate them with the AI Guiding Assistant or via EkosLive Cloud training. The file must match your mount type and current guide settings (exposure, binning, gains) or it is rejected when guiding starts.", nullptr));
#endif // QT_CONFIG(tooltip)
        label_gain->setText(tr2i18n("AI Prediction Gain:", nullptr));
#if QT_CONFIG(tooltip)
        label_gain->setToolTip(tr2i18n("How strongly the AI feed-forward prediction is blended into each guide pulse: 0.0 = AI ignored (standard guiding only), 1.0 = full AI prediction. Lower values are more conservative.", nullptr));
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(tooltip)
        kcfg_AIPredictionGain->setToolTip(tr2i18n("How strongly the AI feed-forward prediction is blended into each guide pulse: 0.0 = AI ignored (standard guiding only), 1.0 = full AI prediction. Lower values are more conservative.", nullptr));
#endif // QT_CONFIG(tooltip)
        kcfg_AIProportionalBackoff->setText(tr2i18n("Scale Down Proportional Gain During AI Correction", nullptr));
#if QT_CONFIG(tooltip)
        kcfg_AIProportionalBackoff->setToolTip(tr2i18n("Dynamically reduce the standard P-controller response when the AI feed-forward is highly confident to prevent constructive interference and oscillation.", nullptr));
#endif // QT_CONFIG(tooltip)
        kcfg_AIShadowMode->setText(tr2i18n("Enable Shadow Mode (log AI predictions without applying them)", nullptr));
#if QT_CONFIG(tooltip)
        kcfg_AIShadowMode->setToolTip(tr2i18n("Runs the AI model silently alongside the selected standard guiding algorithm. Predictions are logged to the AI debug CSV but never blended into guide pulses. Use this to evaluate AI model quality before enabling full AI guiding.", nullptr));
#endif // QT_CONFIG(tooltip)
        kcfg_AIPIDAutoTune->setText(tr2i18n("PID Auto-Tune (Step-Response Gain Calibration)", nullptr));
#if QT_CONFIG(tooltip)
        kcfg_AIPIDAutoTune->setToolTip(tr2i18n("Sends known pulses at the start of the protocol and measures the mount's step response to derive a base RA/DEC guiding gain for any mount type. The measured gain is applied and locked for the rest of the session; the current gain is kept if the responses do not pass the consistency checks. Adds roughly 20 minutes to the protocol; enabled by default.", nullptr));
#endif // QT_CONFIG(tooltip)
        kcfg_AIDarkGuiding->setText(tr2i18n("Enable Predictive Dark Guiding", nullptr));
#if QT_CONFIG(tooltip)
        kcfg_AIDarkGuiding->setToolTip(tr2i18n("Allows the AI Guider to continue emitting feed-forward pulses during gaps in guide star measurements (e.g., during dither settling, autofocuser runs, or camera downloads) by extrapolating the physical periodic error forward in time.", nullptr));
#endif // QT_CONFIG(tooltip)
        label_darkGuidingInterval->setText(tr2i18n("Dark Guiding Interval (s):", nullptr));
#if QT_CONFIG(tooltip)
        label_darkGuidingInterval->setToolTip(tr2i18n("Seconds between predicted feed-forward pulses when there is no guide-star measurement (dither settling, autofocus runs, camera downloads). Only used when Predictive Dark Guiding is enabled.", nullptr));
#endif // QT_CONFIG(tooltip)
#if QT_CONFIG(tooltip)
        kcfg_AIDarkGuidingInterval->setToolTip(tr2i18n("Seconds between predicted feed-forward pulses when there is no guide-star measurement (dither settling, autofocus runs, camera downloads). Only used when Predictive Dark Guiding is enabled.", nullptr));
#endif // QT_CONFIG(tooltip)
        (void)OpsAIConfig;
    } // retranslateUi

};

namespace Ui {
    class OpsAIConfig: public Ui_OpsAIConfig {};
} // namespace Ui

QT_END_NAMESPACE

#endif // OPSAICONFIG_H

