<commit_before>#ifndef MAINWINDOW_H
#define MAINWINDOW_H

// QT includes
#include <QtGui>
#include <QWidget>
#include <QApplication>
#include <QSplitter>
// Custom QT widgets
#include "togglepanel.h"
#include "customslider.h"
#include "Qt4Constraint.h"

// OpenGL includes
#include "opengl/opengl_object.h"

// The following are now subclassed
//#include "qt4/qt4_widget_opengl.h"
//#include "opengl/opengl_object_gfe.h"

// Collision stuff
#include <collision/collision_object_box.h>
#include <collision/collision_object_sphere.h>
#include <collision/collision_object_cylinder.h>
#include <collision/collision_object_gfe.h>

// Affordances
#include "affordance/AffordanceState.h"
#include "affordance/AffordanceUpWrapper.h"

// Local includes
#include "../AtomicConstraint.h"
#include "../ConstraintSequence.h"
#include "../opengl/ColorRobot.h"
#include "../opengl/SelectableOpenGLWidget.h"


namespace action_authoring
{

/**Represents the read-only state of the world and objects used for rendering that state*/
struct WorldStateView
{

  affordance::AffordanceUpWrapper affServerWrapper;  //used for reading affordances from the affordance server
  std::vector<affordance::AffPtr> all_affordances; //latest affordances read from the wrapper
  state::State_GFE state_gfe; //robot state
  robot_opengl::ColorRobot colorRobot; //subclasses OpenGL_Object_GFE. used for coloring the robot
  //std::vector<collision::Collision_Object> collisionObjs;
  
  /**initializes all the fields in the struct*/
WorldStateView(const boost::shared_ptr<lcm::LCM> &theLcm)
 : affordances(theLcm), colorRobot()
  { }
  
};
 

/**represents the state of the authoring gui*/
typedef struct
{
	/**sorted sequence of actomic constraints being authored*/
        std::vector<Qt4ConstraintPtr> _all_gui_constraints;
        Qt4ConstraintPtr _selected_gui_constraint;
} AuthoringState;

class MainWindow : public QWidget
{
    Q_OBJECT

public:
    explicit MainWindow(const boost::shared_ptr<lcm::LCM> &theLcm, QWidget *parent = 0);
    boost::shared_ptr<TogglePanel> createWaypointGUI(Qt4ConstraintPtr waypoint_constraint,
				   std::vector<std::string> joint_names);
    std::vector<std::string> getJointNames(std::string urdf_xml_filename);
    void demoPopulate();
    ~MainWindow();<commit_msg>renamign<commit_after>#ifndef MAINWINDOW_H
#define MAINWINDOW_H

// QT includes
#include <QtGui>
#include <QWidget>
#include <QApplication>
#include <QSplitter>
// Custom QT widgets
#include "togglepanel.h"
#include "customslider.h"
#include "Qt4Constraint.h"

// OpenGL includes
#include "opengl/opengl_object.h"

// The following are now subclassed
//#include "qt4/qt4_widget_opengl.h"
//#include "opengl/opengl_object_gfe.h"

// Collision stuff
#include <collision/collision_object_box.h>
#include <collision/collision_object_sphere.h>
#include <collision/collision_object_cylinder.h>
#include <collision/collision_object_gfe.h>

// Affordances
#include "affordance/AffordanceState.h"
#include "affordance/AffordanceUpWrapper.h"

// Local includes
#include "../AtomicConstraint.h"
#include "../ConstraintSequence.h"
#include "../opengl/ColorRobot.h"
#include "../opengl/SelectableOpenGLWidget.h"


namespace action_authoring
{

/**Represents the read-only state of the world and objects used for rendering that state*/
struct WorldStateView
{

  affordance::AffordanceUpWrapper affServerWrapper;  //used for reading affordances from the affordance server
  std::vector<affordance::AffPtr> affordances; //latest affordances read from the wrapper
  state::State_GFE state_gfe; //robot state
  robot_opengl::ColorRobot colorRobot; //subclasses OpenGL_Object_GFE. used for coloring the robot
  //std::vector<collision::Collision_Object> collisionObjs;
  
  /**initializes all the fields in the struct*/
WorldStateView(const boost::shared_ptr<lcm::LCM> &theLcm)
 : affordances(theLcm), colorRobot()
  { }
  
};
 

/**represents the state of the authoring gui*/
typedef struct
{
	/**sorted sequence of actomic constraints being authored*/
        std::vector<Qt4ConstraintPtr> _all_gui_constraints;
        Qt4ConstraintPtr _selected_gui_constraint;
} AuthoringState;

class MainWindow : public QWidget
{
    Q_OBJECT

public:
    explicit MainWindow(const boost::shared_ptr<lcm::LCM> &theLcm, QWidget *parent = 0);
    boost::shared_ptr<TogglePanel> createWaypointGUI(Qt4ConstraintPtr waypoint_constraint,
				   std::vector<std::string> joint_names);
    std::vector<std::string> getJointNames(std::string urdf_xml_filename);
    void demoPopulate();
    ~MainWindow();
{'fraction_non_alphanumeric': 0.11221122112211221, 'fraction_numerical': 0.0030803080308030805, 'mean_word_length': 5.522238163558106, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2393814', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1483, 'n_words': 337}