#ifndef QHANDLERSHIBIEYICHANG_H #define QHANDLERSHIBIEYICHANG_H #include #include "ui_qhandlershibieyichang.h" #include #include #include struct PAGE_MARK_INFO{ int mark_order[3]; int mark_xiangxian[3]; PAGE_MARK_INFO& operator=(const PAGE_MARK_INFO& page_mark_info){ memcpy(this,&page_mark_info,sizeof(PAGE_MARK_INFO)); return *this; } }; enum CHANGE_TYPE{PAGE_ORDER,PAGE_MARK}; class QHandlerShibieyichang : public QWidget { Q_OBJECT public: friend class QMyCommand; public: QHandlerShibieyichang(QWidget *parent = 0); ~QHandlerShibieyichang(); void setPaperInfo( int paper_id); void getDefaultMarkInfo( PAGE_MARK_INFO &markinfo, int muban_img_cols,int muban_img_rows,int shijuan_img_cols,int shijuan_img_rows ); virtual void resizeEvent( QResizeEvent * evt); void updateGeometrys(); public slots: void switchPageHandler(); void showPage(); void hulueClickedHandler(); void shibieClickedHandler(); void xuanzhuanClickedHandler(); void tool_clickedHander(); void prePageClickedHandler(); void nextPageClickedHandler(); Q_SIGNALS: void handleCompleted(int paper_id); void handleCompletedCover(int paper_id, int covered_id); public: virtual bool eventFilter( QObject *o, QEvent * e); void OnDoFinish();//完成了,要保存图像 bool IsEdited(); private: Ui::QHandlerShibieyichang ui; int paper_id; std::vector page_mark_info; std::vector schema_page; int m_currentPageIndex; int m_muban_count; int m_xiangxian; bool m_tuoyi; bool m_bEdited;//是否拖动(编辑)过 }; #endif // QHANDLERSHIBIEYICHANG_H