#include <Iguana/GLBrowsers/interface/IgQtRangeMControl.h>
Public Slots | |
virtual void | newIndex (int index) |
Public Member Functions | |
int | currentIndex (void) const |
IgQtRangeMControl (QWidget *parent, int parts, unsigned int size=1, const char *name=0) | |
virtual void | resizeIndex (unsigned int size) |
Protected Slots | |
virtual void | updateTextValue (void) |
Protected Attributes | |
QComboBox * | m_index |
bool | m_indexPart |
Definition at line 18 of file IgQtRangeMControl.h.
IgQtRangeMControl::IgQtRangeMControl | ( | QWidget * | parent, | |
int | parts, | |||
unsigned int | size = 1 , |
|||
const char * | name = 0 | |||
) |
Definition at line 19 of file IgQtRangeMControl.cc.
References HLT_VtxMuL3::connect, IgQtRangeControlCommon::IndexPart, IgQtRangeControlCommon::initialize(), layout, m_index, m_indexPart, IgQtRangeControlCommon::m_layout, IgQtRangeControlCommon::m_widget, newIndex(), and resizeIndex().
00022 : IgQtRangeControlCommon (parent, parts, name) 00023 { 00024 QHBoxLayout *layout = new QHBoxLayout (m_widget, 2, 5); 00025 00026 // Add the listbox for index 00027 m_index = new QComboBox (m_widget); 00028 layout->addWidget (m_index); 00029 m_index->hide (); 00030 if (parts & IndexPart) 00031 { 00032 m_indexPart = true; 00033 connect (m_index, SIGNAL (activated (int)), this, SLOT (newIndex (int))); 00034 } 00035 else 00036 m_indexPart = false; 00037 00038 m_layout = new QVBoxLayout (layout, 0, 0); 00039 IgQtRangeControlCommon::initialize (parts); 00040 resizeIndex (size); 00041 }
Definition at line 91 of file IgQtRangeMControl.cc.
References m_index.
Referenced by IgQtRangeMControlFloat::adjustSliderSteps(), IgQtRangeMControlFloat::editSettings(), IgQtRangeMControlFloat::fwdMax(), IgQtRangeMControlFloat::moveValue(), IgQtRangeMControlFloat::revMin(), IgQtRangeMControlFloat::setValue(), IgQtRangeMControlFloat::sliderChanged(), and IgQtRangeMControlFloat::updateTextValue().
00092 { return m_index->currentItem (); }
Definition at line 77 of file IgQtRangeMControl.cc.
References ASSERT, count, m_index, and updateTextValue().
Referenced by IgQtRangeMControl().
00078 { 00079 ASSERT (index < m_index->count () && index >= 0); 00080 m_index->setCurrentItem(index); 00081 updateTextValue (); 00082 }
Definition at line 47 of file IgQtRangeMControl.cc.
References i, m_index, and m_indexPart.
Referenced by IgQtRangeMControl(), IgQtRangeMControlImp< short >::resize(), and IgQtRangeMControlFloat::resize().
00048 { 00049 int countDiff = size - m_index->count (); 00050 if (countDiff == 0) return; 00051 00052 if (countDiff > 0) 00053 { 00054 for (unsigned int i = size - countDiff; i < size; i++) 00055 m_index->insertItem (QString::number (i)); 00056 } 00057 else { 00058 for (unsigned int i = size - countDiff - 1 ; i >= size; i--) 00059 m_index->removeItem (i); 00060 } 00061 if (size) 00062 m_index->setCurrentItem(0); 00063 00064 if (m_indexPart) 00065 { 00066 if(size > 1) 00067 m_index->show (); 00068 else 00069 m_index->hide (); 00070 } 00071 }
Reimplemented in IgQtRangeMControlFloat, IgQtRangeMControlImp< T >, IgQtRangeMControlImp< long >, IgQtRangeMControlImp< unsigned long >, IgQtRangeMControlImp< int >, IgQtRangeMControlImp< unsigned int >, IgQtRangeMControlImp< unsigned short >, and IgQtRangeMControlImp< short >.
Definition at line 85 of file IgQtRangeMControl.cc.
Referenced by newIndex(), and IgQtRangeMControlImp< short >::setValue().
QComboBox* IgQtRangeMControl::m_index [protected] |
Definition at line 42 of file IgQtRangeMControl.h.
Referenced by currentIndex(), IgQtRangeMControl(), IgQtRangeMControlImp< T >::moveValue(), newIndex(), resizeIndex(), and IgQtRangeMControlImp< T >::updateTextValue().
bool IgQtRangeMControl::m_indexPart [protected] |
Definition at line 43 of file IgQtRangeMControl.h.
Referenced by IgQtRangeMControl(), and resizeIndex().