#include <Iguana/GLBrowsers/interface/IgControlCategory.h>
Public Types | |
enum | { MultiItem = 1, ManageItems = 2, MonitorChanges = 4, SplitterArea = 8 } |
Public Slots | |
virtual void | apply (void) |
virtual void | attach (void) |
virtual void | detach (void) |
virtual void | focusIn (void) |
virtual void | focusOut (void) |
virtual void | hide (void) |
virtual void | revert (void) |
virtual void | setDirty (bool value) |
virtual void | setShown (bool show) |
virtual void | show (void) |
virtual void | track (bool value) |
virtual void | update (void) |
Signals | |
void | empty (bool status) |
void | tracking (bool mode) |
Public Member Functions | |
virtual void | addItem (QString label, bool editable=true) |
virtual QWidget * | bodyArea (void) |
virtual QGridLayout * | bodyLayout (void) |
virtual QWidget * | bottomArea (void) |
virtual QVBoxLayout * | bottomLayout (void) |
virtual void | clearBodyArea (void) |
virtual void | clearCategory (void) |
virtual void | clearLeftArea (void) |
virtual int | currentItem (void) const |
virtual const QString | currentText (void) const |
const QString & | getHelpURL (void) const |
const QPixmap & | getIcon (void) const |
void | hideBodyScrollArea (void) const |
IgControlCategory (IgState *state, const QString &name, int flags=0) | |
virtual bool | isItemEditable (int index) const |
virtual bool | isTracking (void) const |
virtual int | items (void) const |
virtual QWidget * | leftArea (void) |
virtual QVBoxLayout * | leftLayout (void) |
QWidget * | makeIndentedLabel (QString label, QWidget *area) |
virtual QWidget * | panel (void) |
virtual QHBoxLayout * | panelLayout (void) |
void | popIndent (void) |
void | pushIndent (void) |
virtual void | registerMe (IgState *state) |
void | removeableItem (bool option) |
virtual void | removeItem (int index) |
virtual QWidget * | rightArea (void) |
virtual QVBoxLayout * | rightLayout (void) |
virtual void | setCurrentItem (int index) |
virtual void | setItemEditable (int index, bool editable=true) |
virtual void | setTracking (bool) |
void | showBodyScrollArea (void) const |
IgState * | state (void) |
virtual QWidget * | topArea (void) |
virtual QVBoxLayout * | topLayout (void) |
Protected Slots | |
virtual void | createNewItem (void) |
virtual void | deleteItem (void) |
virtual void | itemChanged (int newItem) |
virtual void | renameItem (const QString &newName) |
Protected Member Functions | |
void | setHelpURL (const QString &url) |
void | setIcon (const QPixmap &icon) |
Private Attributes | |
QWidget * | m_bodyArea |
QGridLayout * | m_bodyLayout |
QVBoxLayout * | m_bottomLayout |
int | m_current |
QToolButton * | m_deleteItem |
std::vector< bool > | m_editable |
int | m_flags |
QString | m_helpURL |
QPixmap | m_icon |
int | m_indentLevel |
QComboBox * | m_items |
QWidget * | m_leftArea |
QToolButton * | m_newItem |
QFrame * | m_panel |
QWidget * | m_rightArea |
IgQtScrollView * | m_rightScrollArea |
IgState * | m_state |
QVBoxLayout * | m_topLayout |
QCheckBox * | m_tracker |
Definition at line 30 of file IgControlCategory.h.
anonymous enum |
MultiItem |
Constructor flag to indicate this control category manages multiple objects, and should have a combobox in the topArea() to choose among them.
The pane in the bodyArea() below the combo box shows the properties of the currently selected object. |
ManageItems |
Constructor flag to indicate that a MultiItem category also wants an interface to create, delete and rename the items.
|
MonitorChanges |
Constructor flag to indicate that this control category provides an option to automatically track changes made in the GUI and to apply them automatically.
This causes a checkbox to be added to the bottomArea(). Toggling the checkbox causes tracking() signal to be sent; subclasses should connect that signal to the slots of the relevant control items (see IgControlBase::track()). Creating the connection causes the IgControlBase::apply() methods to be invoked for control items whose values are changing while change monitoring is on. |
SplitterArea |
Constructor flag to indicate that this control category provides a splitter area.
|
Definition at line 34 of file IgControlCategory.h.
00034 { 00040 MultiItem = 1, 00041 00045 ManageItems = 2, 00046 00057 MonitorChanges = 4, 00058 00061 SplitterArea = 8 00062 };
Definition at line 35 of file IgControlCategory.cc.
References ASSERT, clearCategory(), ManageItems, MonitorChanges, MultiItem, and SplitterArea.
00037 : m_state (state), 00038 m_panel (0), 00039 m_leftArea (0), 00040 m_rightArea (0), 00041 m_bodyArea (0), 00042 m_rightScrollArea (0), 00043 m_topLayout (0), 00044 m_bodyLayout (0), 00045 m_bottomLayout (0), 00046 m_tracker (0), 00047 m_items (0), 00048 m_newItem (0), 00049 m_deleteItem (0), 00050 m_current (-1), 00051 m_indentLevel (0), 00052 m_flags (flags), 00053 m_helpURL ("") 00054 { 00055 ASSERT (! (flags & ~(MultiItem | ManageItems | MonitorChanges | SplitterArea))); 00056 setName (name); 00057 clearCategory (); 00058 }
Definition at line 312 of file IgControlCategory.cc.
References ASSERT, empty(), m_editable, m_items, and setCurrentItem().
Referenced by Ig3DObjectCategory< T >::add().
00313 { 00314 ASSERT (m_items); 00315 ASSERT ((size_t) m_items->count () == m_editable.size ()); 00316 ASSERT (! label.isEmpty ()); 00317 m_items->insertItem (label); 00318 m_editable.push_back (editable); 00319 if (m_items->count () == 1) 00320 { 00321 setCurrentItem (0); 00322 emit empty (false); 00323 } 00324 }
Reimplemented in Ig2DViewPropertiesCategory, Ig3DAnimsCategory, Ig3DClipsCategory, Ig3DFieldPlanesCategory, Ig3DGridCategory, Ig3DLightsCategory, Ig3DNodeCategory, Ig3DSlicersCategory, and Ig3DViewpointsCategory.
Definition at line 549 of file IgControlCategory.cc.
Referenced by IgControlCentre::apply().
Reimplemented in Ig3DAnimsCategory, Ig3DClipsCategory, Ig3DFieldPlanesCategory, Ig3DGridCategory, Ig3DLightsCategory, Ig3DNodeCategory, Ig3DSlicersCategory, and Ig3DViewpointsCategory.
Definition at line 537 of file IgControlCategory.cc.
Referenced by itemChanged().
QWidget * IgControlCategory::bodyArea | ( | void | ) | [virtual] |
Definition at line 452 of file IgControlCategory.cc.
References m_bodyArea.
Referenced by Ig3DGridCategory::addButtons(), Ig3DNodeCategory::addFields(), Ig2DViewPropertiesCategory::Ig2DViewPropertiesCategory(), Ig3DAxisRotationControl::Ig3DAxisRotationControl(), Ig3DBoolControl::Ig3DBoolControl(), Ig3DColorControl::Ig3DColorControl(), Ig3DEnumControl::Ig3DEnumControl(), Ig3DFieldPlanesCategory::Ig3DFieldPlanesCategory(), Ig3DLightsCategory::Ig3DLightsCategory(), Ig3DMBoolControl::Ig3DMBoolControl(), Ig3DMColorControl::Ig3DMColorControl(), Ig3DMStringControl::Ig3DMStringControl(), Ig3DPlaneControl::Ig3DPlaneControl(), Ig3DRangeControl< C1, C2, C3 >::Ig3DRangeControl(), Ig3DRangeMControl< C1, C2, C3 >::Ig3DRangeMControl(), Ig3DRotationFControl::Ig3DRotationFControl(), Ig3DStringControl::Ig3DStringControl(), Ig3DVectorBaseControl::Ig3DVectorBaseControl(), Ig3DViewpointsCategory::Ig3DViewpointsCategory(), IgLegoViewPropertiesCategory::IgLegoViewPropertiesCategory(), IgRPhiViewPropertiesCategory::IgRPhiViewPropertiesCategory(), IgRZViewPropertiesCategory::IgRZViewPropertiesCategory(), IgSpareViewPropertiesCategory::IgSpareViewPropertiesCategory(), Ig3DVectorBaseControl::makeControl(), Ig3DAxisRotationControl::makeWheelControl(), Ig3DNodeCategory::manipulate(), Ig3DNodeCategory::manipulateItem(), and Ig2DViewPropertiesCategory::setCuttingPlane().
00453 { return m_bodyArea; }
QGridLayout * IgControlCategory::bodyLayout | ( | void | ) | [virtual] |
Definition at line 456 of file IgControlCategory.cc.
References m_bodyLayout.
Referenced by Ig3DGridCategory::addButtons(), Ig3DNodeCategory::addFields(), IgControlBase::addGridLayout(), IgControlBase::addGridWidget(), IgSceneManagerCategory::addSceneManagerTab(), IgControlBase::gridRows(), Ig2DViewPropertiesCategory::Ig2DViewPropertiesCategory(), Ig3DAxisRotationControl::Ig3DAxisRotationControl(), Ig3DBoolControl::Ig3DBoolControl(), Ig3DColorControl::Ig3DColorControl(), Ig3DEnumControl::Ig3DEnumControl(), Ig3DFieldPlanesCategory::Ig3DFieldPlanesCategory(), Ig3DLightsCategory::Ig3DLightsCategory(), Ig3DMBoolControl::Ig3DMBoolControl(), Ig3DMColorControl::Ig3DMColorControl(), Ig3DMStringControl::Ig3DMStringControl(), Ig3DPlaneControl::Ig3DPlaneControl(), Ig3DRangeControl< C1, C2, C3 >::Ig3DRangeControl(), Ig3DRangeMControl< C1, C2, C3 >::Ig3DRangeMControl(), Ig3DRotationFControl::Ig3DRotationFControl(), Ig3DStringControl::Ig3DStringControl(), Ig3DVectorBaseControl::Ig3DVectorBaseControl(), Ig3DViewpointsCategory::Ig3DViewpointsCategory(), IgLegoViewPropertiesCategory::IgLegoViewPropertiesCategory(), IgRPhiViewPropertiesCategory::IgRPhiViewPropertiesCategory(), IgRZViewPropertiesCategory::IgRZViewPropertiesCategory(), IgSpareViewPropertiesCategory::IgSpareViewPropertiesCategory(), Ig3DVectorBaseControl::makeControl(), Ig3DNodeCategory::manipulate(), and Ig3DNodeCategory::manipulateItem().
00457 { return m_bodyLayout; }
QWidget * IgControlCategory::bottomArea | ( | void | ) | [virtual] |
Definition at line 460 of file IgControlCategory.cc.
References m_bodyArea.
Referenced by clearBodyArea().
00461 { return m_bodyArea; }
QVBoxLayout * IgControlCategory::bottomLayout | ( | void | ) | [virtual] |
Definition at line 464 of file IgControlCategory.cc.
References m_bottomLayout.
Referenced by IgSceneManagerCategory::addSceneManagerTab(), clearBodyArea(), Ig3DAnimsCategory::Ig3DAnimsCategory(), Ig3DClipsCategory::Ig3DClipsCategory(), Ig3DFieldPlanesCategory::Ig3DFieldPlanesCategory(), Ig3DGridCategory::Ig3DGridCategory(), Ig3DLightsCategory::Ig3DLightsCategory(), Ig3DSlicersCategory::Ig3DSlicersCategory(), Ig3DViewpointsCategory::Ig3DViewpointsCategory(), and Ig3DNodeCategory::manipulateItem().
00465 { return m_bottomLayout; }
Reimplemented in Ig3DNodeCategory.
Definition at line 120 of file IgControlCategory.cc.
References reco::fitHelper::add(), bottomArea(), bottomLayout(), HLT_VtxMuL3::connect, createNewItem(), deleteItem(), IgControlItem::editable(), empty(), flags, itemChanged(), m_bodyArea, m_bodyLayout, m_bottomLayout, m_deleteItem, m_flags, m_items, m_newItem, m_panel, m_rightArea, m_rightScrollArea, m_topLayout, m_tracker, ManageItems, MonitorChanges, MultiItem, panelLayout(), renameItem(), rightLayout(), SplitterArea, topArea(), topLayout(), and track().
Referenced by Ig3DNodeCategory::clearBodyArea(), and clearCategory().
00121 { 00122 // Fill the group box with two areas: the top area (a layout), and 00123 // the body (a widget). The children of body are disabled when 00124 // the category is non-editable, those in the top are not (the 00125 // latter are direct children of this widget). 00126 // 00127 // The body area has two layout children: the body (a grid) and 00128 // bottom (a vbox). The former is filled by subclasses with the 00129 // items, non-grid-aligned items like our tracker goes in the 00130 // latter. Subclasses can insert items before the tracker but 00131 // under the grid layout with QBoxLayout::insertWidget(0, ...). 00132 // (We don't put the tracker into the grid since grids don't 00133 // provide "insert" facility: it would be too inconvenient for 00134 // subclasses to add their items before the tracker if did so.) 00135 // 00136 // All subclass widgets should be created with the appropriate 00137 // xxxArea()/xxxLayout(). We arrange those methods to return 00138 // the right thing: topArea() == m_panel, bottomArea() == body. 00139 //m_panel->setFlat(true); 00140 00141 int flags = m_flags; 00142 if(m_rightArea){ 00143 if (flags & MultiItem) 00144 { 00145 disconnect (m_items, SIGNAL (activated (int)), 00146 this, SLOT (itemChanged (int))); 00147 disconnect (this, SIGNAL (empty (bool)), 00148 m_rightScrollArea, SLOT (setDisabled (bool))); 00149 disconnect (m_items, SIGNAL (textChanged (const QString &)), 00150 this, SLOT (renameItem (const QString &))); 00151 m_items->reparent (0, QPoint(0,0)); 00152 delete m_items; 00153 00154 if (flags & ManageItems) 00155 { 00156 disconnect (m_newItem, SIGNAL (clicked ()), 00157 this, SLOT (createNewItem ())); 00158 disconnect (m_deleteItem, SIGNAL (clicked ()), 00159 this, SLOT (deleteItem ())); 00160 disconnect (this, SIGNAL (empty (bool)), 00161 m_deleteItem, SLOT (setDisabled (bool))); 00162 00163 m_newItem->reparent (0, QPoint(0,0)); 00164 m_deleteItem->reparent (0, QPoint(0,0)); 00165 delete m_newItem; 00166 delete m_deleteItem; 00167 } 00168 } 00169 if (flags & MonitorChanges) 00170 { 00171 disconnect (m_tracker,SIGNAL(toggled(bool)), this,SLOT(track(bool))); 00172 m_tracker->reparent (0, QPoint(0,0)); 00173 delete m_tracker; 00174 } 00175 disconnect (this, SIGNAL(editable(bool)), m_rightScrollArea, SLOT(setEnabled(bool))); 00176 00177 m_rightArea ->reparent (0, QPoint(0,0)); 00178 m_rightScrollArea->reparent (0, QPoint(0,0)); 00179 m_bodyArea->reparent (0, QPoint(0,0)); 00180 panelLayout ()->remove (m_rightArea); 00181 delete m_bottomLayout; 00182 delete m_bodyLayout; 00183 delete m_bodyArea; 00184 delete m_topLayout; 00185 delete m_rightScrollArea; 00186 delete m_rightArea; 00187 } 00188 00189 m_rightArea = new QWidget (m_panel); 00190 if (!(m_flags & SplitterArea)) 00191 panelLayout ()->addWidget (m_rightArea); 00192 new QVBoxLayout (m_rightArea); 00193 m_rightScrollArea = new IgQtScrollView (m_rightArea, "m_rightScrollArea"); 00194 m_rightScrollArea->setFrameStyle(QFrame::Box | QFrame::Plain); 00195 m_rightScrollArea->setResizePolicy (IgQtScrollView::AutoOneFit); 00196 new QGridLayout (m_rightScrollArea); 00197 QGridLayout *fullBodyLayout1 = 00198 new QGridLayout (m_rightScrollArea->viewport (), 1, 1); 00199 00200 m_bodyArea = new QWidget(m_rightScrollArea->viewport()); 00201 m_rightScrollArea->addChild (m_bodyArea); 00202 fullBodyLayout1->addWidget (m_bodyArea, 0, 0); 00203 00204 m_topLayout = new QVBoxLayout (rightLayout ()); 00205 rightLayout ()->addWidget (m_rightScrollArea); 00206 00207 QVBoxLayout *fullBodyLayout = new QVBoxLayout (m_bodyArea, 5); 00208 m_bodyLayout = new QGridLayout (fullBodyLayout); 00209 m_bottomLayout = new QVBoxLayout (fullBodyLayout); 00210 if (flags & MultiItem) 00211 { 00212 QHBoxLayout *topRow = new QHBoxLayout (topLayout ()); 00213 topRow->add (m_items = new QComboBox (topArea ())); 00214 m_items->setEditable(true); 00215 connect (m_items, SIGNAL (activated (int)), 00216 this, SLOT (itemChanged (int))); 00217 connect (this, SIGNAL (empty (bool)), 00218 m_rightScrollArea, SLOT (setDisabled (bool))); 00219 connect (m_items, SIGNAL (textChanged (const QString &)), 00220 this, SLOT (renameItem (const QString &))); 00221 00222 // Adding What's this help messages 00223 const char *text_m_items = 00224 "List of items managed by this category. Click on the small arrow on " 00225 "right to select a different item."; 00226 00227 QWhatsThis::add(m_items, text_m_items); 00228 00229 if (flags & ManageItems) 00230 { 00231 // Add buttons to add or remove items 00232 m_newItem = new QToolButton (topArea ()); 00233 m_newItem->setText ("+"); 00234 m_newItem->setAutoRaise (true); 00235 m_newItem->setFixedSize (20, 20); 00236 00237 m_deleteItem = new QToolButton (topArea ()); 00238 m_deleteItem->setText ("x"); 00239 m_deleteItem->setAutoRaise (true); 00240 m_deleteItem->setFixedSize (20, 20); 00241 00242 topRow->add (m_newItem); 00243 topRow->add (m_deleteItem); 00244 00245 connect (m_newItem, SIGNAL (clicked ()), 00246 this, SLOT (createNewItem ())); 00247 connect (m_deleteItem, SIGNAL (clicked ()), 00248 this, SLOT (deleteItem ())); 00249 connect (this, SIGNAL (empty (bool)), 00250 m_deleteItem, SLOT (setDisabled (bool))); 00251 00252 // Adding What's this help messages 00253 const char *text_m_newItem = 00254 "Click this to add a new item to this category. Newly added " 00255 "item will become the selected item in the item list."; 00256 00257 const char *text_m_deleteItem = 00258 "Click this to delete the current selected item. Item next to " 00259 "the deleted one will become current if exists otherwise item " 00260 "before the deleted one will become current. If there is no " 00261 "item left in the item list then category will be disabled and " 00262 "one can only add new items to it."; 00263 00264 QWhatsThis::add(m_newItem, text_m_newItem); 00265 QWhatsThis::add(m_deleteItem, text_m_deleteItem); 00266 } 00267 } 00268 00269 if (flags & MonitorChanges) 00270 { 00271 QHBoxLayout *trackrow = new QHBoxLayout (bottomLayout ()); 00272 trackrow->add (m_tracker = new QCheckBox ("Track changes", bottomArea ())); 00273 trackrow->addItem (new QSpacerItem (20, 20, QSizePolicy::Expanding)); 00274 m_tracker->setChecked (true); 00275 connect (m_tracker,SIGNAL(toggled(bool)), this,SLOT(track(bool))); 00276 00277 // Adding What's this help messages 00278 const char *text_m_tracker = 00279 "Click this to enable/disable tracking of changes made on the GUI. " 00280 "If enabled then all the changes made on the GUI will automatically " 00281 "be applied."; 00282 00283 QWhatsThis::add(m_tracker, text_m_tracker); 00284 } 00285 connect (this, SIGNAL(editable(bool)), m_rightScrollArea, SLOT(setEnabled(bool))); 00286 }
Reimplemented in Ig3DNodeCategory.
Definition at line 64 of file IgControlCategory.cc.
References reco::fitHelper::add(), IgControlCentre::addCategory(), clearBodyArea(), clearLeftArea(), DBSPlugin::get(), m_flags, m_panel, m_state, name, panel(), IgControlCentre::removeCategory(), SplitterArea, and tmp.
Referenced by Ig3DNodeCategory::clearCategory(), and IgControlCategory().
00065 { 00066 QString name = this->name (); 00067 IgControlCentre *centre = IgStudioCentre::get (m_state)->controlCentre (); 00068 00069 if(m_panel && centre) 00070 centre->removeCategory (this); 00071 00072 if (m_flags & SplitterArea) 00073 m_panel = new QSplitter (); 00074 else 00075 { 00076 QGroupBox *panel = new QGroupBox (name); 00077 panel->setFlat (true); 00078 panel->setTitle (QString::null); 00079 m_panel = panel; 00080 } 00081 00082 m_panel->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding); 00083 m_panel->setLineWidth (0); 00084 new QHBoxLayout (m_panel, 10); 00085 00086 clearLeftArea (); 00087 clearBodyArea (); 00088 00089 m_panel->setEnabled (true); 00090 m_panel->hide (); 00091 00092 //Adding What's this help messages 00093 QString tmp (name); 00094 tmp += " Control Category."; 00095 const char *text_m_panel = tmp.latin1 (); 00096 00097 QWhatsThis::add(m_panel, text_m_panel); 00098 00099 if (centre) 00100 centre->addCategory (this); 00101 }
Definition at line 104 of file IgControlCategory.cc.
References m_flags, m_leftArea, m_panel, panelLayout(), and SplitterArea.
Referenced by clearCategory().
00105 { 00106 if (m_leftArea) 00107 { 00108 panelLayout ()->remove (m_leftArea); 00109 m_leftArea->reparent (0, QPoint(0,0)); 00110 delete m_leftArea->layout (); 00111 delete m_leftArea; 00112 } 00113 m_leftArea = new QWidget (m_panel); 00114 new QVBoxLayout (m_leftArea); 00115 if (!(m_flags & SplitterArea)) 00116 panelLayout ()->addWidget (m_leftArea); 00117 }
Reimplemented in Ig3DAnimsCategory, Ig3DClipsCategory, Ig3DGridCategory, Ig3DLightsCategory, Ig3DSlicersCategory, and Ig3DViewpointsCategory.
Definition at line 362 of file IgControlCategory.cc.
References ASSERT.
Referenced by clearBodyArea().
00363 { 00364 // Base class must override: create a new item into the list 00365 ASSERT (false); 00366 }
Definition at line 295 of file IgControlCategory.cc.
References items(), and m_items.
Referenced by Ig3DViewpointsCategory::alignToAxis(), Ig3DFieldPlanesCategory::applyColorMap(), Ig3DSlicersCategory::attach(), Ig3DClipsCategory::attach(), Ig3DAnimsCategory::attach(), Ig3DFieldPlanesCategory::attach(), Ig3DViewpointsCategory::attach(), Ig3DGridCategory::attach(), Ig3DLightsCategory::attach(), Ig3DViewpointsCategory::autoClipping(), Ig3DClipsCategory::deleteOne(), Ig3DAnimsCategory::deleteOne(), Ig3DFieldPlanesCategory::deleteOne(), Ig3DGridCategory::deleteOne(), Ig3DSlicersCategory::deleteOne(), Ig3DLightsCategory::deleteOne(), Ig3DViewpointsCategory::deleteOne(), itemChanged(), Ig3DLightsCategory::lightTypeChanged(), Ig3DLightsCategory::manipulators(), Ig3DViewpointsCategory::newCamera(), Ig3DLightsCategory::reconstruct(), Ig3DClipsCategory::reconstruct(), Ig3DAnimsCategory::reconstruct(), Ig3DSlicersCategory::reconstruct(), Ig3DGridCategory::reconstruct(), removeableItem(), removeItem(), Ig3DViewpointsCategory::renameItem(), Ig3DSlicersCategory::renameItem(), Ig3DLightsCategory::renameItem(), Ig3DGridCategory::renameItem(), Ig3DClipsCategory::renameItem(), renameItem(), Ig3DAnimsCategory::renameItem(), Ig3DFieldPlanesCategory::renameItem(), Ig3DLightsCategory::update(), Ig3DViewpointsCategory::updateCameraPosition(), and Ig3DViewpointsCategory::zoom().
const QString IgControlCategory::currentText | ( | void | ) | const [virtual] |
Definition at line 299 of file IgControlCategory.cc.
References m_items.
Referenced by Ig3DViewpointsCategory::renameItem(), Ig3DSlicersCategory::renameItem(), Ig3DLightsCategory::renameItem(), Ig3DGridCategory::renameItem(), Ig3DClipsCategory::renameItem(), Ig3DAnimsCategory::renameItem(), and Ig3DFieldPlanesCategory::renameItem().
Reimplemented in Ig3DAnimsCategory, Ig3DClipsCategory, Ig3DGridCategory, Ig3DLightsCategory, Ig3DSlicersCategory, and Ig3DViewpointsCategory.
Definition at line 369 of file IgControlCategory.cc.
References ASSERT.
Referenced by clearBodyArea().
00370 { 00371 // Base class must override; call removeItem and then delete it. 00372 ASSERT (false); 00373 }
Reimplemented in Ig3DAnimsCategory, Ig3DClipsCategory, Ig3DFieldPlanesCategory, Ig3DGridCategory, Ig3DLightsCategory, Ig3DNodeCategory, Ig3DSlicersCategory, and Ig3DViewpointsCategory.
Definition at line 541 of file IgControlCategory.cc.
Referenced by hide(), and itemChanged().
Referenced by addItem(), clearBodyArea(), removeItem(), and show().
Reimplemented in Ig3DNodeCategory, and Ig3DViewpointsCategory.
Definition at line 590 of file IgControlCategory.cc.
Referenced by IgControlCentre::windowActivationChange().
Reimplemented in Ig3DViewpointsCategory.
Definition at line 594 of file IgControlCategory.cc.
References DBSPlugin::get(), and state().
Referenced by Ig3DViewpointsCategory::focusOut(), and IgControlCentre::windowActivationChange().
00595 { IgStudioCentre::get (state ())->controlCentre ()->updateOnWindowActive (); }
const QString & IgControlCategory::getHelpURL | ( | void | ) | const |
Definition at line 614 of file IgControlCategory.cc.
References m_helpURL.
Referenced by IgControlCentre::help().
00615 { return m_helpURL; }
const QPixmap & IgControlCategory::getIcon | ( | void | ) | const |
Reimplemented in Ig3DNodeCategory.
Definition at line 583 of file IgControlCategory.cc.
References detach(), and m_panel.
Referenced by Ig3DNodeCategory::hide(), IgControlCentre::hideCategory(), and setShown().
Definition at line 630 of file IgControlCategory.cc.
References m_rightScrollArea.
Referenced by IgCommonViewCategory::show().
00631 { m_rightScrollArea->hide (); }
Definition at line 394 of file IgControlCategory.cc.
References ASSERT, and m_editable.
Referenced by itemChanged().
00395 { 00396 ASSERT (index == -1 || (index >= 0 && (size_t) index < m_editable.size ())); 00397 return index == -1 ? false : m_editable [index]; 00398 }
Definition at line 432 of file IgControlCategory.cc.
References m_tracker.
Referenced by Ig3DViewpointsCategory::alignToAxis(), Ig3DFieldPlanesCategory::colorMapChanged(), Ig3DNodeCategory::manipulateItem(), show(), and Ig3DViewpointsCategory::zoom().
Reimplemented in Ig3DViewpointsCategory.
Definition at line 516 of file IgControlCategory.cc.
References ASSERT, attach(), currentItem(), detach(), isItemEditable(), m_editable, m_items, m_rightScrollArea, IgControlItem::setEditable(), and update().
Referenced by Ig3DFieldPlanesCategory::addOne(), clearBodyArea(), Ig3DSlicersCategory::createNewItem(), Ig3DLightsCategory::createNewItem(), Ig3DClipsCategory::createNewItem(), Ig3DGridCategory::createNewItem(), Ig3DAnimsCategory::createNewItem(), Ig3DViewpointsCategory::itemChanged(), Ig3DGridCategory::openXMLFile(), removeItem(), and show().
00517 { 00518 ASSERT ( !m_items || (size_t) m_items->count () == m_editable.size ()); 00519 detach (); 00520 attach (); 00521 update (); 00522 setEditable (! m_items || isItemEditable (currentItem ())); 00523 if (!m_rightScrollArea->isHidden ()) 00524 { 00525 QScrollBar *sb = m_rightScrollArea->horizontalScrollBar (); 00526 if (sb->value () != sb->minValue ()) 00527 sb->setValue (sb->minValue ()); 00528 sb = m_rightScrollArea->verticalScrollBar (); 00529 if (sb->value () != sb->minValue ()) 00530 sb->setValue (sb->minValue ()); 00531 } 00532 }
Definition at line 291 of file IgControlCategory.cc.
References m_items.
Referenced by Ig3DFieldPlanesCategory::addOne(), Ig3DSlicersCategory::createNewItem(), Ig3DLightsCategory::createNewItem(), Ig3DClipsCategory::createNewItem(), Ig3DGridCategory::createNewItem(), Ig3DAnimsCategory::createNewItem(), currentItem(), Ig3DObjectCategory< T >::find(), Ig3DLightsCategory::makeOne(), Ig3DAnimsCategory::makeOne(), Ig3DViewpointsCategory::makeOne(), Ig3DGridCategory::openXMLFile(), Ig3DObjectCategory< T >::remove(), Ig3DObjectCategory< T >::rename(), and Ig3DObjectCategory< T >::replace().
QWidget * IgControlCategory::leftArea | ( | void | ) | [virtual] |
Definition at line 476 of file IgControlCategory.cc.
References m_leftArea.
Referenced by Ig3DNodeCategory::manipulate().
00477 { return m_leftArea; }
QVBoxLayout * IgControlCategory::leftLayout | ( | void | ) | [virtual] |
Definition at line 480 of file IgControlCategory.cc.
References m_leftArea.
Referenced by Ig3DNodeCategory::manipulate().
00481 { return dynamic_cast<QVBoxLayout*>(m_leftArea->layout ()); }
QWidget * IgControlCategory::makeIndentedLabel | ( | QString | label, | |
QWidget * | area | |||
) |
Definition at line 495 of file IgControlCategory.cc.
References m_indentLevel.
Referenced by Ig3DNodeCategory::addFields(), IgQtApplicationCategory::addQApplicationTab(), Ig2DViewPropertiesCategory::Ig2DViewPropertiesCategory(), Ig3DFieldPlanesCategory::Ig3DFieldPlanesCategory(), Ig3DViewpointsCategory::Ig3DViewpointsCategory(), IgLegoViewPropertiesCategory::IgLegoViewPropertiesCategory(), IgRPhiViewPropertiesCategory::IgRPhiViewPropertiesCategory(), IgRZViewPropertiesCategory::IgRZViewPropertiesCategory(), IgSpareViewPropertiesCategory::IgSpareViewPropertiesCategory(), IgControlBase::makeIndentedLabel(), Ig3DNodeCategory::manipulate(), and Ig3DNodeCategory::manipulateItem().
00496 { 00497 QHBox *hbox = new QHBox (area); 00498 hbox->layout ()->addItem 00499 (new QSpacerItem (20 * m_indentLevel, 0, QSizePolicy::Fixed)); 00500 new QLabel (label, hbox); 00501 return hbox; 00502 }
QWidget * IgControlCategory::panel | ( | void | ) | [virtual] |
Definition at line 444 of file IgControlCategory.cc.
References m_panel.
Referenced by IgExaminerViewerCategory::addExaminerViewerTab(), IgGL2PSPrintCategory::addGL2PSOptionTab(), IgGLRenderCategory::addGLRenderTab(), IgQtApplicationCategory::addQApplicationTab(), IgSceneManagerCategory::addSceneManagerTab(), Ig3DGridCategory::addTips(), clearCategory(), IgControlCentre::hideCategory(), Ig2DViewPropertiesCategory::Ig2DViewPropertiesCategory(), Ig3DAnimsCategory::Ig3DAnimsCategory(), Ig3DClipsCategory::Ig3DClipsCategory(), Ig3DFieldPlanesCategory::Ig3DFieldPlanesCategory(), Ig3DLightsCategory::Ig3DLightsCategory(), Ig3DSlicersCategory::Ig3DSlicersCategory(), Ig3DViewpointsCategory::Ig3DViewpointsCategory(), IgLegoViewPropertiesCategory::IgLegoViewPropertiesCategory(), IgRPhiViewPropertiesCategory::IgRPhiViewPropertiesCategory(), IgRZViewPropertiesCategory::IgRZViewPropertiesCategory(), IgSpareViewPropertiesCategory::IgSpareViewPropertiesCategory(), Ig3DViewpointsCategory::load(), Ig3DLightsCategory::makeOne(), Ig3DAnimsCategory::makeOne(), Ig3DSlicersCategory::makeOne(), Ig3DClipsCategory::makeOne(), Ig3DViewpointsCategory::makeOne(), Ig3DGridCategory::makeOne(), Ig3DViewpointsCategory::newCamera(), renameItem(), Ig3DViewpointsCategory::save(), Ig3DNodeCategory::saveNode(), and IgControlCentre::showCategory().
00445 { return m_panel; }
QHBoxLayout * IgControlCategory::panelLayout | ( | void | ) | [virtual] |
Definition at line 448 of file IgControlCategory.cc.
References m_panel.
Referenced by clearBodyArea(), and clearLeftArea().
00449 { return dynamic_cast<QHBoxLayout*>(m_panel->layout ()); }
Definition at line 509 of file IgControlCategory.cc.
References ASSERT, and m_indentLevel.
Referenced by Ig3DNodeCategory::addFields(), Ig3DAxisRotationControl::Ig3DAxisRotationControl(), Ig3DPlaneControl::Ig3DPlaneControl(), Ig3DRotationFControl::Ig3DRotationFControl(), and Ig3DVectorBaseControl::Ig3DVectorBaseControl().
00510 { ASSERT (m_indentLevel); m_indentLevel--; }
Definition at line 505 of file IgControlCategory.cc.
References ASSERT, and m_indentLevel.
Referenced by Ig3DNodeCategory::addFields(), Ig3DAxisRotationControl::Ig3DAxisRotationControl(), Ig3DPlaneControl::Ig3DPlaneControl(), Ig3DRotationFControl::Ig3DRotationFControl(), and Ig3DVectorBaseControl::Ig3DVectorBaseControl().
00506 { ASSERT (m_indentLevel >= 0); m_indentLevel++; }
Definition at line 606 of file IgControlCategory.cc.
References IgQtAppContextService::add(), enableCategory(), and DBSPlugin::get().
Referenced by IgRPhiViewPropertiesCategory::registerBrowser(), Ig3DNodeCategory::registerBrowser(), Ig3DObjectCategory< T >::registerBrowser(), Ig2DViewPropertiesCategory::registerBrowser(), IgLegoViewPropertiesCategory::registerBrowser(), Ig3DClipsCategory::registerBrowser(), IgCommonViewCategory::registerBrowser(), Ig3DSlicersCategory::registerBrowser(), Ig3DViewpointsCategory::registerBrowser(), IgRZViewPropertiesCategory::registerBrowser(), IgSpareViewPropertiesCategory::registerBrowser(), Ig3DAnimsCategory::registerBrowser(), Ig3DGridCategory::registerBrowser(), VisCMSMagFieldTwig::VisCMSMagFieldTwig(), and VisG4MagFieldTwig::VisG4MagFieldTwig().
00607 { 00608 IgQtAppContextService *cs = IgQtAppContextService::get (state); 00609 00610 cs->add (&enableCategory, this); 00611 }
Definition at line 401 of file IgControlCategory.cc.
References currentItem(), and m_deleteItem.
Referenced by Ig3DViewpointsCategory::attach(), and Ig3DLightsCategory::attach().
00402 { 00403 if (m_deleteItem && currentItem() >= 0) 00404 m_deleteItem->setEnabled (option); 00405 }
Definition at line 327 of file IgControlCategory.cc.
References ASSERT, IgControlItem::clean(), HLT_VtxMuL3::connect, count, currentItem(), empty(), itemChanged(), m_editable, m_items, and renameItem().
Referenced by Ig3DObjectCategory< T >::remove().
00328 { 00329 ASSERT (m_items); 00330 ASSERT ((size_t) m_items->count () == m_editable.size ()); 00331 ASSERT (index >= 0 && index < m_items->count ()); 00332 int selectedIndex = currentItem (); 00333 00334 disconnect (m_items, SIGNAL (textChanged (const QString &)), 00335 this, SLOT (renameItem (const QString &))); 00336 m_items->removeItem (index); 00337 connect (m_items, SIGNAL (textChanged (const QString &)), 00338 this, SLOT (renameItem (const QString &))); 00339 00340 m_editable.erase (m_editable.begin () + index); 00341 if( index == selectedIndex ) 00342 { 00343 if (currentItem () == -1 || index >= m_items->count ()) 00344 { 00345 if ( m_items->count () > 0 ) 00346 { 00347 m_items->setCurrentItem (index-1); 00348 itemChanged (currentItem ()); 00349 } 00350 else 00351 { 00352 emit empty (true); 00353 emit clean (); 00354 } 00355 } 00356 else 00357 itemChanged (currentItem ()); 00358 } 00359 }
void IgControlCategory::renameItem | ( | const QString & | newName | ) | [protected, virtual, slot] |
Reimplemented in Ig3DAnimsCategory, Ig3DClipsCategory, Ig3DFieldPlanesCategory, Ig3DGridCategory, Ig3DLightsCategory, Ig3DSlicersCategory, and Ig3DViewpointsCategory.
Definition at line 376 of file IgControlCategory.cc.
References HLT_VtxMuL3::connect, currentItem(), m_items, name, edm::Normal, and panel().
Referenced by clearBodyArea(), removeItem(), Ig3DSlicersCategory::renameItem(), Ig3DViewpointsCategory::renameItem(), Ig3DLightsCategory::renameItem(), Ig3DGridCategory::renameItem(), Ig3DClipsCategory::renameItem(), Ig3DAnimsCategory::renameItem(), and Ig3DFieldPlanesCategory::renameItem().
00377 { 00378 bool ok = false; 00379 QString name (QInputDialog::getText (tr("Rename Item"), QString::null, 00380 QLineEdit::Normal, 00381 newName, 00382 &ok, panel ())); 00383 if (! ok || name.isEmpty ()) 00384 return; 00385 00386 disconnect (m_items, SIGNAL (textChanged (const QString &)), 00387 this, SLOT (renameItem (const QString &))); 00388 m_items->changeItem (name, currentItem ()); 00389 connect (m_items, SIGNAL (textChanged (const QString &)), 00390 this, SLOT (renameItem (const QString &))); 00391 }
Definition at line 553 of file IgControlCategory.cc.
References update().
Referenced by IgControlCentre::revert().
00554 { update (); }
QWidget * IgControlCategory::rightArea | ( | void | ) | [virtual] |
Definition at line 484 of file IgControlCategory.cc.
References m_rightArea.
00485 { return m_rightArea; }
QVBoxLayout * IgControlCategory::rightLayout | ( | void | ) | [virtual] |
Definition at line 488 of file IgControlCategory.cc.
References m_rightArea.
Referenced by clearBodyArea().
00489 { return dynamic_cast<QVBoxLayout*>(m_rightArea->layout ()); }
Definition at line 303 of file IgControlCategory.cc.
References ASSERT, count, m_editable, and m_items.
Referenced by addItem(), Ig3DFieldPlanesCategory::addOne(), Ig3DSlicersCategory::createNewItem(), Ig3DLightsCategory::createNewItem(), Ig3DClipsCategory::createNewItem(), Ig3DGridCategory::createNewItem(), Ig3DAnimsCategory::createNewItem(), Ig3DViewpointsCategory::focusIn(), Ig3DGridCategory::openXMLFile(), and Ig3DViewpointsCategory::show().
00304 { 00305 ASSERT (m_items); 00306 ASSERT ((size_t) m_items->count () == m_editable.size ()); 00307 ASSERT (index == -1 || (index >= 0 && index < m_items->count ())); 00308 m_items->setCurrentItem (index); 00309 }
Reimplemented from IgControlItem.
Definition at line 417 of file IgControlCategory.cc.
References m_tracker, and IgControlItem::setDirty().
00418 { 00419 if (! m_tracker || ! m_tracker->isChecked ()) 00420 IgControlItem::setDirty (value); 00421 }
void IgControlCategory::setHelpURL | ( | const QString & | url | ) | [protected] |
Definition at line 618 of file IgControlCategory.cc.
References m_helpURL.
00619 { m_helpURL = url; }
void IgControlCategory::setIcon | ( | const QPixmap & | icon | ) | [protected] |
Definition at line 408 of file IgControlCategory.cc.
References ASSERT, and m_editable.
00409 { 00410 ASSERT (index == -1 || (index >= 0 && (size_t) index < m_editable.size ())); 00411 m_editable [index] = editable; 00412 }
Definition at line 436 of file IgControlCategory.cc.
References m_tracker.
Referenced by Ig3DNodeCategory::manipulateItem().
Reimplemented in Ig3DNodeCategory, Ig3DViewpointsCategory, and IgCommonViewCategory.
Definition at line 566 of file IgControlCategory.cc.
References IgControlItem::clean(), empty(), isTracking(), itemChanged(), m_bodyArea, m_items, m_panel, m_rightArea, m_rightScrollArea, and track().
Referenced by Ig3DNodeCategory::manipulate(), Ig3DNodeCategory::manipulateItem(), setShown(), Ig3DViewpointsCategory::show(), Ig3DNodeCategory::show(), IgCommonViewCategory::show(), and IgControlCentre::showCategory().
00567 { 00568 if(m_items && m_items->count () == 0) 00569 { 00570 emit empty (true); 00571 return; 00572 } 00573 itemChanged (0); 00574 m_panel->show (); 00575 m_rightArea->show (); 00576 m_rightScrollArea->show (); 00577 m_bodyArea->show (); 00578 track (isTracking ()); 00579 emit clean (); 00580 }
Definition at line 634 of file IgControlCategory.cc.
References m_rightScrollArea.
00635 { m_rightScrollArea->show (); }
Definition at line 69 of file IgControlCategory.h.
Referenced by focusOut(), Ig2DViewPropertiesCategory::~Ig2DViewPropertiesCategory(), Ig3DAnimsCategory::~Ig3DAnimsCategory(), Ig3DLightsCategory::~Ig3DLightsCategory(), Ig3DViewpointsCategory::~Ig3DViewpointsCategory(), IgExaminerViewerCategory::~IgExaminerViewerCategory(), IgGL2PSPrintCategory::~IgGL2PSPrintCategory(), IgGLRenderCategory::~IgGLRenderCategory(), IgLegoViewPropertiesCategory::~IgLegoViewPropertiesCategory(), IgQtApplicationCategory::~IgQtApplicationCategory(), IgRPhiViewPropertiesCategory::~IgRPhiViewPropertiesCategory(), IgRZViewPropertiesCategory::~IgRZViewPropertiesCategory(), IgSceneManagerCategory::~IgSceneManagerCategory(), and IgSpareViewPropertiesCategory::~IgSpareViewPropertiesCategory().
00069 {return m_state;}
QWidget * IgControlCategory::topArea | ( | void | ) | [virtual] |
Definition at line 468 of file IgControlCategory.cc.
References m_rightArea.
Referenced by IgExaminerViewerCategory::addExaminerViewerTab(), IgGL2PSPrintCategory::addGL2PSOptionTab(), IgGLRenderCategory::addGLRenderTab(), IgQtApplicationCategory::addQApplicationTab(), IgSceneManagerCategory::addSceneManagerTab(), clearBodyArea(), and Ig3DLightsCategory::Ig3DLightsCategory().
00469 { return m_rightArea; }
QVBoxLayout * IgControlCategory::topLayout | ( | void | ) | [virtual] |
Definition at line 472 of file IgControlCategory.cc.
References m_topLayout.
Referenced by IgExaminerViewerCategory::addExaminerViewerTab(), IgGL2PSPrintCategory::addGL2PSOptionTab(), IgGLRenderCategory::addGLRenderTab(), IgQtApplicationCategory::addQApplicationTab(), IgSceneManagerCategory::addSceneManagerTab(), clearBodyArea(), Ig2DViewPropertiesCategory::Ig2DViewPropertiesCategory(), Ig3DLightsCategory::Ig3DLightsCategory(), IgLegoViewPropertiesCategory::IgLegoViewPropertiesCategory(), IgRPhiViewPropertiesCategory::IgRPhiViewPropertiesCategory(), IgRZViewPropertiesCategory::IgRZViewPropertiesCategory(), and IgSpareViewPropertiesCategory::IgSpareViewPropertiesCategory().
00473 { return m_topLayout; }
Definition at line 424 of file IgControlCategory.cc.
References IgControlItem::setDirty(), and tracking().
Referenced by clearBodyArea(), and show().
00425 { 00426 if (value) 00427 IgControlItem::setDirty (false); 00428 emit tracking (value); 00429 }
Reimplemented in Ig2DViewPropertiesCategory, Ig3DAnimsCategory, Ig3DClipsCategory, Ig3DFieldPlanesCategory, Ig3DGridCategory, Ig3DLightsCategory, Ig3DNodeCategory, Ig3DSlicersCategory, and Ig3DViewpointsCategory.
Definition at line 545 of file IgControlCategory.cc.
Referenced by itemChanged(), and revert().
QWidget* IgControlCategory::m_bodyArea [private] |
Definition at line 158 of file IgControlCategory.h.
Referenced by bodyArea(), bottomArea(), clearBodyArea(), and show().
QGridLayout* IgControlCategory::m_bodyLayout [private] |
Definition at line 162 of file IgControlCategory.h.
Referenced by bodyLayout(), and clearBodyArea().
QVBoxLayout* IgControlCategory::m_bottomLayout [private] |
Definition at line 163 of file IgControlCategory.h.
Referenced by bottomLayout(), and clearBodyArea().
int IgControlCategory::m_current [private] |
Definition at line 169 of file IgControlCategory.h.
QToolButton* IgControlCategory::m_deleteItem [private] |
Definition at line 168 of file IgControlCategory.h.
Referenced by clearBodyArea(), and removeableItem().
std::vector<bool> IgControlCategory::m_editable [private] |
Reimplemented from IgControlItem.
Definition at line 170 of file IgControlCategory.h.
Referenced by addItem(), isItemEditable(), itemChanged(), removeItem(), setCurrentItem(), and setItemEditable().
int IgControlCategory::m_flags [private] |
Definition at line 172 of file IgControlCategory.h.
Referenced by clearBodyArea(), clearCategory(), and clearLeftArea().
QString IgControlCategory::m_helpURL [private] |
QPixmap IgControlCategory::m_icon [private] |
int IgControlCategory::m_indentLevel [private] |
Definition at line 171 of file IgControlCategory.h.
Referenced by makeIndentedLabel(), popIndent(), and pushIndent().
QComboBox* IgControlCategory::m_items [private] |
Definition at line 166 of file IgControlCategory.h.
Referenced by addItem(), clearBodyArea(), currentItem(), currentText(), itemChanged(), items(), removeItem(), renameItem(), setCurrentItem(), and show().
QWidget* IgControlCategory::m_leftArea [private] |
Definition at line 156 of file IgControlCategory.h.
Referenced by clearLeftArea(), leftArea(), and leftLayout().
QToolButton* IgControlCategory::m_newItem [private] |
QFrame* IgControlCategory::m_panel [private] |
Definition at line 155 of file IgControlCategory.h.
Referenced by clearBodyArea(), clearCategory(), clearLeftArea(), hide(), panel(), panelLayout(), and show().
QWidget* IgControlCategory::m_rightArea [private] |
Definition at line 157 of file IgControlCategory.h.
Referenced by clearBodyArea(), rightArea(), rightLayout(), show(), and topArea().
Definition at line 159 of file IgControlCategory.h.
Referenced by clearBodyArea(), hideBodyScrollArea(), itemChanged(), show(), and showBodyScrollArea().
IgState* IgControlCategory::m_state [private] |
Reimplemented in Ig3DAnimsCategory.
Definition at line 153 of file IgControlCategory.h.
Referenced by clearCategory().
QVBoxLayout* IgControlCategory::m_topLayout [private] |
QCheckBox* IgControlCategory::m_tracker [private] |
Definition at line 165 of file IgControlCategory.h.
Referenced by clearBodyArea(), isTracking(), setDirty(), and setTracking().