#ifndef MODEL_RM_WINDOW_H
#define MODEL_RM_WINDOW_H

#ifndef MODEL_VIEW_H
#include "Model_view.h"
#endif

#include "ui_Model_RM_window.h"

class QShowEvent;

namespace MM
{
class Model_RM_widget;

class Model_RM_window 
: 
    public QWidget,
    public Ui_Model_RM_window,
    public Model_view
{
    Q_OBJECT

    Model &             model_;
    bool                first_show_;

public:        
    Model_RM_widget *   RM_widget_1_;
    Model_RM_widget *   RM_widget_2_;

    explicit            Model_RM_window (Model & model);
    virtual            ~Model_RM_window ();

    Model_view *        clone (Model &/*model*/, const char * /*name*/) const {return 0;}//fix

    bool                is_on () const              
    {
        bool result = isVisible();
        return result;
    }

    Model &             model ()                    {return model_;}
    Model_RM_widget *   current_model_widget ();

public slots:
    virtual void        fit_to_screen();
    virtual void        flush_camera ();
    virtual void        set_level_of_details (int lod);
    virtual void        set_focus ();
    virtual void        renew ();

protected:
    void                showEvent    (QShowEvent  * event);
    void                closeEvent   (QCloseEvent * event);
    //void            keyPressEvent   (QKeyEvent  * event);
};

}//MM

#endif //MODEL_RM_WINDOW_H
