Changeset 43937 in vbox
- Timestamp:
- Nov 22, 2012 12:24:45 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r43778 r43937 164 164 165 165 /* Initialize variables: */ 166 int iSceneMargin = data( SelectorModelData_Margin).toInt();166 int iSceneMargin = data(ChooserModelData_Margin).toInt(); 167 167 QSize viewportSize = scene()->views()[0]->viewport()->size(); 168 168 int iViewportWidth = viewportSize.width() - 2 * iSceneMargin; … … 1102 1102 switch (iKey) 1103 1103 { 1104 case SelectorModelData_Margin: return 0;1104 case ChooserModelData_Margin: return 0; 1105 1105 default: break; 1106 1106 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
r43620 r43937 56 56 }; 57 57 58 /* Graphics selectormodel: */58 /* Graphics chooser-model: */ 59 59 class UIGChooserModel : public QObject 60 60 { … … 204 204 205 205 /* Data enumerator: */ 206 enum SelectorModelData206 enum ChooserModelData 207 207 { 208 208 /* Layout margin: */ 209 SelectorModelData_Margin209 ChooserModelData_Margin 210 210 }; 211 211 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp
r42909 r43937 76 76 { 77 77 return scene()->itemAt(position, deviceTransform); 78 }79 80 void UIGDetailsModel::setItems(const QList<UIVMItem*> &items)81 {82 m_pRoot->setItems(items);83 78 } 84 79 … … 98 93 /* Notify listener about root-item relayouted: */ 99 94 emit sigRootItemResized(m_pRoot->geometry().size(), m_pRoot->minimumSizeHint().toSize().width()); 95 } 96 97 void UIGDetailsModel::setItems(const QList<UIVMItem*> &items) 98 { 99 m_pRoot->setItems(items); 100 100 } 101 101 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h
r42909 r43937 42 42 class UIGDetailsItem; 43 43 44 /* Graphics selectormodel: */44 /* Graphics details-model: */ 45 45 class UIGDetailsModel : public QObject 46 46 { … … 49 49 signals: 50 50 51 /* Notif y listeners about root-item height changed: */51 /* Notifier: Root-item stuff: */ 52 52 void sigRootItemResized(const QSizeF &size, int iMinimumWidth); 53 53 54 /* Link-clickstuff: */54 /* Notifier: Link processing stuff: */ 55 55 void sigLinkClicked(const QString &strCategory, const QString &strControl, const QString &strId); 56 56 … … 61 61 ~UIGDetailsModel(); 62 62 63 /* API: Scene getter: */63 /* API: Scene stuff: */ 64 64 QGraphicsScene* scene() const; 65 66 /* API: Paint-device getter: */67 65 QPaintDevice* paintDevice() const; 68 69 /* API: Item positioning stuff: */70 66 QGraphicsItem* itemAt(const QPointF &position, const QTransform &deviceTransform = QTransform()) const; 71 72 /* API: Group/machine stuff: */73 void setItems(const QList<UIVMItem*> &items);74 67 75 68 /* API: Layout stuff: */ 76 69 void updateLayout(); 77 70 71 /* API: Current-item(s) stuff: */ 72 void setItems(const QList<UIVMItem*> &items); 73 78 74 private slots: 79 75 80 /* Handler: View-resize: */76 /* Handler: Details-view stuff: */ 81 77 void sltHandleViewResized(); 82 78 83 /* Handler : Togglestuff: */79 /* Handlers: Element-items stuff: */ 84 80 void sltToggleElements(DetailsElementType type, bool fToggled); 85 81 void sltToggleAnimationFinished(DetailsElementType type, bool fToggled); 86 87 /* Handler: Context-menu stuff: */88 82 void sltElementTypeToggled(); 89 83 90 /* Handler : Sliding started in chooser: */84 /* Handlers: Chooser stuff: */ 91 85 void sltHandleSlidingStarted(); 92 93 /* Handlers: Togle stuff in chooser: */94 86 void sltHandleToggleStarted(); 95 87 void sltHandleToggleFinished(); … … 115 107 void cleanupScene(); 116 108 117 /* Handler: Event-filter stuff: */109 /* Handler: Event-filter: */ 118 110 bool eventFilter(QObject *pObject, QEvent *pEvent); 119 111 120 /* Handler: Context 112 /* Handler: Context-menu stuff: */ 121 113 bool processContextMenuEvent(QGraphicsSceneContextMenuEvent *pEvent); 122 114
Note:
See TracChangeset
for help on using the changeset viewer.