CMS 3D CMS Logo

IgGL2PSPrintCategory Class Reference

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

Inheritance diagram for IgGL2PSPrintCategory:

IgCommonViewCategory IgStateElement IgControlCategory IgControlItem

List of all members.

Public Member Functions

virtual void browserChanged (Ig3DBaseBrowser *browser)
 IgGL2PSPrintCategory (IgState *state)
 ~IgGL2PSPrintCategory ()

Private Slots

virtual void setGL2PSOptions (void)
virtual void updateGL2PSOptions (void)

Private Member Functions

void addGL2PSOptionTab (void)
 IG_DECLARE_STATE_ELEMENT (IgGL2PSPrintCategory)

Private Attributes

QCheckBox * m_gl2psBackGround
QCheckBox * m_gl2psBestRoot
QCheckBox * m_gl2psLandScape
QCheckBox * m_gl2psOcclusionCulling
QCheckBox * m_gl2psSimpleLineOffset

Static Private Attributes

static bool updated = false


Detailed Description

Definition at line 19 of file IgGL2PSPrintCategory.h.


Constructor & Destructor Documentation

IgGL2PSPrintCategory::IgGL2PSPrintCategory ( IgState state  ) 

Definition at line 30 of file IgGL2PSPrintCategory.cc.

References addGL2PSOptionTab(), and IgState::put().

00031     : IgCommonViewCategory (state, "GL2PS Printing"),
00032       m_gl2psSimpleLineOffset (0),
00033       m_gl2psBestRoot         (0),
00034       m_gl2psOcclusionCulling (0),
00035       m_gl2psBackGround       (0),      
00036       m_gl2psLandScape        (0)
00037 {
00038     addGL2PSOptionTab ();
00039     state->put (s_key, this);
00040 }

IgGL2PSPrintCategory::~IgGL2PSPrintCategory ( void   ) 

Definition at line 42 of file IgGL2PSPrintCategory.cc.

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

00043 { state()->detach (s_key); }


Member Function Documentation

void IgGL2PSPrintCategory::addGL2PSOptionTab ( void   )  [private]

Definition at line 47 of file IgGL2PSPrintCategory.cc.

References reco::fitHelper::add(), HLT_VtxMuL3::connect, m_gl2psBackGround, m_gl2psBestRoot, m_gl2psLandScape, m_gl2psOcclusionCulling, m_gl2psSimpleLineOffset, IgControlCategory::panel(), setGL2PSOptions(), IgControlCategory::topArea(), and IgControlCategory::topLayout().

Referenced by IgGL2PSPrintCategory().

00048 {
00049     QWidget     *printOptions = new QWidget (topArea ());
00050     topLayout ()->addWidget (printOptions);
00051     
00052     QVBoxLayout *printOptionsVLayout = new QVBoxLayout (printOptions, 5, 6, "printOptionsLayout");
00053     QGridLayout *printOptionsLayout  = new QGridLayout (printOptionsVLayout);
00054     
00055 
00056     m_gl2psSimpleLineOffset = new QCheckBox (printOptions, "m_gl2psSimpleLineOffset");
00057     m_gl2psSimpleLineOffset->setText (tr ("Simple Line Offset"));
00058     QWhatsThis::add (m_gl2psSimpleLineOffset, tr ("Enable/disable simple line offset. "
00059                                                   "A small offset is added in the z-buffer "
00060                                                   "to all the lines in the scene graph."));
00061 
00062     printOptionsLayout->addWidget (m_gl2psSimpleLineOffset, 0, 0);
00063     
00064     m_gl2psBestRoot = new QCheckBox (printOptions, "m_gl2psBestRoot");
00065     m_gl2psBestRoot->setText (tr ("Best Root"));
00066     QWhatsThis::add (m_gl2psBestRoot, tr ("Enable/disable best root finding for BSP. "
00067                                           "The construction of the BSP tree is optimized "
00068                                           "by choosing the root primitives leading to "
00069                                           "the minimum number of splits."));
00070 
00071     printOptionsLayout->addWidget (m_gl2psBestRoot, 0, 1);
00072     
00073     m_gl2psOcclusionCulling = new QCheckBox (printOptions, "m_gl2psOcclusionCulling");
00074     m_gl2psOcclusionCulling->setText (tr ("Occlusion Culling"));
00075     QWhatsThis::add (m_gl2psOcclusionCulling, tr ("Enable/disable occlusion culling. "
00076                                                   "All the hidden polygons are removed from the "
00077                                                   "output, thus substantially reducing the size "
00078                                                   "of the output file."));
00079 
00080     printOptionsLayout->addWidget (m_gl2psOcclusionCulling, 1, 0);
00081     
00082     m_gl2psBackGround = new QCheckBox (printOptions, "m_gl2psBackGround");
00083     m_gl2psBackGround->setText (tr ("Back ground"));
00084     QWhatsThis::add (m_gl2psBackGround, tr ("Enable/disable back ground printing."));
00085 
00086     printOptionsLayout->addWidget (m_gl2psBackGround, 1, 1);
00087     
00088     m_gl2psLandScape = new QCheckBox (printOptions, "m_gl2psLandScape");
00089     m_gl2psLandScape->setText (tr ("Land scape orientation"));
00090     QWhatsThis::add (m_gl2psLandScape, tr ("Landscape orientation instead of portrait."));
00091 
00092     printOptionsLayout->addWidget (m_gl2psLandScape, 2, 0);
00093     
00094     printOptionsVLayout->addItem (new QSpacerItem ( 0, 0, QSizePolicy::Expanding,
00095                                                     QSizePolicy::Expanding));
00096 
00097     connect (m_gl2psSimpleLineOffset, SIGNAL (clicked (void)),
00098              this,                    SLOT   (setGL2PSOptions(void)));
00099     connect (m_gl2psBestRoot,         SIGNAL (clicked (void)),
00100              this,                    SLOT   (setGL2PSOptions(void)));
00101     connect (m_gl2psOcclusionCulling, SIGNAL (clicked (void)),
00102              this,                    SLOT   (setGL2PSOptions(void)));
00103     connect (m_gl2psBackGround,       SIGNAL (clicked (void)),
00104              this,                    SLOT   (setGL2PSOptions(void)));
00105     connect (m_gl2psLandScape,        SIGNAL (clicked (void)),
00106              this,                    SLOT   (setGL2PSOptions(void)));
00107     
00108     QWhatsThis::add (panel (), "Edit GL2PS printing properties");
00109     QWhatsThis::add (printOptions, "Edit GL2PS printing properties");
00110 }

void IgGL2PSPrintCategory::browserChanged ( Ig3DBaseBrowser browser  )  [virtual]

Reimplemented from IgCommonViewCategory.

Definition at line 113 of file IgGL2PSPrintCategory.cc.

References IgCommonViewCategory::browserChanged(), setGL2PSOptions(), updated, and updateGL2PSOptions().

00114 {
00115     if (source)
00116     {
00117         IgCommonViewCategory::browserChanged (source);
00118         if (!updated)
00119             updateGL2PSOptions ();
00120         else
00121             setGL2PSOptions ();
00122     }
00123 }

IgGL2PSPrintCategory::IG_DECLARE_STATE_ELEMENT ( IgGL2PSPrintCategory   )  [private]

void IgGL2PSPrintCategory::setGL2PSOptions ( void   )  [private, virtual, slot]

Definition at line 139 of file IgGL2PSPrintCategory.cc.

References GL2PS_BEST_ROOT, GL2PS_DRAW_BACKGROUND, GL2PS_LANDSCAPE, GL2PS_OCCLUSION_CULL, GL2PS_SIMPLE_LINE_OFFSET, m_gl2psBackGround, m_gl2psBestRoot, m_gl2psLandScape, m_gl2psOcclusionCulling, m_gl2psSimpleLineOffset, IgCommonViewCategory::m_source, and Ig3DBaseBrowser::setGL2PSOptions().

Referenced by addGL2PSOptionTab(), and browserChanged().

00140 {
00141     int gl2psOptions = 0;
00142     
00143     if ( m_gl2psBackGround->isChecked ())
00144         gl2psOptions |= GL2PS_DRAW_BACKGROUND;
00145     if ( m_gl2psSimpleLineOffset->isChecked ())
00146         gl2psOptions |= GL2PS_SIMPLE_LINE_OFFSET;
00147     if ( m_gl2psBestRoot->isChecked ())
00148         gl2psOptions |= GL2PS_BEST_ROOT;
00149     if ( m_gl2psOcclusionCulling->isChecked ())
00150         gl2psOptions |= GL2PS_OCCLUSION_CULL;
00151     if ( m_gl2psLandScape->isChecked ())
00152         gl2psOptions |= GL2PS_LANDSCAPE;
00153       
00154     m_source->setGL2PSOptions (gl2psOptions);
00155 }

void IgGL2PSPrintCategory::updateGL2PSOptions ( void   )  [private, virtual, slot]

Definition at line 127 of file IgGL2PSPrintCategory.cc.

References Ig3DBaseBrowser::getGL2PSOptions(), GL2PS_BEST_ROOT, GL2PS_DRAW_BACKGROUND, GL2PS_LANDSCAPE, GL2PS_OCCLUSION_CULL, GL2PS_SIMPLE_LINE_OFFSET, m_gl2psBackGround, m_gl2psBestRoot, m_gl2psLandScape, m_gl2psOcclusionCulling, m_gl2psSimpleLineOffset, IgCommonViewCategory::m_source, and updated.

Referenced by browserChanged().

00128 {
00129     int gl2psOptions = m_source->getGL2PSOptions ();
00130     m_gl2psBackGround->setChecked (gl2psOptions & GL2PS_DRAW_BACKGROUND);
00131     m_gl2psSimpleLineOffset->setChecked (gl2psOptions & GL2PS_SIMPLE_LINE_OFFSET);
00132     m_gl2psBestRoot->setChecked (gl2psOptions & GL2PS_BEST_ROOT);
00133     m_gl2psOcclusionCulling->setChecked (gl2psOptions & GL2PS_OCCLUSION_CULL);
00134     m_gl2psLandScape->setChecked (gl2psOptions & GL2PS_LANDSCAPE);
00135     updated = true;
00136 }


Member Data Documentation

QCheckBox* IgGL2PSPrintCategory::m_gl2psBackGround [private]

Definition at line 41 of file IgGL2PSPrintCategory.h.

Referenced by addGL2PSOptionTab(), setGL2PSOptions(), and updateGL2PSOptions().

QCheckBox* IgGL2PSPrintCategory::m_gl2psBestRoot [private]

Definition at line 39 of file IgGL2PSPrintCategory.h.

Referenced by addGL2PSOptionTab(), setGL2PSOptions(), and updateGL2PSOptions().

QCheckBox* IgGL2PSPrintCategory::m_gl2psLandScape [private]

Definition at line 42 of file IgGL2PSPrintCategory.h.

Referenced by addGL2PSOptionTab(), setGL2PSOptions(), and updateGL2PSOptions().

QCheckBox* IgGL2PSPrintCategory::m_gl2psOcclusionCulling [private]

Definition at line 40 of file IgGL2PSPrintCategory.h.

Referenced by addGL2PSOptionTab(), setGL2PSOptions(), and updateGL2PSOptions().

QCheckBox* IgGL2PSPrintCategory::m_gl2psSimpleLineOffset [private]

Definition at line 38 of file IgGL2PSPrintCategory.h.

Referenced by addGL2PSOptionTab(), setGL2PSOptions(), and updateGL2PSOptions().

bool IgGL2PSPrintCategory::updated = false [static, private]

Definition at line 43 of file IgGL2PSPrintCategory.h.

Referenced by browserChanged(), and updateGL2PSOptions().


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