#ifndef ACCEPTPANEL_H #define ACCEPTPANEL_H #include #include #include "splitview_interface.h" namespace accept_panel { enum class HoverType{ CUBE_LEFT, CUBE_RIGHT, CUBE_TOP, CUBE_BOTTOM, CUBE_CENTER, CUBE_UNDEFINED, }; class AcceptPanel : public QWidget { Q_OBJECT public: AcceptPanel(QMainWindow* win, split_frame::ResManager *mgr); void bindWith(split_frame::ViewBase *target); protected: void resizeEvent(QResizeEvent *ev) override; void paintEvent(QPaintEvent *ev) override; void dragMoveEvent(QDragMoveEvent *ev) override; void dragEnterEvent(QDragEnterEvent *ev) override; void dropEvent(QDropEvent *ev) override; private: QWidget *const bind_win; QRectF cube_left, cube_right, cube_top, cube_bottom, cube_center; split_frame::ResManager *const view_manager; split_frame::ViewBase *anchor_view = nullptr; HoverType target_type = HoverType::CUBE_UNDEFINED; QPixmap paint_panel; }; } #endif // ACCEPTPANEL_H