CMS 3D CMS Logo

Ig3DZoomControl Class Reference

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

List of all members.

Public Slots

virtual void zoomIn (void)
virtual void zoomOut (void)

Signals

void zoom (float)

Public Member Functions

 Ig3DZoomControl (QWidget *parent=0, const char *name=0)
unsigned int zoomValue (void)

Private Slots

virtual void setZoom (const QString &item)

Private Attributes

unsigned int m_zoomValue


Detailed Description

Definition at line 16 of file Ig3DZoomControl.h.


Constructor & Destructor Documentation

Ig3DZoomControl::Ig3DZoomControl ( QWidget *  parent = 0,
const char *  name = 0 
)

Definition at line 19 of file Ig3DZoomControl.cc.

References HLT_VtxMuL3::connect, in, layout, out, setZoom(), zoomIn(), and zoomOut().

00020     : QWidget (parent, name),
00021       m_zoomValue (2)
00022 {
00023     QHBoxLayout *layout = new QHBoxLayout (this, 0, 5);
00024     QComboBox   *items = new QComboBox (this);
00025 
00026     // items->setFixedHeight (20);
00027     // items->setFixedWidth (50);
00028     items->insertItem ("2");
00029     items->insertItem ("5");
00030     items->insertItem ("10");
00031     items->insertItem ("100");
00032     items->setCurrentItem (0);
00033     items->setEditable (false);
00034     // items->setSizePolicy (QSizePolicy (QSizePolicy::Minimum,
00035     // QSizePolicy::Minimum));
00036 
00037     IgQtPixButton *in = new IgQtPixButton (QPixmap (), this);
00038     // in->setFixedHeight (20);
00039     // in->setFixedWidth (60);
00040     in->setText ("Zoom In");
00041     // in->setSizePolicy (QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum));
00042 
00043     IgQtPixButton *out = new IgQtPixButton (QPixmap (), this);
00044     // out->setFixedHeight (20);
00045     // out->setFixedWidth (60);
00046     out->setText ("Zoom Out");
00047     // out->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum));
00048 
00049     layout->addItem (new QSpacerItem (20, 20, QSizePolicy::Expanding));
00050     layout->addWidget (in);
00051     layout->addWidget (items);
00052     layout->addWidget (out);
00053     layout->addItem (new QSpacerItem (20, 20, QSizePolicy::Expanding));
00054 
00055     connect (in,    SIGNAL(clicked()), this, SLOT(zoomIn()));
00056     connect (out,   SIGNAL(clicked()), this, SLOT(zoomOut()));
00057     connect (items, SIGNAL(activated(const QString &)),
00058              this,  SLOT(setZoom(const QString &)));
00059 }


Member Function Documentation

void Ig3DZoomControl::setZoom ( const QString &  item  )  [private, virtual, slot]

Definition at line 74 of file Ig3DZoomControl.cc.

References m_zoomValue.

Referenced by Ig3DZoomControl().

00075 { m_zoomValue = value.toUInt (); }

void Ig3DZoomControl::zoom ( float   )  [signal]

Referenced by zoomIn(), and zoomOut().

void Ig3DZoomControl::zoomIn ( void   )  [virtual, slot]

Definition at line 62 of file Ig3DZoomControl.cc.

References m_zoomValue, and zoom().

Referenced by Ig3DZoomControl().

00063 { emit zoom (1.0/m_zoomValue); }

void Ig3DZoomControl::zoomOut ( void   )  [virtual, slot]

Definition at line 66 of file Ig3DZoomControl.cc.

References m_zoomValue, and zoom().

Referenced by Ig3DZoomControl().

00067 { emit zoom (m_zoomValue); }

unsigned int Ig3DZoomControl::zoomValue ( void   ) 

Definition at line 70 of file Ig3DZoomControl.cc.

References m_zoomValue.

00071 { return m_zoomValue; }


Member Data Documentation

unsigned int Ig3DZoomControl::m_zoomValue [private]

Definition at line 38 of file Ig3DZoomControl.h.

Referenced by setZoom(), zoomIn(), zoomOut(), and zoomValue().


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