VirtualBox

Changeset 67306 in vbox for trunk/src


Ignore:
Timestamp:
Jun 9, 2017 8:17:05 AM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: Selector UI: Tools pane: Snapshot pane: Reworking 'Details' pane: Removing 'Taken' label first of all.

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

Legend:

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

    r67277 r67306  
    319319    , m_pTabWidget(0)
    320320    , m_pLayoutOptions(0)
    321     , m_pLabelTaken(0), m_pLabelTakenText(0)
    322321    , m_pLabelName(0), m_pEditorName(0)
    323322    , m_pLabelThumbnail(0)
     
    385384    m_pTabWidget->setTabText(1, tr("D&etails"));
    386385    m_pLabelName->setText(tr("&Name:"));
    387     m_pLabelTaken->setText(tr("Taken:"));
    388386    m_pLabelDescription->setText(tr("&Description:"));
    389387
     
    498496        AssertPtrReturnVoid(m_pLayoutOptions);
    499497        {
    500             /* Create taken label: */
    501             m_pLabelTaken = new QLabel;
    502             AssertPtrReturnVoid(m_pLabelTaken);
    503             {
    504                 /* Configure label: */
    505                 m_pLabelTaken->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter);
    506 
    507                 /* Add into layout: */
    508                 m_pLayoutOptions->addWidget(m_pLabelTaken, 0, 0);
    509             }
    510             /* Create taken text: */
    511             m_pLabelTakenText = new QLabel;
    512             AssertPtrReturnVoid(m_pLabelTakenText);
    513             {
    514                 /* Configure label: */
    515                 QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Minimum);
    516                 policy.setHorizontalStretch(1);
    517                 m_pLabelTakenText->setSizePolicy(policy);
    518 
    519                 /* Add into layout: */
    520                 m_pLayoutOptions->addWidget(m_pLabelTakenText, 0, 1);
    521             }
    522 
    523498            /* Create name label: */
    524499            m_pLabelName = new QLabel;
     
    529504
    530505                /* Add into layout: */
    531                 m_pLayoutOptions->addWidget(m_pLabelName, 1, 0);
     506                m_pLayoutOptions->addWidget(m_pLabelName, 0, 0);
    532507            }
    533508            /* Create name editor: */
     
    544519
    545520                /* Add into layout: */
    546                 m_pLayoutOptions->addWidget(m_pEditorName, 1, 1);
     521                m_pLayoutOptions->addWidget(m_pEditorName, 0, 1);
    547522            }
    548523
     
    675650        m_pStackedLayout->setCurrentWidget(m_pTabWidget);
    676651
    677         /* Calculate snapshot timestamp info: */
    678         QDateTime timestamp;
    679         timestamp.setTime_t(m_comSnapshot.GetTimeStamp() / 1000);
    680         bool fDateTimeToday = timestamp.date() == QDate::currentDate();
    681         QString dateTime = fDateTimeToday ? timestamp.time().toString(Qt::LocalDate) : timestamp.toString(Qt::LocalDate);
    682         m_pLabelTakenText->setText(dateTime);
    683 
    684652        /* Read snapshot display contents: */
    685653        CMachine comMachine = m_comSnapshot.GetMachine();
     
    709677            m_pLabelThumbnail->setHidden(true);
    710678
    711             m_pLayoutOptions->removeWidget(m_pLabelTakenText);
    712679            m_pLayoutOptions->removeWidget(m_pEditorName);
    713             m_pLayoutOptions->addWidget(m_pLabelTakenText, 0, 1, 1, 2);
    714             m_pLayoutOptions->addWidget(m_pEditorName, 1, 1, 1, 2);
     680            m_pLayoutOptions->addWidget(m_pEditorName, 0, 1, 1, 2);
    715681        }
    716682        else
     
    722688                                                                  Qt::SmoothTransformation));
    723689
    724             m_pLayoutOptions->removeWidget(m_pLabelTakenText);
    725690            m_pLayoutOptions->removeWidget(m_pEditorName);
    726             m_pLayoutOptions->addWidget(m_pLabelTakenText, 0, 1);
    727             m_pLayoutOptions->addWidget(m_pEditorName, 1, 1);
     691            m_pLayoutOptions->addWidget(m_pEditorName, 0, 1);
    728692
    729693            m_pLayoutOptions->removeWidget(m_pLabelThumbnail);
     
    737701        m_pStackedLayout->setCurrentWidget(m_pEmptyWidget);
    738702
    739         /* Clear snapshot timestamp info: */
    740         m_pLabelTakenText->clear();
    741 
    742703        // TODO: Check whether layout manipulations are really
    743704        //       necessary, they looks a bit dangerous to me..
     
    749710
    750711            m_pLayoutOptions->removeWidget(m_pEditorName);
    751             m_pLayoutOptions->removeWidget(m_pLabelTakenText);
    752             m_pLayoutOptions->addWidget(m_pLabelTakenText, 0, 1, 1, 2);
    753             m_pLayoutOptions->addWidget(m_pEditorName, 1, 1, 1, 2);
     712            m_pLayoutOptions->addWidget(m_pEditorName, 0, 1, 1, 2);
    754713        }
    755714    }
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotDetailsWidget.h

    r67277 r67306  
    155155    QGridLayout *m_pLayoutOptions;
    156156
    157     /** Holds the taken label instance. */
    158     QLabel *m_pLabelTaken;
    159     /** Holds the taken text instance. */
    160     QLabel *m_pLabelTakenText;
    161 
    162157    /** Holds the name label instance. */
    163158    QLabel    *m_pLabelName;
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