CMS 3D CMS Logo

IgRZViewPropertiesCategory Class Reference

#include <Iguana/GLBrowsers/interface/IgRZViewPropertiesCategory.h>

Inheritance diagram for IgRZViewPropertiesCategory:

IgControlCategory IgStateElement IgControlItem

List of all members.

Public Slots

virtual void alignAxis (void)

Public Member Functions

virtual void browserChanged (IgRZBrowser *source)
 IgRZViewPropertiesCategory (IgState *state, IgRZBrowser *source)
virtual void registerBrowser (IgState *state, IgRZBrowser *source)
 ~IgRZViewPropertiesCategory (void)

Private Member Functions

 IG_DECLARE_STATE_ELEMENT (IgRZViewPropertiesCategory)
 IgRZViewPropertiesCategory (const IgRZViewPropertiesCategory &)
IgRZViewPropertiesCategoryoperator= (const IgRZViewPropertiesCategory &)

Private Attributes

IgQtAxisAlignmentm_axisAlignment
IgRZBrowserm_source


Detailed Description

Definition at line 23 of file IgRZViewPropertiesCategory.h.


Constructor & Destructor Documentation

IgRZViewPropertiesCategory::IgRZViewPropertiesCategory ( IgState state,
IgRZBrowser source 
)

Definition at line 25 of file IgRZViewPropertiesCategory.cc.

References reco::fitHelper::add(), alignAxis(), ASSERT, IgControlCategory::bodyArea(), IgControlCategory::bodyLayout(), HLT_VtxMuL3::connect, IgControlItem::dirty(), m_axisAlignment, IgControlCategory::makeIndentedLabel(), IgControlItem::makeSpacedBox(), IgControlCategory::panel(), IgState::put(), row, IgQtAxisAlignment::setMaxAxisAlign(), IgQtAxisAlignment::setMinAxisAlign(), IgControlCategory::topLayout(), and IgQtAxisAlignment::widget().

00027     : IgControlCategory (state, "RZ View"),
00028       m_source (source),
00029       m_axisAlignment (0)
00030 {
00031     int         row   = bodyLayout ()->numRows ();
00032     ASSERT (row >= 0);
00033     
00034     //Add ComboBox to change the type of selected light
00035     QHBoxLayout *topRow = new QHBoxLayout (topLayout ());
00036     topRow->addItem (new QSpacerItem (20, 20, QSizePolicy::Expanding));
00037 
00038 
00039     // Alignment widget
00040     QWidget *area = bodyArea ();    
00041     QWidget     *vlab = makeIndentedLabel ("Align Camera",
00042                                             area);
00043     bodyLayout ()->addWidget (vlab, row, 0);
00044 
00045     m_axisAlignment = new IgQtAxisAlignment (area);
00046 
00047     m_axisAlignment->setMaxAxisAlign (1.);
00048     m_axisAlignment->setMinAxisAlign (0.);
00049     bodyLayout ()->addWidget (makeSpacedBox (area, m_axisAlignment->widget ()),
00050                               row++, 1);
00051 
00052     // Tooltips
00053     QWhatsThis::add (panel (), "RZ-View Properties Category");
00054 
00055     QWhatsThis::add (m_axisAlignment->widget (),
00056                    "Axis alignment of the lego view");
00057 
00058     connect (m_axisAlignment,   SIGNAL (dirty ()),
00059              this,              SLOT (alignAxis ()));    
00060     state->put (s_key, this);
00061 }

IgRZViewPropertiesCategory::~IgRZViewPropertiesCategory ( void   ) 

Definition at line 63 of file IgRZViewPropertiesCategory.cc.

References IgState::detach(), and IgControlCategory::state().

00064 {
00065     state ()->detach (s_key);    
00066 }

IgRZViewPropertiesCategory::IgRZViewPropertiesCategory ( const IgRZViewPropertiesCategory  )  [private]


Member Function Documentation

void IgRZViewPropertiesCategory::alignAxis ( void   )  [virtual, slot]

Definition at line 72 of file IgRZViewPropertiesCategory.cc.

References ASSERT, m_axisAlignment, m_source, IgControlItem::setClean(), IgRZBrowser::viewPlaneX(), IgRZBrowser::viewPlaneY(), IgRZBrowser::viewPlaneZ(), IgQtAxisAlignment::xAlign(), IgQtAxisAlignment::yAlign(), and IgQtAxisAlignment::zAlign().

Referenced by IgRZViewPropertiesCategory().

00073 {
00074     ASSERT (m_source);
00075     if (m_axisAlignment->xAlign ())
00076       m_source->viewPlaneX ();
00077     else if (m_axisAlignment->yAlign ())
00078       m_source->viewPlaneY ();
00079     else if (m_axisAlignment->zAlign ())
00080       m_source->viewPlaneZ ();
00081     m_axisAlignment->setClean ();    
00082 }

void IgRZViewPropertiesCategory::browserChanged ( IgRZBrowser source  )  [virtual]

Definition at line 97 of file IgRZViewPropertiesCategory.cc.

References m_source.

Referenced by registerBrowser().

00098 {
00099     if (source)
00100       m_source = source;        
00101 }

IgRZViewPropertiesCategory::IG_DECLARE_STATE_ELEMENT ( IgRZViewPropertiesCategory   )  [private]

IgRZViewPropertiesCategory& IgRZViewPropertiesCategory::operator= ( const IgRZViewPropertiesCategory  )  [private]

void IgRZViewPropertiesCategory::registerBrowser ( IgState state,
IgRZBrowser source 
) [virtual]

Definition at line 85 of file IgRZViewPropertiesCategory.cc.

References IgQtAppContextService::addOnFocusIn(), ASSERT, browserChanged(), lat::CreateCallback(), DBSPlugin::get(), m_source, and IgControlCategory::registerMe().

Referenced by IgRZWindow::initCategories().

00086 {
00087     IgQtAppContextService *cs = IgQtAppContextService::get (state);
00088     ASSERT (cs);
00089     cs->addOnFocusIn (lat::CreateCallback (this,
00090                                            &IgRZViewPropertiesCategory::browserChanged,
00091                                            source));
00092     IgControlCategory::registerMe (state);
00093     m_source = source;
00094 }


Member Data Documentation

IgQtAxisAlignment* IgRZViewPropertiesCategory::m_axisAlignment [private]

Definition at line 45 of file IgRZViewPropertiesCategory.h.

Referenced by alignAxis(), and IgRZViewPropertiesCategory().

IgRZBrowser* IgRZViewPropertiesCategory::m_source [private]

Definition at line 43 of file IgRZViewPropertiesCategory.h.

Referenced by alignAxis(), browserChanged(), and registerBrowser().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:25:38 2009 for CMSSW by  doxygen 1.5.4