Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef SCREEN_PICKER_H
Toshihiro Shimizu 890ddd
#define SCREEN_PICKER_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "toonzqt/screenboard.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include <qwidget></qwidget>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//----------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class ScreenPicker : public QObject, public DVGui::ScreenBoard::Drawing
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	Q_OBJECT
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	QPoint m_start;
Toshihiro Shimizu 890ddd
	QRect m_geometry;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	bool m_mousePressed, m_mouseGrabbed;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	ScreenPicker(QWidget *parent = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	void event(QWidget *widget, QEvent *e);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void mousePressEvent(QWidget *widget, QMouseEvent *me);
Toshihiro Shimizu 890ddd
	void mouseMoveEvent(QWidget *widget, QMouseEvent *me);
Toshihiro Shimizu 890ddd
	void mouseReleaseEvent(QWidget *widget, QMouseEvent *me);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void paintEvent(QWidget *widget, QPaintEvent *pe);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	bool acceptScreenEvents(const QRect &screenRect) const;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public slots:
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	void startGrab();
Toshihiro Shimizu 890ddd
	void pick();
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif //SCREEN_PICKER_H