VirtualBox

Changeset 43937 in vbox


Ignore:
Timestamp:
Nov 22, 2012 12:24:45 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: VM group UI: Details-model cleanup (part 1); Some cleanup for Chooser-model.

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  
    164164
    165165    /* Initialize variables: */
    166     int iSceneMargin = data(SelectorModelData_Margin).toInt();
     166    int iSceneMargin = data(ChooserModelData_Margin).toInt();
    167167    QSize viewportSize = scene()->views()[0]->viewport()->size();
    168168    int iViewportWidth = viewportSize.width() - 2 * iSceneMargin;
     
    11021102    switch (iKey)
    11031103    {
    1104         case SelectorModelData_Margin: return 0;
     1104        case ChooserModelData_Margin: return 0;
    11051105        default: break;
    11061106    }
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h

    r43620 r43937  
    5656};
    5757
    58 /* Graphics selector model: */
     58/* Graphics chooser-model: */
    5959class UIGChooserModel : public QObject
    6060{
     
    204204
    205205    /* Data enumerator: */
    206     enum SelectorModelData
     206    enum ChooserModelData
    207207    {
    208208        /* Layout margin: */
    209         SelectorModelData_Margin
     209        ChooserModelData_Margin
    210210    };
    211211
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.cpp

    r42909 r43937  
    7676{
    7777    return scene()->itemAt(position, deviceTransform);
    78 }
    79 
    80 void UIGDetailsModel::setItems(const QList<UIVMItem*> &items)
    81 {
    82     m_pRoot->setItems(items);
    8378}
    8479
     
    9893    /* Notify listener about root-item relayouted: */
    9994    emit sigRootItemResized(m_pRoot->geometry().size(), m_pRoot->minimumSizeHint().toSize().width());
     95}
     96
     97void UIGDetailsModel::setItems(const QList<UIVMItem*> &items)
     98{
     99    m_pRoot->setItems(items);
    100100}
    101101
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsModel.h

    r42909 r43937  
    4242class UIGDetailsItem;
    4343
    44 /* Graphics selector model: */
     44/* Graphics details-model: */
    4545class UIGDetailsModel : public QObject
    4646{
     
    4949signals:
    5050
    51     /* Notify listeners about root-item height changed: */
     51    /* Notifier: Root-item stuff: */
    5252    void sigRootItemResized(const QSizeF &size, int iMinimumWidth);
    5353
    54     /* Link-click stuff: */
     54    /* Notifier: Link processing stuff: */
    5555    void sigLinkClicked(const QString &strCategory, const QString &strControl, const QString &strId);
    5656
     
    6161    ~UIGDetailsModel();
    6262
    63     /* API: Scene getter: */
     63    /* API: Scene stuff: */
    6464    QGraphicsScene* scene() const;
    65 
    66     /* API: Paint-device getter: */
    6765    QPaintDevice* paintDevice() const;
    68 
    69     /* API: Item positioning stuff: */
    7066    QGraphicsItem* itemAt(const QPointF &position, const QTransform &deviceTransform = QTransform()) const;
    71 
    72     /* API: Group/machine stuff: */
    73     void setItems(const QList<UIVMItem*> &items);
    7467
    7568    /* API: Layout stuff: */
    7669    void updateLayout();
    7770
     71    /* API: Current-item(s) stuff: */
     72    void setItems(const QList<UIVMItem*> &items);
     73
    7874private slots:
    7975
    80     /* Handler: View-resize: */
     76    /* Handler: Details-view stuff: */
    8177    void sltHandleViewResized();
    8278
    83     /* Handler: Toggle stuff: */
     79    /* Handlers: Element-items stuff: */
    8480    void sltToggleElements(DetailsElementType type, bool fToggled);
    8581    void sltToggleAnimationFinished(DetailsElementType type, bool fToggled);
    86 
    87     /* Handler: Context-menu stuff: */
    8882    void sltElementTypeToggled();
    8983
    90     /* Handler: Sliding started in chooser: */
     84    /* Handlers: Chooser stuff: */
    9185    void sltHandleSlidingStarted();
    92 
    93     /* Handlers: Togle stuff in chooser: */
    9486    void sltHandleToggleStarted();
    9587    void sltHandleToggleFinished();
     
    115107    void cleanupScene();
    116108
    117     /* Handler: Event-filter stuff: */
     109    /* Handler: Event-filter: */
    118110    bool eventFilter(QObject *pObject, QEvent *pEvent);
    119111
    120     /* Handler: Context menu stuff: */
     112    /* Handler: Context-menu stuff: */
    121113    bool processContextMenuEvent(QGraphicsSceneContextMenuEvent *pEvent);
    122114
Note: See TracChangeset for help on using the changeset viewer.

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