//----------------------------------------------------------------------------- // $Id: QtRpl/RplBlockDlg.cpp 2017/07/23 16:20:44 philw $ // Editor dialog for RplBlock objects (Rule, Goal, Method) //----------------------------------------------------------------------------- #include "RplViewerDlg.hpp" // this module #include "qt/ui_RplViewerDlgWidgets.h" #ifndef RplViewerDlgFrameINCLUDED #include "RplViewerDlg.hpp" #include "RplBlockPanel.hpp" #include "RplFunctionPanel.hpp" #endif #include #include #include #include #include #include "RwQPixmap11.hpp" #include "RplIcons.hpp" #include "QGui.hpp" //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- RplViewerDlg::RplViewerDlg(BaseRWDlg* parent, RplObj* rplObj) : RplBaseDlg(parent, "RplViewerDlg"), _ui(new Ui_RplViewerDlgWidgets()), _activeRplObj(rplObj), _rplTabBar(NULL), _rplTabWidgets(NULL), _rplTabMenuBut(NULL), _rplTabMenuActionGroup(NULL), _rebuildRplTabBar_inProgress(false) { _ui->setupUi(this); buildQtWidgets(); } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- RplViewerDlg::~RplViewerDlg() { delete _ui; _ui = NULL; } void RplViewerDlg::buildQtWidgets() { QVBoxLayout* vbox = new QVBoxLayout(_ui->_impContainer); vbox->setObjectName("_impFrame vbox"); vbox->setContentsMargins(0, 0, 0, 0); // lft, top, rgt, bot vbox->setSpacing(6); // ********************************* // *** Multiple Object Tab Bar *** // ********************************* _rplTabWidgets = new QWidget(this); _rplTabWidgets->setObjectName("_rplTabWidgets"); QHBoxLayout* rplTabHBox = new QHBoxLayout(_rplTabWidgets); rplTabHBox->setObjectName("rplTabHBox"); rplTabHBox->setContentsMargins(0, 0, 0, 0); // l,t,r,b rplTabHBox->setSpacing(2); _rplTabWidgets->setSizePolicy( QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); _rplTabBar = new RplTabBar(this); _rplTabBar->setObjectName("_rplTabBar"); _rplTabBar->setTabsClosable(true); _rplTabBar->setShape(QTabBar::RoundedNorth); // Limiting the size of tab text isn't working for us [Qt 5.5.1]. //-- _rplTabBar->setElideMode (Qt::ElideRight); updateRplTabStyles(); _rplTabBar->setExpanding(false); _rplTabBar->setMovable(true); rebuildRplTabBar(); // Robynn todo: implement this _rplTabMenuBut = new QPushButton(this); _rplTabMenuBut->setObjectName("_objTabMenuBut"); _rplTabMenuBut->setIcon(RwQPixmap11::arrowDown()); _rplTabMenuBut->setIconSize(RwQPixmap11::arrowDown().size()); _rplTabMenuBut->setSizePolicy( QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred)); rplTabHBox->addWidget(_rplTabBar); rplTabHBox->addWidget(_rplTabMenuBut); vbox->addWidget(_rplTabWidgets); // Robynn todo: this is temp. _rplTabBar->addTab("hello"); _rplTabBar->addTab("world"); _rplTabBar->setVisible(true); RplBlockPanel* blockFrame; RplFunctionPanel* functionFrame; RplBlock* rplBlock = dynamic_cast(_activeRplObj); RplFunction* rplFunction = dynamic_cast(_activeRplObj); // Robynn todo: make this prettier (break it out) if (rplBlock) { blockFrame = new RplBlockPanel(this, rplBlock); _activePanel = blockFrame; _activePanel->instance()->setObjectName("RplBlockDlg_impPanel"); } else if (rplFunction) { functionFrame = new RplFunctionPanel(this, rplFunction); _activePanel = functionFrame; functionFrame->setObjectName("RplBlockDlg_impPanel"); } else { // Robynn todo: assertion type error. } vbox->addWidget(_activePanel->instance()); _activePanel->completeInit(); _impPanels.append(_activePanel); _ui->_impContainer->setLayout(vbox); // Install menus in the QMainWindow's menubar. _activePanel->installMenuBar(); } //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // ********************************************* // *** Delegate RplBaseDlg Virtual Methods *** // ********************************************* bool RplViewerDlg::update() { return _activePanel->update(); } bool RplViewerDlg::updateDescr() { return _activePanel->updateDescr(); } bool RplViewerDlg::updateNotes() { return _activePanel->updateNotes(); } bool RplViewerDlg::updateLoadStatus() { return _activePanel->updateLoadStatus(); } bool RplViewerDlg::rebuild() { return _activePanel->rebuild(); } void RplViewerDlg::selectRplStatement(RplStatement* statement) { _activePanel->selectRplStatement(statement); } void RplViewerDlg::showDescription(bool doShow) { _activePanel->showDescription(doShow); } void RplViewerDlg::showNotes(bool doShow) { _activePanel->showNotes(doShow); } void RplViewerDlg::selectStringInDescription( const Rpl::SearchSpec& searchSpec) { _activePanel->selectStringInDescription(searchSpec); } void RplViewerDlg::selectStringInNotes( const Rpl::SearchSpec& searchSpec) { _activePanel->selectStringInNotes(searchSpec); } void RplViewerDlg::updateEditActions() { _activePanel->updateEditActions(); } void RplViewerDlg::scrollToDebugCursor() { _activePanel->scrollToDebugCursor(); } RplObj* RplViewerDlg::getRplObj() const { return _activePanel->getRplObj(); } void RplViewerDlg::updateExternalDocButton() { _activePanel->updateExternalDocButton(); } QString RplViewerDlg::nameEditorText() const { return _activePanel->nameEditorText(); } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- // ********************************************************* // *** class OpenObjectDlg::ObjTabBar : public QTabBar *** // ********************************************************* RplViewerDlg::RplTabBar::RplTabBar(RplViewerDlg* parentDlg) : QTabBar(parentDlg), _parentDlg(parentDlg), _dragRplTabActive(false), _dragRplTabArmed(false), _dragRplTabOverrideCursorSet(false), _dragRplTabStartPos(), _dragRplTabName(), _dragRplTabCursor(Qt::DragMoveCursor) { } RplViewerDlg::RplTabBar::~RplTabBar() { // Clear the Object Tab tear off "drag" operation and override cursor. _dragRplTabActive = false; _dragRplTabArmed = false; updateOverrideCursor(); } bool RplViewerDlg::RplTabBar::tearArmedAtPos(const QPoint& pos) { // Is the specified position far away enough to TEAR OFF the dragged // Object Tab? Note that the TabBar (internally) also uses mouse // dragging to REORDER the tabs. Both work. static const int VertTearOffDistance(50); // dist from orig clicked pos static const int HorzTearOffDistance(10); // dist from tabbar edges if (_dragRplTabName.isEmpty()) return false; //----->> const int posX = pos.x(); const int posY = pos.y(); const int vertDist = abs(_dragRplTabStartPos.y() - posY); const bool vertArmed = (vertDist > VertTearOffDistance); const int leftLimit = (-HorzTearOffDistance); const int rightLimit = width() + HorzTearOffDistance; const bool horzArmed = (posX < leftLimit) || (rightLimit < posX); return (vertArmed || horzArmed); } void RplViewerDlg::RplTabBar::updateOverrideCursor() { // Set the system's Override Cursor according to the active Dragged // Object Tab being armed for "Tear Off". if (_dragRplTabArmed == _dragRplTabOverrideCursorSet) return; //----->> if (_dragRplTabArmed) { QApplication::setOverrideCursor(_dragRplTabCursor); _dragRplTabOverrideCursorSet = true; } else { QApplication::restoreOverrideCursor(); _dragRplTabOverrideCursorSet = false; } } // virtual from QTabBar void RplViewerDlg::RplTabBar::mousePressEvent(QMouseEvent* evt) { // Robynn todo: implement this //static const char* mname("OpenObjectDlg::ObjTabBar::mousePressEvent"); //static int callCnt(0); //++callCnt; //// Initiate an Object Tab tear off "drag" operation if the left mouse //// button is clicked on a well defined Object Tab. //const Qt::MouseButton but = evt ? evt->button() : Qt::NoButton; //const QPoint curPos = evt->pos(); //const int tabInx = tabAt(curPos); //const QString tabObjName = (tabInx >= 0) ? tabText(tabInx) : QString(); //const SimObj* simObj = rwWorkspace->locateSimObj(tabObjName); //if ((but == Qt::LeftButton) && (simObj != NULL)) //{ // // std::cout << mname << " [#" << callCnt << "]" // // << " (" << tabInx << ")" // // << " \"" << qPrintable (tabObjName) << "\"" // // << std::endl; // const QPixmap pmap = // RwQtIcons::pixmap(simObj, RwQtIcons::IconSize_Medium); // _dragObjTabActive = true; // reassess tear-off distance on mouse moves. // _dragObjTabArmed = false; // this becomes true with sufficient distance. // _dragObjTabStartPos = curPos; // _dragObjTabName = tabObjName; // _dragObjTabCursor = QCursor(pmap); // updateOverrideCursor(); //} //if (but == Qt::LeftButton) //{ // emit tabBarLeftClicked(tabInx); //} //else //{ // emit tabBarRightClicked(tabInx); //} //// call base class method //QTabBar::mousePressEvent(evt); } // virtual from QTabBar void RplViewerDlg::RplTabBar::mouseMoveEvent(QMouseEvent* evt) { // Robynn todo: implement this //static const char* mname("RplViewerDlg::RplTabBar::mouseMoveEvent"); //static int callCnt(0); //++callCnt; //// If an Object Tab tear off "drag" operation is active, reassess //// whether the tear off should be "Armed" -- i.e. with the mouse far //// away enough from the original tab (vertically) or outside of the //// entire tab bar (horizontally). Cause the Override Cursor to be //// updated accordingly. //const QPoint localPos = evt->pos(); //const QPoint globalPos = mapToGlobal(localPos); //const bool leftPressed = evt && ((evt->buttons() & Qt::LeftButton) != 0); //_dragObjTabArmed = // _dragObjTabActive && leftPressed && tearArmedAtPos(localPos); //// DON'T ARM "object drop" IF the mouse pointer is over a regular //// Open Object Dialog (not a viewer) AND Open Object Dialog //// "promotion" to Object viewer is NOT ENABLED. //if (_dragObjTabArmed && !ENA_OPEN_OBJ_PROMOTION_TO_VIEWER) //{ // // Prevent dropping onto an existing Open Object Dialog // OpenObjectDlg* nonViewerObjDlg = nonViewerObjDlgAtGlobalPos(globalPos); // if (nonViewerObjDlg) // _dragObjTabArmed = false; //} //updateOverrideCursor(); //// call base class method //QTabBar::mouseMoveEvent(evt); } // virtual from QTabBar void RplViewerDlg::RplTabBar::mouseReleaseEvent(QMouseEvent* evt) { // Robynn todo: implement this. //static const char* mname("RplViewerDlg::RplTabBar::mouseReleaseEvent"); //static int callCnt(0); //++callCnt; //// std::cout << mname << " [#" << callCnt << "]" << std::endl; //// call base class method //QTabBar::mouseReleaseEvent(evt); //// If an Object Tab tear off "drag" operation was active AND IS ARMED //// (i.e. at a sufficient distance to actually tear off the tab), then //// effect that tear off: Move the object tab to its own Open Object //// dialog. //if (_dragRplTabArmed && _parentDlg) //{ // const QPoint localPos = evt->pos(); // const QPoint globalPos = mapToGlobal(localPos); // RplViewerDlg* dropViewer = // RplViewerDlg::rplViewerAtGlobalPos(globalPos); // RplObj* rplObj = rwWorkspace->locateSimObj(_dragRplTabName); // if (rplObj == NULL) // { // QApplication::beep(); // } // else if (dropViewer && (dropViewer != _parentDlg)) // { // // ************************************************* // // *** Move Simulation Object to Object Viewer *** // // ************************************************* // QGui::moveSimObjToViewer(rplObj, dropViewer); // dropViewer->raiseDialog(); // } // else // { // // Show Single-Object Open Object Dialog // BaseQtMainWin* dlg = QGui::openObjectSolo(rplObj, true); // doShow // const QPoint localPos = evt->pos() - QPoint(10, 10); // const QPoint globalPos = mapToGlobal(localPos); // // std::cout << mname << " [#" << callCnt << "]" // // << " local (" << localPos.x() << "," << localPos.y() << ")" // // << " global (" << globalPos.x() << "," << globalPos.y() << ")" // // << std::endl; // dlg->move(globalPos); // // Copy this object dialog's timestep date/time spinner value // // to the new single object dialog. // const Date_Time thisDt = _parentDlg->getDateTime(); // dlg->scrollToDate(thisDt); // } //} //// Clear the Object Tab tear off "drag" operation and override cursor. //_dragRplTabActive = false; //_dragRplTabArmed = false; //_dragRplTabStartPos = QPoint(); //_dragRplTabName.clear(); //updateOverrideCursor(); } void RplViewerDlg::updateRplTabStyles() { if (_rplTabBar == NULL) return; //----->> static const QString TabStyleIconStr( "QTabBar::close-button {\n" " image: url(:/RwQPixmap11/greyX)\n" "}\n" "QTabBar::close-button:selected {\n" " image: url(:/RwQPixmap11/redX)\n" "}\n"); static const QString TabStyleStr( "QTabBar::tab {\n" " background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,\n" " stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,\n" " stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);\n" " border: 1px solid #C4C4C3;\n" " border-bottom-color: #C2C7CB; /* same as the pane color */\n" " border-top-left-radius: 7px;\n" " border-top-right-radius: 7px;\n" " min-width: 8ex;\n" " padding: 1px;\n" " padding-left: 6px;\n" "}\n" "QTabBar::tab:!selected:hover {\n" " border: 1px solid #C4C4C3;\n" "}\n" "QTabBar::tab:selected {\n" " background: white;\n" "}\n" "QTabBar::tab:!selected {\n" " border: 1px outset transparent;\n" " margin-top: 2px;\n" "}\n" ); // Not Used //-- static const QString TabStyleLimitWidthStr ( //-- "QTabBar {\n" //-- " text-align: left;\n" // [5-2017, Qt 5.5.1] Not Working. //-- "}\n" //-- "QTabBar::tab {\n" //-- " max-width: 60px;\n" // VALUE (60) IS EXPERIMENTAL //-- " text-align: left;\n" // [5-2017, Qt 5.5.1] Not Working. //-- "}\n" ); static const QString TabScrollButtonStyleStr( "QTabBar QToolButton {\n" " background-color: #DDDDDD;\n" // instead of transparent "}\n"); // _objTabBar->setStyleSheet (TabStyleIconStr // + TabStyleStr // + TabStyleLimitWidthStr, // Experimental // + TabScrollButtonStyleStr); _rplTabBar->setStyleSheet(TabStyleIconStr + TabStyleStr + TabScrollButtonStyleStr); } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- void RplViewerDlg::rebuildRplTabBar() { if (_rplTabBar == NULL) return; //----->> //---------------------------------- _rebuildRplTabBar_inProgress = true; //---------------------------------- const int objCnt = _viewerRplList.count(); QSize maxObjPmapSize; for (int objInx = 0; objInx < objCnt; ++objInx) { QString tabStr; QPixmap pmap; RplObj* obj = _viewerRplList[objInx]; if (obj) { tabStr = obj->getName(); pmap = RplIcons::getObjIcon(obj, false); // no extra vert maxObjPmapSize = maxObjPmapSize.expandedTo(pmap.size()); } if (objInx >= _rplTabBar->count()) { const int newTabInx = //VIEWER_TABS_SHOW_OBJ_ICONS // Robynn todo: decide if we need to use this logic. //? _rplTabBar->addTab(pmap, tabStr) //: _rplTabBar->addTab(tabStr); _rplTabBar->addTab(pmap, tabStr); newTabInx; // (avoid compilation warning) } else { if (_rplTabBar->tabText(objInx) != tabStr) _rplTabBar->setTabText(objInx, tabStr); //if (VIEWER_TABS_SHOW_OBJ_ICONS) //Robynn todo: decide if we don't want to use this _rplTabBar->setTabIcon(objInx, pmap); } } // Remove excess tabs int removeCnt(0); while (_rplTabBar->count() > objCnt) { const int lastInx = _rplTabBar->count() - 1; _rplTabBar->removeTab(lastInx); ++removeCnt; } if (!maxObjPmapSize.isNull()) _rplTabBar->setIconSize(maxObjPmapSize); updateWindowTitle(); // Robynn todo: bring these in //updateObjIconButToolTip(); //---------------------------------- _rebuildRplTabBar_inProgress = true; //---------------------------------- } int RplViewerDlg::rplTabBarInxForRplObj(const RplObj* refObj) const { if (refObj == NULL) return (-1); //----->> const QString refObjName = refObj->getName(); const int tabCnt = _rplTabBar->count(); for (int inx = 0; inx < tabCnt; ++inx) { if (refObjName == _rplTabBar->tabText(inx)) return (inx); // Found ----->> } return (-1); // _rplTabBar tab not found for specified RplObj } void RplViewerDlg::addRplObject(RplObj* addObj) { if (addObj && !_viewerRplList.contains(addObj)) { _viewerRplList.append(addObj); rebuildRplTabBar(); } } void RplViewerDlg::addRplObjects(const QList& inObjList) { const int inObjCnt = inObjList.count(); if (inObjCnt < 1) { QApplication::beep(); return; //----->> } // ************************** // *** Sort Object List *** // ************************** QMultiMap sortMap; for (int inx = 0; inx < inObjCnt; ++inx) { RplObj* obj = inObjList[inx]; if (obj) { QString objNameUpper = obj->getName().toUpper(); sortMap.insert(objNameUpper, obj); } } const QList addObjList = sortMap.values(); const int addCnt = addObjList.count(); // ************************************************************* // *** Add Objects to _viewerObjList and Rebuild ObjTabBar *** // ************************************************************* for (int inx = 0; inx < addCnt; ++inx) { RplObj* addObj = addObjList[inx]; if (addObj && !_viewerRplList.contains(addObj)) _viewerRplList.append(addObj); } rebuildRplTabBar(); } void RplViewerDlg::removeRplObject(RplObj* remObj, bool deleteWhenEmpty) { if (remObj == NULL) return; //----->> // Robynn todo: determine exactly what this does and possibly support? //QGui::dropObjectDlg(remObj); if (!_viewerRplList.contains(remObj)) return; //----->> const int listInx = _viewerRplList.indexOf(remObj); if (listInx >= 0) { // std::cout << mname << " [#" << callCnt << "]" // << " inx " << listInx << std::endl; _viewerRplList.removeAt(listInx); if (!_viewerRplList.isEmpty()) { rebuildRplTabBar(); int newCurInx = _rplTabBar->currentIndex(); if (newCurInx < 0) { newCurInx = 0; _rplTabBar->setCurrentIndex(0); } RplObj* newObj = locateRplTabBarRplObj(newCurInx); installRplObj(newObj); } } if (_viewerRplList.isEmpty() && deleteWhenEmpty) { // std::cout << mname << " [#" << callCnt << "]" // << " DELETING DIALOG" << std::endl; // *********************** // *** SELF DELETION *** // *********************** hide(); deleteInternals(); setAttribute(Qt::WA_DeleteOnClose, true); close(); } } void RplViewerDlg::selectRplObjTab(RplObj* refObj) { static const char* mname("OpenObjectDlg::selectObjTab"); if (refObj == NULL) return; //----->> if (_rplTabBar == NULL) return; //----->> const int rplTabInx = refObj ? rplTabBarInxForRplObj(refObj) : (-1); if (rplTabInx < 0) { const QString refObjName = refObj ? refObj->getName() : QString("NULL"); static const QString Fmt( "Tab for Rpl Object \"%1\" not found in Rpl Viewer"); const QString msg = Fmt.arg(refObjName); // Robynn todo: find out what int to use here rwInternalError(WSID, 0, qPrintable(msg)); return; //----->> } // *********************************************************** // *** Switch to the Object Tab for the specified SimObj *** // *********************************************************** // Note [Phil, RW 7.1, Qt 5.5.1, 5-2017]: Because of a bug in QTabBar:: // setCurrentIndex(int), the QTabBar isn't scrolled to the specified // index IF that index is already the QTabBar's current index. // SEE forum post: https://forum.qt.io/topic/79200/ // This was too restrictive. Sometimes We need to do this adjustment // even if the new tab ISN'T the current tab. //-- if ((_objTabBar->currentIndex() == objTabInx) && ... if (_rplTabBar->count() > 1) { const int otherInx((rplTabInx > 0) ? rplTabInx - 1 : 1); _rplTabBar->setCurrentIndex(otherInx); rwWorkspace->rwProcessEvents(QEventLoop::ExcludeUserInputEvents); } _rplTabBar->setCurrentIndex(rplTabInx); installRplObj(refObj); } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- void RplViewerDlg::installRplObj(RplObj* refObj, bool force /*=false*/) { // Robynn todo: sort through this and bring back in. if (refObj == NULL) { QApplication::beep(); return; //----->> } const QString refObjName = refObj->getName(); if (!force && (refObj == _activeRplObj)) { return; //----->> } // // // ******************************* // // *** Set RplObj State Data *** // // ******************************* // // // Robynn todo: add state data here, if any. // // // Delete Callbacks (Added again, below); // deleteCallbacks(); // Robynn todo: implement this // // // Set the dialog box title updateWindowTitle(); // // // Add Callbacks // addCallbacks(); // Robynn todo: implement this // // // ******************************************* // // *** Object Button Icon and Name Editor *** // // ******************************************* // // if (_objIconBut) // { // const QPixmap pmap = // RwQtIcons::pixmap(_simObj, RwQtIcons::IconSize_Medium); // _objIconBut->setIcon(pmap); // _objIconBut->setIconSize(pmap.size()); // } // // _objectNameEdit->setText(refObjName); // updateObjectTypeLabel(); // // // *************************** // // *** Conditional Menus *** // // *************************** // // //Robynn todo: put menu logic here // // // ***************************************** // // *** (Proper) Data Object Provisions *** // // ***************************************** // // // // **************************** // // *** Update Description *** // // **************************** // // if (rwAssert(_descriptionTab != NULL)) // { // _descriptionTab->configure(this); // } // // // *********************************** // // *** Install SimObj Completion *** // // *********************************** // sensitizeMenus(); } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- RplObj* RplViewerDlg::locateRplTabBarRplObj(int refInx) const { if ((_rplTabBar == NULL) || (refInx < 0)) return (NULL); //----->> const int tabCnt = _rplTabBar->count(); if (refInx >= tabCnt) return (NULL); //----->> const QString objName = _rplTabBar->tabText(refInx); //RplObj* obj = rwWorkspace->locateSimObj(objName); // Robynn todo: I'm just cheating here returning the active object. // Robynn todo: determine what this method is used for and if it's needed. RplObj* obj = _activeRplObj; return obj; } void RplViewerDlg::deleteInternals() { // Robynn todo: modify and bring back in //cancelSelectObjItem(); //cancelUpdateSlotItems(); //cancelSensitizeMenus(); //deleteCallbacks(); //// Delete all the element callbacks //if (_isAggObj && _simObj && (_simObj != _processSimObjDeletion_inProgress)) //{ // AggregateObj* aggObj = dynamic_cast(_simObj); // if (aggObj) // { // cwIterator iter; // SimObj* aggElem; // for (aggElem = aggObj->firstObjInAggregate(iter); // aggElem; // aggElem = aggObj->nextObjInAggregate(iter)) // { // deleteElementCallbacks(aggElem); // } // } //} //if (_simObj) //{ // QGui::deleteObjAcctSummaryDlg(_simObj); //} //QGui::dropObjectDlg(this); //// //// Prematurely delete all the listviews. Some of these //// items register their own callbacks, so we need to delete them //// before all our internal class members get destroyed. //// //if (_slotsTreeWid) { delete _slotsTreeWid; } //if (_methodsTreeWid) { delete _methodsTreeWid; } //if (_olamTreeWid) { delete _olamTreeWid; } //if (_accountsTreeWid) { delete _accountsTreeWid; } //_slotsTreeWid = NULL; //_methodsTreeWid = NULL; //_olamTreeWid = NULL; //_accountsTreeWid = NULL; //if (_propagateDlg) //{ // delete _propagateDlg; // _propagateDlg = NULL; //} //QList massBalSumDlgs = _massBalSumDlgsForSlots.values(); //const int massBalSumDlgCnt = massBalSumDlgs.count(); //_massBalSumDlgsForSlots.clear(); //for (int inx = 0; inx < massBalSumDlgCnt; ++inx) //{ // MassBalSummaryDlg* deadDlg = massBalSumDlgs[inx]; // if (deadDlg) // { // deadDlg->setVisible(false); // delete deadDlg; // } //} //massBalSumDlgs.clear(); //_linkedSlotsMenuSlots.clear(); //if (_dupSlotObjRootSelection) //{ // delete _dupSlotObjRootSelection; // _dupSlotObjRootSelection = NULL; //} //if (_simObj && (_simObj == _processSimObjDeletion_inProgress)) //{ // _simObj = NULL; // _isAggObj = false; // _isGenDataObj = false; // _isDataObjProper = false; // _isSnapshotObj = false; // _slotGroupsSupported = false; //} } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- void RplViewerDlg::updateWindowTitle() { const QString bareTitle = "Rpl Viewer"; const QString rplObjName = _activeRplObj ? _activeRplObj->getName() : QString(); const int tabCnt = _rplTabBar ? _rplTabBar->count() : 0; QString titleStr(bareTitle); // Robynn todo: re-visit when I remember how we wanted to display window title //if (VIEWER_TITLE_BAR_SHOWS_OBJ_COUNT && (tabCnt > 1)) //{ // static const QString Fmt(" (%1)"); // titleStr += Fmt.arg(tabCnt); //} if (!rplObjName.isEmpty()) { static const QString Fmt(" - %1"); titleStr += Fmt.arg(rplObjName); } setWindowTitle(titleStr); } //---------------------------------------------------------------------------- //---------------------------------------------------------------------------- void RplViewerDlg::sensitizeMenus() { // Robynn todo: sensitizeMenus() } //--- (end RplViewerDlg.cpp) ---