#include <OSGQSceneGraphView_qt.h>
Public Slots | |
| void | setRoot (const FieldContainerPtr &pRoot) |
| void | showAspect (UInt32 uiAspect) |
Public Member Functions | |
| QSceneGraphView (QWidget *parent, const char *name=NULL) | |
| QSceneGraphView (const FieldContainerPtr &pRoot, QWidget *parent, const char *name=NULL) | |
| virtual | ~QSceneGraphView (void) |
Protected Slots | |
| void | onAspectSelected (int index) |
| void | onUpdateClicked (void) |
| void | onForwardClicked (void) |
| void | onBackwardClicked (void) |
| void | onRawAddressEntered (void) |
| void | onFieldClicked (FieldContainerPtr pFC, UInt32 uiFieldId, UInt32 uiIndex, ButtonState button) |
| void | onFieldDoubleClicked (FieldContainerPtr pFC, UInt32 uiFieldId, UInt32 uiIndex, ButtonState button) |
| void | onSelectionChanged (QListViewItem *pItem) |
Private Types | |
| typedef QWidget | Inherited |
| typedef std::list< HistoryEntry > | HistoryList |
| typedef HistoryList::iterator | HistoryListIt |
| typedef HistoryList::const_iterator | HistoryListConstIt |
Private Member Functions | |
| void | createChildWidgets (void) |
| void | connectChildWidgets (void) |
| void | doSetRoot (const FieldContainerPtr &pRootFC) |
| void | doShowAspect (UInt32 uiAspect) |
| void | appendHistoryEntry (void) |
| void | clearHistory (void) |
| void | selectPrevHistoryEntry (void) |
| void | selectNextHistoryEntry (void) |
| void | enableHistoryButtons (void) |
Private Attributes | |
| FieldContainerPtr | _pRootFC |
| FieldContainerPtr | _pSelectedFC |
| UInt32 | _uiAspect |
| HistoryList | _history |
| UInt32 | _uiMaxHistorySize |
| HistoryListIt | _currentHistoryEntry |
| bool | _bRestoringHistory |
| QHBoxLayout * | _pGlobalLayout |
| QSplitter * | _pSplitter |
| QVBoxLayout * | _pVBoxLeft |
| QComboBox * | _pCBAspect |
| QNodeTreeView ** | _pTreeView |
| QLabel * | _pLabelRawAddress |
| QLineEdit * | _pLERawAddress |
| QPushButton * | _pPBUpdate |
| QHBoxLayout * | _pHBoxHistoryButtons |
| QPushButton * | _pPBBackward |
| QPushButton * | _pPBForward |
| QVBoxLayout * | _pVBoxRight |
| QFieldContainerView * | _pFCView |
| QHBoxLayout * | _pHBoxFCHeader |
| QLabel * | _pLabelFCName |
| QPushButton * | _pPBShowTypeColumn |
Classes | |
| struct | HistoryEntry |
Definition at line 66 of file OSGQSceneGraphView_qt.h.
|
|
Definition at line 96 of file OSGQSceneGraphView_qt.h. |
|
|
Definition at line 108 of file OSGQSceneGraphView_qt.h. |
|
|
Definition at line 109 of file OSGQSceneGraphView_qt.h. |
|
|
Definition at line 110 of file OSGQSceneGraphView_qt.h. |
|
||||||||||||
|
||||||||||||||||
|
|
Definition at line 145 of file OSGQSceneGraphView_qt.cpp.
|
|
|
Definition at line 150 of file OSGQSceneGraphView_qt.cpp. References _bRestoringHistory, appendHistoryEntry(), and doSetRoot(). Referenced by QSceneGraphView(), and osg::sceneGraphViewThreadFunc(). 00151 { 00152 doSetRoot(pRootFC); 00153 00154 if(!_bRestoringHistory) 00155 appendHistoryEntry(); 00156 }
|
|
|
Definition at line 159 of file OSGQSceneGraphView_qt.cpp. References _pCBAspect. Referenced by onRawAddressEntered(), selectNextHistoryEntry(), and selectPrevHistoryEntry(). 00160 { 00161 if(_pCBAspect->currentItem() != uiAspect) 00162 _pCBAspect->setCurrentItem(uiAspect); 00163 }
|
|
|
Definition at line 166 of file OSGQSceneGraphView_qt.cpp. References _bRestoringHistory, appendHistoryEntry(), and doShowAspect(). Referenced by connectChildWidgets(). 00167 { 00168 doShowAspect(index); 00169 00170 if(!_bRestoringHistory) 00171 appendHistoryEntry(); 00172 }
|
|
|
Definition at line 175 of file OSGQSceneGraphView_qt.cpp. References _pSelectedFC, _pTreeView, _uiAspect, osg::endLog(), osg::ThreadManager::getNumAspects(), osg::QNodeTreeView::rereadTree(), osg::QNodeTreeView::setSelectedFC(), SNOTICE, and osg::ThreadManager::the(). Referenced by connectChildWidgets(). 00176 { 00177 SNOTICE << "onUpdateClicked" << endLog; 00178 00179 UInt32 uiNumAspects = ThreadManager::the()->getNumAspects(); 00180 FieldContainerPtr pFC = _pSelectedFC; 00181 00182 for(UInt32 i = 0; i < uiNumAspects; ++i) 00183 { 00184 _pTreeView[i]->rereadTree(); 00185 } 00186 00187 _pTreeView[_uiAspect]->setSelectedFC(pFC); 00188 }
|
|
|
Definition at line 191 of file OSGQSceneGraphView_qt.cpp. References selectNextHistoryEntry(). Referenced by connectChildWidgets(). 00192 { 00193 selectNextHistoryEntry(); 00194 }
|
|
|
Definition at line 197 of file OSGQSceneGraphView_qt.cpp. References selectPrevHistoryEntry(). Referenced by connectChildWidgets(). 00198 { 00199 selectPrevHistoryEntry(); 00200 }
|
|
|
Definition at line 203 of file OSGQSceneGraphView_qt.cpp. References _pLERawAddress, _pTreeView, osg::endLog(), FWARNING, osg::FieldContainerFactory::getFieldContainerStore(), osg::ThreadManager::getNumAspects(), osg::NullFC, PNOTICE, osg::QNodeTreeView::setSelectedFC(), showAspect(), SNOTICE, SWARNING, and osg::FieldContainerFactory::the(). Referenced by connectChildWidgets(). 00204 { 00205 SNOTICE << "onRawAddressEntered" << endLog; 00206 00207 typedef std::vector<FieldContainerPtr> FieldContainerStore; 00208 typedef FieldContainerStore::const_iterator FieldContainerStoreConstIt; 00209 00210 void *pAddress = NULL; 00211 FieldContainer *pAddressFC = NULL; 00212 00213 FieldContainerPtr pFC = NullFC; 00214 UInt32 uiAspect = 0; 00215 00216 FieldDataTraits<void *>::getFromString(pAddress, _pLERawAddress->text()); 00217 00218 if(pAddress == NULL) 00219 { 00220 std::cout << _pLERawAddress->text().latin1() << std::endl; 00221 FWARNING(("Raw Address '%s' not understood\n", 00222 _pLERawAddress->text().latin1())); 00223 return; 00224 } 00225 00226 pAddressFC = reinterpret_cast<FieldContainer *>(pAddress); 00227 00228 const FieldContainerStore *pFCStore = 00229 FieldContainerFactory::the()->getFieldContainerStore(); 00230 00231 FieldContainerStoreConstIt fcStoreIter = pFCStore->begin(); 00232 FieldContainerStoreConstIt fcStoreEnd = pFCStore->end (); 00233 00234 UInt32 uiNumAspects = ThreadManager::getNumAspects(); 00235 bool bFoundFC = false; 00236 00237 SNOTICE << "FCStore.size() == " << pFCStore->size() << " "; 00238 00239 for(; (fcStoreIter != fcStoreEnd) && !bFoundFC; ++fcStoreIter) 00240 { 00241 PNOTICE << "."; 00242 00243 for(UInt32 uiAsp=0; (uiAsp < uiNumAspects) && !bFoundFC; ++uiAsp) 00244 { 00245 FieldContainer *pTestFC = (*fcStoreIter).getAspectCPtr(uiAsp); 00246 00247 if(pTestFC == pAddressFC) 00248 { 00249 SNOTICE << "onRawAddressEntered: found valid FieldContainer." 00250 << endLog; 00251 00252 pFC = *fcStoreIter; 00253 uiAspect = uiAsp; 00254 00255 bFoundFC = true; 00256 00257 break; 00258 } 00259 } 00260 } 00261 00262 PNOTICE << endLog; 00263 00264 if(!bFoundFC) 00265 { 00266 SWARNING << "Could NOT find a FieldContainer at address: " 00267 << pAddress 00268 << endLog; 00269 00270 return; 00271 } 00272 00273 _pTreeView[uiAspect]->setSelectedFC(pFC); 00274 00275 showAspect(uiAspect); 00276 }
|
|
||||||||||||||||||||
|
Definition at line 280 of file OSGQSceneGraphView_qt.cpp. Referenced by connectChildWidgets().
|
|
||||||||||||||||||||
|
Definition at line 288 of file OSGQSceneGraphView_qt.cpp. References _pFCView, _pTreeView, _uiAspect, osg::QFieldContainerView::beginEdit(), osg::SField< FieldTypeT, fieldNameSpace >::getValue(), osg::isMFFieldContainerPtr(), osg::isSFFieldContainerPtr(), and osg::QNodeTreeView::setSelectedFC(). Referenced by connectChildWidgets(). 00292 { 00293 Field *pField = pFC->getField(uiFieldId); 00294 00295 switch(button) 00296 { 00297 case LeftButton: 00298 { 00299 if(isSFFieldContainerPtr(pField)) 00300 { 00301 SFFieldContainerPtr *pSFFCPtr = 00302 reinterpret_cast<SFFieldContainerPtr *>(pField); 00303 00304 _pTreeView[_uiAspect]->setSelectedFC(pSFFCPtr->getValue() ); 00305 } 00306 else if(isMFFieldContainerPtr(pField)) 00307 { 00308 MFFieldContainerPtr *pMFFCPtr = 00309 reinterpret_cast<MFFieldContainerPtr *>(pField); 00310 00311 _pTreeView[_uiAspect]->setSelectedFC((*pMFFCPtr)[uiIndex]); 00312 } 00313 00314 } 00315 break; 00316 case RightButton: 00317 { 00318 _pFCView->beginEdit(uiFieldId, uiIndex); 00319 } 00320 break; 00321 default: 00322 break; 00323 } 00324 }
|
|
|
|
Definition at line 358 of file OSGQSceneGraphView_qt.cpp. References _pCBAspect, _pFCView, _pGlobalLayout, _pHBoxFCHeader, _pHBoxHistoryButtons, _pLabelFCName, _pLabelRawAddress, _pLERawAddress, _pPBBackward, _pPBForward, _pPBShowTypeColumn, _pPBUpdate, _pSplitter, _pTreeView, _pVBoxLeft, _pVBoxRight, _uiAspect, osg::ThreadManager::getNumAspects(), and osg::QNodeTreeView::setAspect(). Referenced by QSceneGraphView(). 00359 { 00360 UInt32 numAspects = ThreadManager::getNumAspects(); 00361 QString strAspect; 00362 00363 _pGlobalLayout = new QHBoxLayout(this, 10, 5, 00364 "QSceneGraphView::_pGlobalLayout"); 00365 00366 _pSplitter = new QSplitter (Horizontal, this, 00367 "QSceneGraphView::_pSplitter"); 00368 00369 QWidget *pSplitterHelper1 = new QWidget(_pSplitter, "pSplitterHelper1"); 00370 QWidget *pSplitterHelper2 = new QWidget(_pSplitter, "pSplitterHelper2"); 00371 00372 _pVBoxLeft = new QVBoxLayout(pSplitterHelper1, 5, 5, 00373 "QSceneGraphView::_pVBoxLeft"); 00374 00375 _pCBAspect = new QComboBox (false, pSplitterHelper1, 00376 "QSceneGraphView::_pCBAspect"); 00377 00378 for(UInt32 i=0; i < numAspects; ++i) 00379 { 00380 strAspect.setNum(i); 00381 00382 _pCBAspect->insertItem("Aspect " + strAspect); 00383 } 00384 00385 _pVBoxLeft->addWidget(_pCBAspect); 00386 00387 _pHBoxHistoryButtons = new QHBoxLayout( 00388 NULL, 0, 5, "QSceneGraphView::_pHBoxHistoryButtons"); 00389 _pPBBackward = new QPushButton("<<", pSplitterHelper1, 00390 "QSceneGraphView::_pPBBackward"); 00391 _pPBBackward->setEnabled(false); 00392 _pHBoxHistoryButtons->addWidget(_pPBBackward); 00393 00394 _pPBForward = new QPushButton(">>", pSplitterHelper1, 00395 "QSceneGraphView::_pPBForward"); 00396 _pPBForward->setEnabled(false); 00397 _pHBoxHistoryButtons->addWidget(_pPBForward); 00398 00399 _pVBoxLeft->addLayout(_pHBoxHistoryButtons); 00400 00401 for(UInt32 i=0; i < numAspects; ++i) 00402 { 00403 _pTreeView[i] = new QNodeTreeView(pSplitterHelper1, 00404 "QSceneGraphView::_pTreeView"); 00405 00406 _pTreeView[i]->setAspect(i); 00407 00408 if(i != _uiAspect) 00409 { 00410 _pTreeView[i]->hide(); 00411 } 00412 else 00413 { 00414 _pTreeView[i]->show(); 00415 } 00416 00417 _pVBoxLeft->addWidget(_pTreeView[i]); 00418 } 00419 00420 _pLabelRawAddress = new QLabel("Display FC at address:", pSplitterHelper1, 00421 "QSceneGraphView::_pLabelRawAddress"); 00422 _pVBoxLeft->addWidget(_pLabelRawAddress); 00423 00424 _pLERawAddress = new QLineEdit(pSplitterHelper1, 00425 "QSceneGraphView::_pLERawAddress"); 00426 _pVBoxLeft->addWidget(_pLERawAddress); 00427 00428 _pPBUpdate = new QPushButton("Update", pSplitterHelper1, 00429 "QSceneGraphView::_pPBUpdate"); 00430 _pVBoxLeft->addWidget(_pPBUpdate); 00431 00432 _pVBoxRight = new QVBoxLayout(pSplitterHelper2, 5, 5, 00433 "QSceneGraphView::_pVBoxRight"); 00434 00435 _pHBoxFCHeader = new QHBoxLayout(NULL, 0, 5, 00436 "QSceneGraphView::_pHBoxFCHeader"); 00437 _pLabelFCName = new QLabel(pSplitterHelper2, 00438 "QSceneGraphView::_pLabelFCName"); 00439 _pHBoxFCHeader->addWidget(_pLabelFCName); 00440 00441 _pPBShowTypeColumn = new QPushButton("Show Types", pSplitterHelper2, 00442 "QSceneGraphView::_pPBShowTypeColumn"); 00443 _pPBShowTypeColumn->setToggleButton(true); 00444 _pPBShowTypeColumn->setOn (true); 00445 _pHBoxFCHeader->addWidget(_pPBShowTypeColumn); 00446 00447 _pVBoxRight->addLayout(_pHBoxFCHeader); 00448 00449 _pFCView = new QFieldContainerView(pSplitterHelper2, 00450 "QSceneGraphView::_pFCView"); 00451 _pVBoxRight->addWidget (_pFCView ); 00452 00453 _pGlobalLayout->addWidget(_pSplitter); 00454 }
|
|
|
Definition at line 457 of file OSGQSceneGraphView_qt.cpp. References _pCBAspect, _pFCView, _pLERawAddress, _pPBBackward, _pPBForward, _pPBShowTypeColumn, _pPBUpdate, _pTreeView, _uiAspect, onAspectSelected(), onBackwardClicked(), onFieldClicked(), onFieldDoubleClicked(), onForwardClicked(), onRawAddressEntered(), onSelectionChanged(), and onUpdateClicked(). Referenced by QSceneGraphView(). 00458 { 00459 connect(_pCBAspect, SIGNAL(highlighted (int )), 00460 this, SLOT (onAspectSelected (int ))); 00461 00462 connect(_pPBForward, SIGNAL(clicked (void)), 00463 this, SLOT (onForwardClicked (void))); 00464 00465 connect(_pPBBackward, SIGNAL(clicked (void)), 00466 this, SLOT (onBackwardClicked (void))); 00467 00468 connect(_pLERawAddress, SIGNAL(returnPressed (void)), 00469 this, SLOT (onRawAddressEntered (void))); 00470 00471 connect(_pPBUpdate, SIGNAL(clicked (void)), 00472 this, SLOT (onUpdateClicked (void))); 00473 00474 connect(_pFCView, SIGNAL(clicked (FieldContainerPtr, UInt32, 00475 UInt32, ButtonState)), 00476 this, SLOT (onFieldClicked(FieldContainerPtr, UInt32, 00477 UInt32, ButtonState))); 00478 00479 connect(_pFCView, 00480 SIGNAL(doubleClicked (FieldContainerPtr, UInt32, 00481 UInt32, ButtonState)), 00482 this, 00483 SLOT (onFieldDoubleClicked(FieldContainerPtr, UInt32, 00484 UInt32, ButtonState)) 00485 ); 00486 00487 connect(_pPBShowTypeColumn, SIGNAL(toggled (bool)), 00488 _pFCView, SLOT (setShowTypeColumn (bool))); 00489 00490 connect(_pTreeView[_uiAspect], 00491 SIGNAL(selectionChanged (QListViewItem *)), 00492 this, 00493 SLOT (onSelectionChanged(QListViewItem *))); 00494 }
|
|
|
Definition at line 497 of file OSGQSceneGraphView_qt.cpp. References _pRootFC, _pTreeView, osg::ThreadManager::getNumAspects(), and osg::QNodeTreeView::setRoot(). Referenced by selectNextHistoryEntry(), selectPrevHistoryEntry(), and setRoot(). 00498 { 00499 UInt32 uiNumAspects = ThreadManager::getNumAspects(); 00500 00501 _pRootFC = pRootFC; 00502 00503 for(UInt32 i=0; i < uiNumAspects; ++i) 00504 _pTreeView[i]->setRoot(pRootFC); 00505 }
|
|
|
Definition at line 508 of file OSGQSceneGraphView_qt.cpp. References _pFCView, _pSelectedFC, _pTreeView, _uiAspect, onSelectionChanged(), osg::QFieldContainerView::setAspect(), and osg::QNodeTreeView::setSelectedFC(). Referenced by onAspectSelected(). 00509 { 00510 disconnect(_pTreeView[_uiAspect], 00511 SIGNAL(selectionChanged (QListViewItem *)), 00512 this, 00513 SLOT (onSelectionChanged(QListViewItem *))); 00514 00515 _pTreeView[_uiAspect]->hide(); 00516 00517 _uiAspect = uiAspect; 00518 00519 _pTreeView[uiAspect]->setSelectedFC(_pSelectedFC); 00520 _pTreeView[uiAspect]->show ( ); 00521 00522 _pFCView->setAspect(uiAspect); 00523 00524 connect(_pTreeView[uiAspect], SIGNAL(selectionChanged (QListViewItem *)), 00525 this, SLOT (onSelectionChanged(QListViewItem *))); 00526 }
|
|
|
Definition at line 529 of file OSGQSceneGraphView_qt.cpp. References _currentHistoryEntry, _history, _pRootFC, _pSelectedFC, _uiAspect, _uiMaxHistorySize, enableHistoryButtons(), osg::endLog(), PNOTICE, and SNOTICE. Referenced by onAspectSelected(), onSelectionChanged(), and setRoot(). 00530 { 00531 SNOTICE << "QSceneGraphView::appendHistoryEntry " 00532 << "_history.size(): " << _history.size(); 00533 00534 if(_uiMaxHistorySize == 0) 00535 { 00536 PNOTICE << " _uiMaxHistorySize == 0" << endLog; 00537 return; 00538 } 00539 00540 if(_history.size() == 0) 00541 { 00542 PNOTICE << " _history.size() == 0" << endLog; 00543 00544 _history.push_back(HistoryEntry(_pRootFC, _pSelectedFC, _uiAspect)); 00545 00546 _currentHistoryEntry = _history.begin(); 00547 } 00548 else 00549 { 00550 HistoryListIt histIter = _currentHistoryEntry; 00551 00552 if( ((*_currentHistoryEntry)._pRootFC == _pRootFC ) && 00553 ((*_currentHistoryEntry)._pSelectedFC == _pSelectedFC) && 00554 ((*_currentHistoryEntry)._uiAspect == _uiAspect ) ) 00555 { 00556 PNOTICE << " _currentHistoryEntry == \"internal state\"" << endLog; 00557 return; 00558 } 00559 00560 PNOTICE << " deleting obsolete parts of history and adding new" 00561 << endLog; 00562 00563 _history.erase(++histIter, _history.end()); 00564 00565 while(_history.size() >= _uiMaxHistorySize) 00566 { 00567 _history.pop_front(); 00568 } 00569 00570 _history.push_back(HistoryEntry(_pRootFC, _pSelectedFC, _uiAspect)); 00571 00572 _currentHistoryEntry = --(_history.end()); 00573 } 00574 00575 enableHistoryButtons(); 00576 }
|
|
|
|
|
|
Definition at line 579 of file OSGQSceneGraphView_qt.cpp. References _bRestoringHistory, _currentHistoryEntry, _history, _pRootFC, _pSelectedFC, _pTreeView, _uiAspect, doSetRoot(), enableHistoryButtons(), osg::endLog(), PNOTICE, osg::QNodeTreeView::setSelectedFC(), showAspect(), and SNOTICE. Referenced by onBackwardClicked(). 00580 { 00581 SNOTICE << "select PREV history:\n " 00582 << "CURRENT: " << _currentHistoryEntry->_pRootFC 00583 << " " << _currentHistoryEntry->_pSelectedFC 00584 << " " << _currentHistoryEntry->_uiAspect; 00585 00586 HistoryListIt histIter = _currentHistoryEntry; 00587 00588 if((_history.size() == 0) || (histIter == _history.begin())) 00589 return; 00590 00591 --histIter; 00592 00593 PNOTICE << "\n NEW: " << histIter->_pRootFC 00594 << " " << histIter->_pSelectedFC 00595 << " " << histIter->_uiAspect 00596 << endLog; 00597 00598 _bRestoringHistory = true; 00599 00600 if((*histIter)._pRootFC != _pRootFC) 00601 doSetRoot((*histIter)._pRootFC); 00602 00603 if((*histIter)._pSelectedFC != _pSelectedFC) 00604 _pTreeView[_uiAspect]->setSelectedFC((*histIter)._pSelectedFC); 00605 00606 if((*histIter)._uiAspect != _uiAspect) 00607 showAspect((*histIter)._uiAspect); 00608 00609 _currentHistoryEntry = histIter; 00610 00611 enableHistoryButtons(); 00612 00613 _bRestoringHistory = false; 00614 }
|
|
|
Definition at line 617 of file OSGQSceneGraphView_qt.cpp. References _bRestoringHistory, _currentHistoryEntry, _history, _pRootFC, _pSelectedFC, _pTreeView, _uiAspect, doSetRoot(), enableHistoryButtons(), osg::endLog(), PNOTICE, osg::QNodeTreeView::setSelectedFC(), showAspect(), and SNOTICE. Referenced by onForwardClicked(). 00618 { 00619 SNOTICE << "select NEXT history:\n " 00620 << "CURRENT: " << _currentHistoryEntry->_pRootFC 00621 << " " << _currentHistoryEntry->_pSelectedFC 00622 << " " << _currentHistoryEntry->_uiAspect; 00623 00624 HistoryListIt histIter = _currentHistoryEntry; 00625 00626 if((_history.size() == 0) || (++histIter == _history.end())) 00627 return; 00628 00629 PNOTICE << "\n NEW: " << histIter->_pRootFC 00630 << " " << histIter->_pSelectedFC 00631 << " " << histIter->_uiAspect 00632 << endLog; 00633 00634 _bRestoringHistory = true; 00635 00636 if((*histIter)._pRootFC != _pRootFC) 00637 doSetRoot((*histIter)._pRootFC); 00638 00639 if((*histIter)._pSelectedFC != _pSelectedFC) 00640 _pTreeView[_uiAspect]->setSelectedFC((*histIter)._pSelectedFC); 00641 00642 if((*histIter)._uiAspect != _uiAspect) 00643 showAspect((*histIter)._uiAspect); 00644 00645 _currentHistoryEntry = histIter; 00646 00647 enableHistoryButtons(); 00648 00649 _bRestoringHistory = false; 00650 }
|
|
|
Definition at line 653 of file OSGQSceneGraphView_qt.cpp. References _currentHistoryEntry, _history, _pPBBackward, and _pPBForward. Referenced by appendHistoryEntry(), selectNextHistoryEntry(), and selectPrevHistoryEntry(). 00654 { 00655 if(_history.size() <= 1) 00656 { 00657 _pPBBackward->setEnabled(false); 00658 _pPBForward ->setEnabled(false); 00659 } 00660 else if(_currentHistoryEntry == _history.begin()) 00661 { 00662 _pPBBackward->setEnabled(false); 00663 _pPBForward ->setEnabled(true ); 00664 } 00665 else if(_currentHistoryEntry == (--_history.end())) 00666 { 00667 _pPBBackward->setEnabled(true ); 00668 _pPBForward ->setEnabled(false); 00669 } 00670 else 00671 { 00672 _pPBBackward->setEnabled(true ); 00673 _pPBForward ->setEnabled(true ); 00674 } 00675 }
|
|