VirtualBox

Changeset 63893 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Sep 19, 2016 4:01:45 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
110765
Message:

FE/Qt: bugref:6899: Accessibility support (step 35): Selector UI: Extend Snapshot pane with the additional API and the translatable stuff required to be visible by the accessibility interface.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/selector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp

    r63852 r63893  
    501501*   Class UISnapshotPane implementation.                                                                                         *
    502502*********************************************************************************************************************************/
     503
     504/* static  */
     505UISnapshotItem *UISnapshotPane::toSnapshotItem(QTreeWidgetItem *pItem)
     506{
     507    /* Make sure alive UISnapshotItem passed: */
     508    if (!pItem || pItem->type() != UISnapshotItem::ItemType)
     509        return 0;
     510
     511    /* Return casted UISnapshotItem then: */
     512    return static_cast<UISnapshotItem*>(pItem);
     513}
     514
     515/* static */
     516const UISnapshotItem *UISnapshotPane::toSnapshotItem(const QTreeWidgetItem *pItem)
     517{
     518    /* Make sure alive UISnapshotItem passed: */
     519    if (!pItem || pItem->type() != UISnapshotItem::ItemType)
     520        return 0;
     521
     522    /* Return casted UISnapshotItem then: */
     523    return static_cast<const UISnapshotItem*>(pItem);
     524}
    503525
    504526UISnapshotPane::UISnapshotPane(QWidget *pParent)
     
    627649void UISnapshotPane::retranslateUi()
    628650{
     651    /* Translate snapshot tree: */
     652    m_pSnapshotTree->setToolTip(tr("Contains snapshot tree of current virtual machine"));
     653
    629654    /* Translate actions names: */
    630655    m_pActionTakeSnapshot->setText(tr("Take &Snapshot"));
     
    12691294}
    12701295
    1271 /* static  */
    1272 UISnapshotItem *UISnapshotPane::toSnapshotItem(QTreeWidgetItem *pItem)
    1273 {
    1274     /* Make sure alive UISnapshotItem passed: */
    1275     if (!pItem || pItem->type() != UISnapshotItem::ItemType)
    1276         return 0;
    1277 
    1278     /* Return casted UISnapshotItem then: */
    1279     return static_cast<UISnapshotItem*>(pItem);
    1280 }
    1281 
    1282 /* static */
    1283 const UISnapshotItem *UISnapshotPane::toSnapshotItem(const QTreeWidgetItem *pItem)
    1284 {
    1285     /* Make sure alive UISnapshotItem passed: */
    1286     if (!pItem || pItem->type() != UISnapshotItem::ItemType)
    1287         return 0;
    1288 
    1289     /* Return casted UISnapshotItem then: */
    1290     return static_cast<const UISnapshotItem*>(pItem);
    1291 }
    1292 
    12931296#include "UISnapshotPane.moc"
    12941297
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.h

    r63852 r63893  
    5454
    5555public:
     56
     57    /** Casts QTreeWidgetItem to UISnapshotItem if possible. */
     58    static UISnapshotItem *toSnapshotItem(QTreeWidgetItem *pItem);
     59    /** Casts const QTreeWidgetItem to const UISnapshotItem if possible. */
     60    static const UISnapshotItem *toSnapshotItem(const QTreeWidgetItem *pItem);
    5661
    5762    /** Constructs snapshot pane passing @a pParent to the base-class. */
     
    142147    SnapshotAgeFormat traverseSnapshotAge(QTreeWidgetItem *pItem) const;
    143148
    144     /** Casts QTreeWidgetItem to UISnapshotItem if possible. */
    145     static UISnapshotItem *toSnapshotItem(QTreeWidgetItem *pItem);
    146     /** Casts const QTreeWidgetItem to const UISnapshotItem if possible. */
    147     static const UISnapshotItem *toSnapshotItem(const QTreeWidgetItem *pItem);
    148 
    149149    /** Holds the machine COM wrapper. */
    150150    CMachine         m_comMachine;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette