VirtualBox

Changeset 80554 in vbox


Ignore:
Timestamp:
Sep 2, 2019 2:27:53 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133061
Message:

FE/Qt: bugref:9510: Adding some missing connections.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp

    r79365 r80554  
    2727
    2828/* COM includes: */
     29#include "COMEnums.h"
    2930#include "CEventListener.h"
    3031#include "CEventSource.h"
     
    8182    /** Notifies about audio adapter state change. */
    8283    void sigAudioAdapterChange();
     84    /** Notifies clipboard mode change. */
     85    void sigClipboardModeChange(KClipboardMode enmMode);
     86    /** Notifies drag and drop mode change. */
     87    void sigDnDModeChange(KDnDMode enmMode);
    8388
    8489public:
     
    270275            this, SLOT(sltShowWindow(qint64 &)),
    271276            Qt::DirectConnection);
    272     connect(m_pQtListener->getWrapped(), SIGNAL(sigAudioAdapterChange()),
    273             this, SIGNAL(sigAudioAdapterChange()),
     277    connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigAudioAdapterChange,
     278            this, &UIConsoleEventHandlerProxy::sigAudioAdapterChange,
     279            Qt::DirectConnection);
     280   connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigClipboardModeChange,
     281            this, &UIConsoleEventHandlerProxy::sigClipboardModeChange,
     282            Qt::DirectConnection);
     283   connect(m_pQtListener->getWrapped(), &UIMainEventListener::sigDnDModeChange,
     284            this, &UIConsoleEventHandlerProxy::sigDnDModeChange,
    274285            Qt::DirectConnection);
    275286}
     
    434445            this, SIGNAL(sigAudioAdapterChange()),
    435446            Qt::QueuedConnection);
     447    connect(m_pProxy, &UIConsoleEventHandlerProxy::sigClipboardModeChange,
     448            this, &UIConsoleEventHandler::sigClipboardModeChange,
     449            Qt::QueuedConnection);
     450    connect(m_pProxy, &UIConsoleEventHandlerProxy::sigDnDModeChange,
     451            this, &UIConsoleEventHandler::sigDnDModeChange,
     452            Qt::QueuedConnection);
    436453}
    437454
    438455#include "UIConsoleEventHandler.moc"
    439 
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h

    r80044 r80554  
    8787    /** Notifies about audio adapter state change. */
    8888    void sigAudioAdapterChange();
     89    /** Notifies clipboard mode change. */
     90    void sigClipboardModeChange(KClipboardMode enmMode);
     91    /** Notifies drag and drop mode change. */
     92    void sigDnDModeChange(KDnDMode enmMode);
    8993
    9094public:
     
    123127
    124128#endif /* !FEQT_INCLUDED_SRC_runtime_UIConsoleEventHandler_h */
    125 
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationConfiguration.cpp

    r80379 r80554  
    7171}
    7272
    73 
    7473void UIInformationConfiguration::createTableItems()
    7574{
     
    140139    m_pTableWidget->resizeColumnToContents(2);
    141140}
    142 
    143 
    144141
    145142void UIInformationConfiguration::prepareObjects()
     
    166163}
    167164
    168 
    169 
    170165void UIInformationConfiguration::insertInfoRows(const UITextTable &table, const QFontMetrics &fontMetrics,
    171166                                                QTextDocument &textDocument, int &iMaxColumn1Length)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp

    r80545 r80554  
    7171/*********************************************************************************************************************************
    7272*   UIRuntimeInfoWidget definition.                                                                                     *
    73 ******************************************************************1***************************************************************/
     73*********************************************************************************************************************************/
     74/** A QTablWidget extention to show some runtime attributes. Some of these are updated in response to IConsole events. Uptime field
     75  * is updated thru a QTimer. */
    7476class UIRuntimeInfoWidget : public QIWithRetranslateUI<QTableWidget>
    7577{
     
    12301232    QVector<QString> allNames;// = new ArrayList<IUnknown>();
    12311233    QVector<CUnknown> allObjects;// = new ArrayList<IUnknown>();
    1232 
    12331234    QVector<QString>  aReturnNames;
    12341235    QVector<CUnknown>  aReturnObjects;
     
    12381239    QVector<ULONG>  aReturnDataIndices;
    12391240    QVector<ULONG>  aReturnDataLengths;
    1240 
     1241    /* Make a query to CPerformanceCollector to fetch some metrics (e.g RAM usage): */
    12411242    QVector<LONG> returnData = m_performanceMonitor.QueryMetricsData(m_nameList,
    12421243                                                                     m_objectList,
     
    12501251    quint64 iTotalRAM = 0;
    12511252    quint64 iFreeRAM = 0;
    1252 
     1253    /* Parse the result we get from CPerformanceCollector to get respective values: */
    12531254    for (int i = 0; i < aReturnNames.size(); ++i)
    12541255    {
     
    13661367    m_performanceMonitor = uiCommon().virtualBox().GetPerformanceCollector();
    13671368    m_machineDebugger = m_console.GetDebugger();
    1368 
    13691369    if (m_performanceMonitor.isNull())
    13701370        return;
     
    13921392    m_subMetrics.insert(m_strCPUMetricName, UIMetric(m_strCPUMetricName, "%", iMaximumQueueSize));
    13931393    {
    1394 
    13951394        /* Network metric: */
    13961395        UIMetric networkMetric(m_strNetworkMetricName, "B", iMaximumQueueSize);
     
    15421541        return;
    15431542    }
    1544 
    15451543    NetMetric.addData(0, iReceiveRate);
    15461544    NetMetric.addData(1, iTransmitRate);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.h

    r80543 r80554  
    152152
    153153private slots:
    154 
     154    /** Reads the metric values for several sources and calls corresponding update functions. */
    155155    void sltTimeout();
    156     void sltGuestAdditionsStateChange();
    157     void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
    158     void sltVRDEChange();
    159     void sltClipboardChange(KClipboardMode enmMode);
    160     void sltDnDModeChange(KDnDMode enmMode);
     156    /** @name These functions are connected to API events and implement necessary updates.
     157      * @{ */
     158        void sltGuestAdditionsStateChange();
     159        void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
     160        void sltVRDEChange();
     161        void sltClipboardChange(KClipboardMode enmMode);
     162        void sltDnDModeChange(KDnDMode enmMode);
     163    /** @} */
    161164
    162165private:
    163166
    164     /** Prepares layout. */
    165167    void prepareObjects();
    166168    void prepareMetrics();
     
    175177    QString dataColorString(const QString &strChartName, int iDataIndex);
    176178    void runTimeAttributes();
    177 
    178179    QVector<DebuggerMetricData> getTotalCounterFromDegugger(const QString &strQuery);
    179180
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