儲存庫 vbox 的更動 42922
- 時間撮記:
- 2012-8-22 下午02:36:27 (12 年 以前)
- 位置:
- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
- 檔案:
-
- 修改 4 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.cpp
r42909 r42922 328 328 329 329 /* static */ 330 void UIGChooserItem::paintText(QPainter *pPainter, const QRect &rect, const QFont &font, const QString &strText) 331 { 330 void UIGChooserItem::paintText(QPainter *pPainter, QPoint point, 331 const QFont &font, QPaintDevice *pPaintDevice, 332 const QString &strText) 333 { 334 /* Prepare variables: */ 335 QFontMetrics fm(font, pPaintDevice); 336 point += QPoint(0, fm.ascent()); 337 338 /* Draw text: */ 332 339 pPainter->save(); 333 340 pPainter->setFont(font); 334 pPainter->drawText( rect, strText);341 pPainter->drawText(point, strText); 335 342 pPainter->restore(); 336 343 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h
r42909 r42922 134 134 static void paintFrameRect(QPainter *pPainter, const QRect &rect, bool fIsSelected, int iRadius); 135 135 static void paintPixmap(QPainter *pPainter, const QRect &rect, const QPixmap &pixmap); 136 static void paintText(QPainter *pPainter, const QRect &rect, const QFont &font, const QString &strText); 136 static void paintText(QPainter *pPainter, QPoint point, 137 const QFont &font, QPaintDevice *pPaintDevice, 138 const QString &strText); 137 139 138 140 /* Helpers: Drag and drop stuff: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
r42909 r42922 1240 1240 paintText(/* Painter: */ 1241 1241 pPainter, 1242 /* Rectangleto paint in: */1243 Q Rect(QPoint(iNameX, iNameY), nameSize),1242 /* Point to paint in: */ 1243 QPoint(iNameX, iNameY), 1244 1244 /* Font to paint text: */ 1245 1245 data(GroupItemData_NameFont).value<QFont>(), 1246 /* Paint device: */ 1247 model()->paintDevice(), 1246 1248 /* Text to paint: */ 1247 1249 data(GroupItemData_Name).toString()); … … 1282 1284 paintText(/* Painter: */ 1283 1285 pPainter, 1284 /* Rectangleto paint in: */1285 Q Rect(QPoint(iMachineCountTextX, iMachineCountTextY), machineCountTextSize),1286 /* Point to paint in: */ 1287 QPoint(iMachineCountTextX, iMachineCountTextY), 1286 1288 /* Font to paint text: */ 1287 1289 infoFont, 1290 /* Paint device: */ 1291 model()->paintDevice(), 1288 1292 /* Text to paint: */ 1289 1293 strMachineCountText); … … 1310 1314 paintText(/* Painter: */ 1311 1315 pPainter, 1312 /* Rectangleto paint in: */1313 Q Rect(QPoint(iGroupCountTextX, iGroupCountTextY), groupCountTextSize),1316 /* Point to paint in: */ 1317 QPoint(iGroupCountTextX, iGroupCountTextY), 1314 1318 /* Font to paint text: */ 1315 1319 infoFont, 1320 /* Paint device: */ 1321 model()->paintDevice(), 1316 1322 /* Text to paint: */ 1317 1323 strGroupCountText); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
r42909 r42922 707 707 paintText(/* Painter: */ 708 708 pPainter, 709 /* Rectangleto paint in: */710 Q Rect(QPoint(iNameX, iNameY), machineNameSize),709 /* Point to paint in: */ 710 QPoint(iNameX, iNameY), 711 711 /* Font to paint text: */ 712 712 data(MachineItemData_NameFont).value<QFont>(), 713 /* Paint device: */ 714 model()->paintDevice(), 713 715 /* Text to paint: */ 714 716 data(MachineItemData_Name).toString()); … … 729 731 paintText(/* Painter: */ 730 732 pPainter, 731 /* Rectangleto paint in: */732 Q Rect(QPoint(iSnapshotNameX, iSnapshotNameY), snapshotNameSize),733 /* Point to paint in: */ 734 QPoint(iSnapshotNameX, iSnapshotNameY), 733 735 /* Font to paint text: */ 734 736 data(MachineItemData_SnapshotNameFont).value<QFont>(), 737 /* Paint device: */ 738 model()->paintDevice(), 735 739 /* Text to paint: */ 736 740 data(MachineItemData_SnapshotName).toString()); … … 770 774 paintText(/* Painter: */ 771 775 pPainter, 772 /* Rectangleto paint in: */773 Q Rect(QPoint(iMachineStateTextX, iMachineStateTextY), machineStateTextSize),776 /* Point to paint in: */ 777 QPoint(iMachineStateTextX, iMachineStateTextY), 774 778 /* Font to paint text: */ 775 779 data(MachineItemData_StateTextFont).value<QFont>(), 780 /* Paint device: */ 781 model()->paintDevice(), 776 782 /* Text to paint: */ 777 783 data(MachineItemData_StateText).toString());
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器