Gui::ViewProviderAnnotationLabel Class Reference

This is a different implementation of an annotation object which uses an SoImage node instead of an SoText2 or SoAsciiText node. More...

#include <ViewProviderAnnotation.h>

Inheritance diagram for Gui::ViewProviderAnnotationLabel:
Gui::ViewProviderDocumentObject Gui::ViewProvider App::PropertyContainer Base::Persistence Base::BaseClass

List of all members.

Public Member Functions

void attach (App::DocumentObject *)
std::vector< std::string > getDisplayModes (void) const
 Return a list of all possible modes.
virtual Base::Type getTypeId (void) const
void setDisplayMode (const char *ModeName)
 set the display mode
void updateData (const App::Property *)
 Gets called if some of the property hade bin changed.
 ViewProviderAnnotationLabel (void)
 Constructor.
virtual ~ViewProviderAnnotationLabel ()

Static Public Member Functions

static void * create (void)
static Base::Type getClassTypeId (void)
static void init (void)

Public Attributes

App::PropertyColor BackgroundColor
App::PropertyFont FontName
App::PropertyFloat FontSize
App::PropertyBool Frame
App::PropertyEnumeration Justification
App::PropertyColor TextColor

Protected Member Functions

void drawImage (const std::vector< std::string > &)
virtual const App::PropertyDatagetPropertyData (void) const
void onChanged (const App::Property *prop)
 Gets called by the container whenever a property has been changed.

Static Protected Member Functions

static const App::PropertyDatagetPropertyDataPtr (void)

Edit methods



bool doubleClicked (void)
 is called by the tree if the user double click on the object
void setupContextMenu (QMenu *, QObject *, const char *)
 set up the context-menu with the supported edit modes
bool setEdit (int ModNum)
 is called by the document when the provider goes in edit mode
void unsetEdit (int ModNum)
 is called when you loose the edit mode

Detailed Description

This is a different implementation of an annotation object which uses an SoImage node instead of an SoText2 or SoAsciiText node.

This approach gives a bit more flexibility since it can render arbitrary annotations.

Definition at line 87 of file ViewProviderAnnotation.h.


Constructor & Destructor Documentation

ViewProviderAnnotationLabel::ViewProviderAnnotationLabel ( void   ) 

Constructor.

Definition at line 242 of file ViewProviderAnnotation.cpp.

References ADD_PROPERTY, and SketcherExample::f.

ViewProviderAnnotationLabel::~ViewProviderAnnotationLabel (  )  [virtual]

Definition at line 269 of file ViewProviderAnnotation.cpp.


Member Function Documentation

void ViewProviderAnnotationLabel::attach ( App::DocumentObject f  )  [virtual]
void * Gui::ViewProviderAnnotationLabel::create ( void   )  [static]

Reimplemented from Gui::ViewProviderDocumentObject.

Definition at line 239 of file ViewProviderAnnotation.cpp.

bool ViewProviderAnnotationLabel::doubleClicked ( void   )  [virtual]

is called by the tree if the user double click on the object

Reimplemented from Gui::ViewProvider.

Definition at line 364 of file ViewProviderAnnotation.cpp.

References Gui::Application::activeDocument(), Gui::Application::Instance, and Gui::Document::setEdit().

void ViewProviderAnnotationLabel::drawImage ( const std::vector< std::string > &  s  )  [protected]
Base::Type Gui::ViewProviderAnnotationLabel::getClassTypeId ( void   )  [static]

Reimplemented from Gui::ViewProviderDocumentObject.

Definition at line 239 of file ViewProviderAnnotation.cpp.

Referenced by onChanged(), and updateData().

std::vector< std::string > ViewProviderAnnotationLabel::getDisplayModes ( void   )  const [virtual]

Return a list of all possible modes.

Reimplemented from Gui::ViewProviderDocumentObject.

Definition at line 298 of file ViewProviderAnnotation.cpp.

const App::PropertyData & Gui::ViewProviderAnnotationLabel::getPropertyData ( void   )  const [protected, virtual]

Reimplemented from Gui::ViewProviderDocumentObject.

Definition at line 239 of file ViewProviderAnnotation.cpp.

const App::PropertyData * Gui::ViewProviderAnnotationLabel::getPropertyDataPtr ( void   )  [static, protected]

Reimplemented from Gui::ViewProviderDocumentObject.

Definition at line 239 of file ViewProviderAnnotation.cpp.

Base::Type Gui::ViewProviderAnnotationLabel::getTypeId ( void   )  const [virtual]

Reimplemented from Gui::ViewProviderDocumentObject.

Definition at line 239 of file ViewProviderAnnotation.cpp.

void Gui::ViewProviderAnnotationLabel::init ( void   )  [static]

Reimplemented from Gui::ViewProviderDocumentObject.

Definition at line 239 of file ViewProviderAnnotation.cpp.

Referenced by Gui::Application::initTypes().

void ViewProviderAnnotationLabel::onChanged ( const App::Property prop  )  [protected, virtual]
void ViewProviderAnnotationLabel::setDisplayMode ( const char *  ModeName  )  [virtual]

set the display mode

If you add new viewing modes in getDisplayModes() then you need to reimplement also seDisplaytMode() to handle these new modes by setting the appropriate display mode.

Reimplemented from Gui::ViewProvider.

Definition at line 307 of file ViewProviderAnnotation.cpp.

References Gui::ViewProvider::setDisplayMaskMode().

bool ViewProviderAnnotationLabel::setEdit ( int  ModNum  )  [protected, virtual]

is called by the document when the provider goes in edit mode

Reimplemented from Gui::ViewProvider.

Definition at line 397 of file ViewProviderAnnotation.cpp.

References Gui::ViewProvider::pcRoot.

void ViewProviderAnnotationLabel::setupContextMenu ( QMenu *  ,
QObject *  ,
const char *   
) [virtual]

set up the context-menu with the supported edit modes

Reimplemented from Gui::ViewProvider.

Definition at line 370 of file ViewProviderAnnotation.cpp.

void ViewProviderAnnotationLabel::unsetEdit ( int  ModNum  )  [protected, virtual]

is called when you loose the edit mode

Reimplemented from Gui::ViewProvider.

Definition at line 417 of file ViewProviderAnnotation.cpp.

References Gui::ViewProvider::pcRoot.

void ViewProviderAnnotationLabel::updateData ( const App::Property  )  [virtual]

Member Data Documentation

Definition at line 98 of file ViewProviderAnnotation.h.

Referenced by drawImage(), and onChanged().

Definition at line 101 of file ViewProviderAnnotation.h.

Referenced by drawImage(), and onChanged().

Definition at line 100 of file ViewProviderAnnotation.h.

Referenced by drawImage(), and onChanged().

Definition at line 102 of file ViewProviderAnnotation.h.

Referenced by drawImage(), and onChanged().

Definition at line 99 of file ViewProviderAnnotation.h.

Referenced by drawImage(), and onChanged().

Definition at line 97 of file ViewProviderAnnotation.h.

Referenced by drawImage(), and onChanged().


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

Generated on Wed Nov 23 19:02:04 2011 for FreeCAD by  doxygen 1.6.1