- Timestamp:
- Nov 7, 2012 8:09:11 AM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
r43820 r43821 55 55 56 56 /* Calculate minimum header size: */ 57 recacheHeaderSize();57 updateHeaderSize(); 58 58 } 59 59 … … 80 80 81 81 /* Calculate minimum header size: */ 82 recacheHeaderSize();82 updateHeaderSize(); 83 83 } 84 84 … … 106 106 107 107 /* Calculate minimum header size: */ 108 recacheHeaderSize();108 updateHeaderSize(); 109 109 } 110 110 … … 134 134 135 135 /* Calculate minimum header size: */ 136 recacheHeaderSize();136 updateHeaderSize(); 137 137 } 138 138 … … 199 199 200 200 /* Update visible name: */ 201 recacheVisibleName();201 updateVisibleName(); 202 202 /* Update minimum header size: */ 203 recacheHeaderSize();203 updateHeaderSize(); 204 204 } 205 205 … … 255 255 /* Should we update visible name? */ 256 256 if (m_previousGeometry.width() != newGeometry.width()) 257 recacheVisibleName();257 updateVisibleName(); 258 258 259 259 /* Remember the new geometry: */ … … 461 461 { 462 462 /* Update visible name: */ 463 recacheVisibleName();463 updateVisibleName(); 464 464 /* Update minimum header size: */ 465 recacheHeaderSize();466 } 467 468 void UIGChooserItemGroup:: recacheVisibleName()465 updateHeaderSize(); 466 } 467 468 void UIGChooserItemGroup::updateVisibleName() 469 469 { 470 470 /* Not for main root: */ … … 517 517 } 518 518 519 void UIGChooserItemGroup:: recacheHeaderSize()519 void UIGChooserItemGroup::updateHeaderSize() 520 520 { 521 521 /* Not for main root: */ … … 588 588 } 589 589 590 void UIGChooserItemGroup::retranslateUi()591 {592 /* Update group tool-tip: */593 updateToolTip();594 595 /* Update button tool-tips: */596 if (m_pEnterButton)597 m_pEnterButton->setToolTip(tr("Enter group"));598 if (m_pExitButton)599 m_pExitButton->setToolTip(tr("Exit group"));600 updateToggleButtonToolTip();601 }602 603 void UIGChooserItemGroup::show()604 {605 /* Call to base-class: */606 UIGChooserItem::show();607 /* Show children: */608 if (!isClosed())609 foreach (UIGChooserItem *pItem, items())610 pItem->show();611 }612 613 void UIGChooserItemGroup::hide()614 {615 /* Call to base-class: */616 UIGChooserItem::hide();617 /* Hide children: */618 foreach (UIGChooserItem *pItem, items())619 pItem->hide();620 }621 622 void UIGChooserItemGroup::startEditing()623 {624 /* Not for root-item: */625 if (isRoot())626 return;627 628 /* Not while saving groups: */629 if (model()->isGroupSavingInProgress())630 return;631 632 /* Unlock name-editor: */633 m_pNameEditor->show();634 m_pNameEditorWidget->setText(name());635 m_pNameEditorWidget->setFocus();636 }637 638 590 void UIGChooserItemGroup::updateToolTip() 639 591 { … … 689 641 } 690 642 643 void UIGChooserItemGroup::retranslateUi() 644 { 645 /* Update group tool-tip: */ 646 updateToolTip(); 647 648 /* Update button tool-tips: */ 649 if (m_pEnterButton) 650 m_pEnterButton->setToolTip(tr("Enter group")); 651 if (m_pExitButton) 652 m_pExitButton->setToolTip(tr("Exit group")); 653 updateToggleButtonToolTip(); 654 } 655 656 void UIGChooserItemGroup::show() 657 { 658 /* Call to base-class: */ 659 UIGChooserItem::show(); 660 /* Show children: */ 661 if (!isClosed()) 662 foreach (UIGChooserItem *pItem, items()) 663 pItem->show(); 664 } 665 666 void UIGChooserItemGroup::hide() 667 { 668 /* Call to base-class: */ 669 UIGChooserItem::hide(); 670 /* Hide children: */ 671 foreach (UIGChooserItem *pItem, items()) 672 pItem->hide(); 673 } 674 675 void UIGChooserItemGroup::startEditing() 676 { 677 /* Not for root-item: */ 678 if (isRoot()) 679 return; 680 681 /* Not while saving groups: */ 682 if (model()->isGroupSavingInProgress()) 683 return; 684 685 /* Unlock name-editor: */ 686 m_pNameEditor->show(); 687 m_pNameEditorWidget->setText(name()); 688 m_pNameEditorWidget->setFocus(); 689 } 690 691 691 void UIGChooserItemGroup::addItem(UIGChooserItem *pItem, int iPosition) 692 692 { … … 722 722 723 723 /* Update: */ 724 recacheVisibleName();725 recacheHeaderSize();724 updateVisibleName(); 725 updateHeaderSize(); 726 726 updateToolTip(); 727 727 } … … 754 754 755 755 /* Update: */ 756 recacheVisibleName();757 recacheHeaderSize();756 updateVisibleName(); 757 updateHeaderSize(); 758 758 updateToolTip(); 759 759 } … … 770 770 771 771 /* Update: */ 772 recacheVisibleName();773 recacheHeaderSize();772 updateVisibleName(); 773 updateHeaderSize(); 774 774 updateToolTip(); 775 775 } … … 826 826 827 827 /* Update: */ 828 recacheVisibleName();829 recacheHeaderSize();828 updateVisibleName(); 829 updateHeaderSize(); 830 830 updateToolTip(); 831 831 } … … 1383 1383 1384 1384 /* Update visible name: */ 1385 recacheVisibleName();1385 updateVisibleName(); 1386 1386 } 1387 1387 … … 1396 1396 1397 1397 /* Update visible name: */ 1398 recacheVisibleName();1398 updateVisibleName(); 1399 1399 } 1400 1400 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h
r43819 r43821 131 131 static void copyContent(UIGChooserItemGroup *pFrom, UIGChooserItemGroup *pTo); 132 132 133 /* Helpers: Recache stuff: */133 /* Helpers: Update stuff: */ 134 134 void handleRootStatusChange(); 135 void recacheVisibleName(); 136 void recacheHeaderSize(); 135 void updateVisibleName(); 136 void updateHeaderSize(); 137 void updateToolTip(); 137 138 138 139 /* Helper: Translate stuff: */ … … 143 144 void hide(); 144 145 void startEditing(); 145 void updateToolTip();146 146 bool isMainRoot() const { return m_fMainRoot; } 147 147
Note:
See TracChangeset
for help on using the changeset viewer.