VirtualBox

Changeset 98974 in vbox for trunk


Ignore:
Timestamp:
Mar 15, 2023 9:47:44 AM (19 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Runtime UI: UIIndicatorsPool: Make indicator's updateAppearance function a public slot so that it could be directly connected to required signals.

File:
1 edited

Legend:

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

    r98973 r98974  
    6262    virtual QString description() const { return m_strDescription; }
    6363
     64public slots:
     65
    6466    /** Abstract update routine. */
    6567    virtual void updateAppearance() = 0;
     
    179181        /* Configure connection: */
    180182        connect(pMachine, &UIMachine::sigStorageDeviceChange,
    181                 this, &UIIndicatorHardDrive::sltStorageDeviceChange);
     183                this, &UIIndicatorHardDrive::updateAppearance);
    182184        /* Translate finally: */
    183185        retranslateUi();
    184186    }
    185187
    186 protected:
     188protected slots:
    187189
    188190    /** Update routine. */
     
    205207        /* Update indicator state: */
    206208        setState(fAttachmentsPresent ? KDeviceActivity_Idle : KDeviceActivity_Null);
    207     }
    208 
    209 private slots:
    210 
    211     /** Refreshes the tooltip if the device config changes at runtime (hotplugging, USB storage). */
    212     void sltStorageDeviceChange()
    213     {
    214         updateAppearance();
    215209    }
    216210};
     
    237231    }
    238232
    239 protected:
     233protected slots:
    240234
    241235    /** Update routine. */
     
    282276    }
    283277
    284 protected:
     278protected slots:
    285279
    286280    /** Update routine. */
     
    336330    }
    337331
    338 protected:
     332protected slots:
    339333
    340334    /** Update routine. */
     
    393387            /* Configure auto-update timer: */
    394388            connect(m_pTimerAutoUpdate, &QTimer::timeout,
    395                     this, &UIIndicatorNetwork::sltUpdateNetworkIPs);
     389                    this, &UIIndicatorNetwork::updateAppearance);
    396390            /* Start timer immediately if machine is running: */
    397391            sltHandleMachineStateChange();
     
    401395    }
    402396
    403 protected:
     397protected slots:
    404398
    405399    /** Update routine. */
     
    439433    }
    440434
    441     /** Updates network IP addresses. */
    442     void sltUpdateNetworkIPs()
    443     {
    444         updateAppearance();
    445     }
    446 
    447435private:
    448436
     
    472460    }
    473461
    474 protected:
     462protected slots:
    475463
    476464    /** Update routine. */
     
    516504    }
    517505
    518 protected:
     506protected slots:
    519507
    520508    /** Update routine. */
     
    553541    }
    554542
    555 protected:
     543protected slots:
    556544
    557545    /** Update routine. */
     
    633621        drawContents(&painter);
    634622    }
     623
     624protected slots:
    635625
    636626    /** Update routine. */
     
    761751    }
    762752
     753protected slots:
     754
    763755    /** Update routine. */
    764756    virtual void updateAppearance() RT_OVERRIDE
     
    832824    }
    833825
    834 protected:
     826protected slots:
    835827
    836828    /** Update routine. */
     
    911903    }
    912904
    913 protected:
     905protected slots:
    914906
    915907    /** Update routine. */
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