Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | Private Attributes | List of all members
geometrize::scene::ImageTaskScene::ImageTaskSceneImpl Class Reference
Collaboration diagram for geometrize::scene::ImageTaskScene::ImageTaskSceneImpl:
Collaboration graph
[legend]

Public Member Functions

 ImageTaskSceneImpl (ImageTaskScene *pQ)
 
ImageTaskSceneImpl operator= (const ImageTaskSceneImpl &)=delete
 
 ImageTaskSceneImpl (const ImageTaskSceneImpl &)=delete
 
 ~ImageTaskSceneImpl ()=default
 
void setTargetPixmapOpacity (float opacity)
 
void setTargetPixmap (const QPixmap &pixmap)
 
ImageTaskPixmapGraphicsItemgetTargetPixmapItem ()
 
void setOverlayShape (SvgItem *item)
 
void setOverlayShapeVisibility (const bool visible)
 

Protected Attributes

ImageTaskPixmapGraphicsItem m_targetPixmapItem
 

Private Attributes

ImageTaskSceneq
 
SvgItemm_lastOverlayShapeItem
 
bool m_overlayShapeVisibility
 

Constructor & Destructor Documentation

geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::ImageTaskSceneImpl ( ImageTaskScene pQ)
inline
24  {
25  q->setStickyFocus(true);
26 
27  q->addItem(&m_targetPixmapItem);
28  }
ImageTaskScene * q
Definition: imagetaskscene.cpp:77
bool m_overlayShapeVisibility
Definition: imagetaskscene.cpp:80
ImageTaskPixmapGraphicsItem m_targetPixmapItem
Definition: imagetaskscene.cpp:74
SvgItem * m_lastOverlayShapeItem
Definition: imagetaskscene.cpp:79
geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::ImageTaskSceneImpl ( const ImageTaskSceneImpl )
delete
geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::~ImageTaskSceneImpl ( )
default

Member Function Documentation

ImageTaskPixmapGraphicsItem& geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::getTargetPixmapItem ( )
inline
48  {
49  return m_targetPixmapItem;
50  }
ImageTaskPixmapGraphicsItem m_targetPixmapItem
Definition: imagetaskscene.cpp:74
ImageTaskSceneImpl geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::operator= ( const ImageTaskSceneImpl )
delete
void geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::setOverlayShape ( SvgItem item)
inline
53  {
54  if(m_lastOverlayShapeItem != nullptr) {
55  q->removeItem(m_lastOverlayShapeItem);
56  }
57  if(item != nullptr) {
58  item->setVisible(m_overlayShapeVisibility);
59  q->addItem(item);
60  q->setFocusItem(item, Qt::FocusReason::OtherFocusReason);
61  }
63  }
ImageTaskScene * q
Definition: imagetaskscene.cpp:77
bool m_overlayShapeVisibility
Definition: imagetaskscene.cpp:80
SvgItem * m_lastOverlayShapeItem
Definition: imagetaskscene.cpp:79
void geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::setOverlayShapeVisibility ( const bool  visible)
inline
66  {
67  m_overlayShapeVisibility = visible;
68  if(m_lastOverlayShapeItem != nullptr) {
70  }
71  }
bool m_overlayShapeVisibility
Definition: imagetaskscene.cpp:80
SvgItem * m_lastOverlayShapeItem
Definition: imagetaskscene.cpp:79
void geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::setTargetPixmap ( const QPixmap &  pixmap)
inline
43  {
44  m_targetPixmapItem.setPixmap(pixmap);
45  }
ImageTaskPixmapGraphicsItem m_targetPixmapItem
Definition: imagetaskscene.cpp:74
void geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::setTargetPixmapOpacity ( float  opacity)
inline
34  {
35  // It's a pain to get completely transparent items to receive mouse/tablet events e.g. items()
36  // However we need the target image to receive events, so we always make it slightly visible
37  opacity = std::max(opacity, 0.001f);
38 
39  m_targetPixmapItem.setOpacity(static_cast<qreal>(opacity));
40  }
ImageTaskPixmapGraphicsItem m_targetPixmapItem
Definition: imagetaskscene.cpp:74

Member Data Documentation

SvgItem* geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::m_lastOverlayShapeItem
private
bool geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::m_overlayShapeVisibility
private
ImageTaskPixmapGraphicsItem geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::m_targetPixmapItem
protected
ImageTaskScene* geometrize::scene::ImageTaskScene::ImageTaskSceneImpl::q
private

The documentation for this class was generated from the following file: