| #pragma once |
| |
| #ifndef COLORMODELVIEWER_H |
| #define COLORMODELVIEWER_H |
| |
| #include "flipbook.h" |
| |
| |
| |
| |
| |
| class ColorModelViewer : public FlipBook |
| { |
| Q_OBJECT |
| |
| |
| int m_mode; |
| |
| TFilePath m_currentRefImgPath; |
| |
| public: |
| ColorModelViewer(QWidget *parent = 0); |
| ~ColorModelViewer(); |
| |
| protected: |
| void dragEnterEvent(QDragEnterEvent *event); |
| void dropEvent(QDropEvent *event); |
| void loadImage(const TFilePath &fp); |
| void resetImageViewer() |
| { |
| clearCache(); |
| m_levels.clear(); |
| m_title = ""; |
| m_imageViewer->setImage(getCurrentImage(0)); |
| m_currentRefImgPath = TFilePath(); |
| m_palette = 0; |
| } |
| |
| void contextMenuEvent(QContextMenuEvent *event); |
| |
| void mousePressEvent(QMouseEvent *); |
| void mouseMoveEvent(QMouseEvent *); |
| void pick(const QPoint &p); |
| void hideEvent(QHideEvent *e); |
| void showEvent(QShowEvent *e); |
| |
| |
| void reloadCurrentFrame(); |
| protected slots: |
| void showCurrentImage(); |
| |
| void loadCurrentFrame(); |
| void removeColorModel(); |
| |
| void onRefImageNotFound(); |
| void updateViewer(); |
| |
| |
| void changePickType(); |
| |
| signals: |
| void refImageNotFound(); |
| }; |
| |
| #endif |