//#####################################################################
// Copyright 2021, Craig Schroeder.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#include <Core/Basic_Geometry/RAY_HIT.h>
#include <Core/Interpolation/INTERPOLATION_CURVE.h>
#include <Core/Log/LOG.h>
#include <Core/Matrices/MATRIX.h>
#include <Core/Parsing/PARSE_ARGS.h>
#include <Core/Utilities/VIEWER_DIR.h>
#include <Core/Vectors/VECTOR.h>
#include "../QT_MAIN_WINDOW.h"
#include "../QT_WORLD.h"
#include "QT_COMPONENT.h"
#include "QT_COMPONENT_OPTIONS.h"
#include "QT_GRID.h"
#include "QT_GRID_COMPONENT.h"
#include <filesystem>
#include <map>
#include <QMenuBar>
namespace fs = std::filesystem;

namespace PhysBAM{
QT_COMPONENT::
QT_COMPONENT(QT_WORLD& world,const std::string& name)
    :name(name),world(world)
{
}

QT_COMPONENT::
~QT_COMPONENT()
{
}
//#####################################################################
// Function Add_To_Menu
//#####################################################################
void QT_COMPONENT::
Add_To_Menu(QT_MAIN_WINDOW& main,QMenu* menu)
{
    action = menu->addAction(name.c_str());
    action->setCheckable(true);
    action->setChecked(Draw());
    QObject::connect(action,&QAction::triggered,&main,
        [this,&main](){main.Options_Dialog(this);});
}
}
