#ifndef PANEL_ADD_MODEL_H
#define PANEL_ADD_MODEL_H

#ifndef PANEL_H
#include "Panel.h"
#endif

#ifndef DYNAMIC_SINGLETON_H
#include "Dynamic_singleton.h"
#endif

#ifndef UI_PANEL_ADD_MODEL_H
#include "ui_Panel_add_model.h"
#endif

#include <QTimer>

namespace MM
{
class Model_RM_window;
class Add_builder;

class Panel_add_model
:
    public Panel,
    public Ui_Panel_add_model,
    public Dynamic_singleton <Panel_add_model>
{
    Q_OBJECT

    Model_RM_window *   window_;
    Add_builder *       builder_;

    QTimer              timer_;
    bool                accepted_;

public:    
    explicit            Panel_add_model ();
    virtual            ~Panel_add_model ();

    void                execute ();

    void                split   ();
    void                desplit ();
    Add_builder &       builder ();

public slots:
    void                destroy ();
    void                accept  ();
    void                flush_Z_viewpoint ();
    void                no_overlap                   (bool on);
    void                remove_overlap_from_current  (bool on);
    void                remove_overlap_from_addition (bool on);
    void                move_current                 (bool on);
    void                move_addition                (bool on);

protected:
    void                closeEvent (QCloseEvent * event); 
};

}//MM

#endif //PANEL_ADD_MODEL_H
