VirtualBox

Changeset 43936 in vbox


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

FE/Qt: VM group UI: Chooser-view/Details-view cleanup.

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/UIGChooserView.h

    r42802 r43936  
    2626class UIGChooserItem;
    2727
    28 /* Graphics selector view: */
     28/* Graphics chooser-view: */
    2929class UIGChooserView : public QGraphicsView
    3030{
     
    3333signals:
    3434
    35     /* Notifiers: Resize stuff: */
     35    /* Notifier: Resize stuff: */
    3636    void sigResized();
    3737
     
    4343private slots:
    4444
    45     /* Handler: Root-item resize stuff: */
     45    /* Handler: Root-item stuff: */
    4646    void sltHandleRootItemResized(const QSizeF &size, int iMinimumWidth);
    4747
    48     /* Handler: Focus item change: */
     48    /* Handler: Focus-item stuff: */
    4949    void sltFocusChanged(UIGChooserItem *pFocusItem);
    5050
    5151private:
    5252
    53     /* Event handler: Resize-event: */
     53    /* Handler: Resize-event stuff: */
    5454    void resizeEvent(QResizeEvent *pEvent);
    5555
    56     /* Helpers: */
     56    /* Helper: Update stuff: */
    5757    void updateSceneRect(const QSizeF &sizeHint = QSizeF());
    5858};
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetails.cpp

    r43935 r43936  
    8282    /* Setup details-view: */
    8383    m_pDetailsView = new UIGDetailsView(this);
    84     m_pDetailsView->setFrameShape(QFrame::NoFrame);
    85     m_pDetailsView->setFrameShadow(QFrame::Plain);
    8684    m_pDetailsView->setScene(m_pDetailsModel->scene());
    8785    m_pDetailsView->show();
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.cpp

    r43926 r43936  
    2929    : QGraphicsView(pParent)
    3030{
    31     /* Setup palette: */
    32     QPalette pal = qApp->palette();
    33     pal.setColor(QPalette::Base, pal.color(QPalette::Active, QPalette::Window));
    34     setPalette(pal);
     31    /* Prepare palette: */
     32    preparePalette();
    3533
    36     /* Scrollbars policy: */
     34    /* Setup frame: */
     35    setFrameShape(QFrame::NoFrame);
     36    setFrameShadow(QFrame::Plain);
     37
     38    /* Setup scroll-bars policy: */
    3739    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    3840
     
    4951    setMinimumWidth(2 * frameWidth() + iMinimumWidth +
    5052                    verticalScrollBar()->sizeHint().width());
     53}
     54
     55void UIGDetailsView::preparePalette()
     56{
     57    /* Setup palette: */
     58    QPalette pal = qApp->palette();
     59    pal.setColor(QPalette::Base, pal.color(QPalette::Active, QPalette::Window));
     60    setPalette(pal);
    5161}
    5262
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsView.h

    r42529 r43936  
    2323#include <QGraphicsView>
    2424
    25 /* Graphics details view: */
     25/* Graphics details-view: */
    2626class UIGDetailsView : public QGraphicsView
    2727{
     
    3030signals:
    3131
    32     /* Notifiers: Resize stuff: */
     32    /* Notifier: Resize stuff: */
    3333    void sigResized();
    3434
     
    4040private slots:
    4141
    42     /* Handlers: Resize stuff: */
     42    /* Handler: Resize stuff: */
    4343    void sltHandleRootItemResized(const QSizeF &size, int iMinimumWidth);
    4444
    4545private:
    4646
    47     /* Event handlers: Resize stuff: */
     47    /* Helper: Prepare stuff: */
     48    void preparePalette();
     49
     50    /* Handler: Resize-event stuff: */
    4851    void resizeEvent(QResizeEvent *pEvent);
    4952
    50     /* Helpers: Update stuff: */
     53    /* Helper: Update stuff: */
    5154    void updateSceneRect(const QSizeF &sizeHint = QSizeF());
    5255};
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