VirtualBox

Changeset 91102 in vbox for trunk/src


Ignore:
Timestamp:
Sep 3, 2021 12:19:45 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10067: A bit of refactoring for UINotificationMessage stuff.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r91094 r91102  
    6161{
    6262    createMessage(
    63         QApplication::translate("UIMessageCenter", "Can't fina help file ..."),
     63        QApplication::translate("UIMessageCenter", "Can't find help file ..."),
    6464        QApplication::translate("UIMessageCenter", "Failed to find the following help file:")
    6565                                                   .arg(strLocation));
     
    7474                                                   "Make sure your desktop environment can properly handle URLs of this type.")
    7575                                                   .arg(strUrl));
     76}
     77
     78/* static */
     79void UINotificationMessage::remindAboutBetaBuild()
     80{
     81    createMessage(
     82        QApplication::translate("UIMessageCenter", "BETA build warning!"),
     83        QApplication::translate("UIMessageCenter", "You are running a prerelease version of VirtualBox. "
     84                                                   "This version is not suitable for production use."));
     85}
     86
     87/* static */
     88void UINotificationMessage::remindAboutExperimentalBuild()
     89{
     90    createMessage(
     91        QApplication::translate("UIMessageCenter", "Experimental build warning!"),
     92        QApplication::translate("UIMessageCenter", "You are running an EXPERIMENTAL build of VirtualBox. "
     93                                                   "This version is not suitable for production use."));
     94}
     95
     96/* static */
     97void UINotificationMessage::warnAboutInvalidEncryptionPassword(const QString &strPasswordId)
     98{
     99    createMessage(
     100        QApplication::translate("UIMessageCenter", "Invalid Password ..."),
     101        QApplication::translate("UIMessageCenter", "Encryption password for <nobr>ID = '%1'</nobr> is invalid.")
     102                                                   .arg(strPasswordId));
    76103}
    77104
     
    91118{
    92119    createMessage(
    93         QApplication::translate("UIMessageCenter", "Can't send ACPI ..."),
     120        QApplication::translate("UIMessageCenter", "Can't send ACPI shutdown ..."),
    94121        QApplication::translate("UIMessageCenter", "You are trying to shut down the guest with the ACPI power button. "
    95122                                                   "This is currently not possible because the guest does not support "
    96123                                                   "software shutdown."));
    97 }
    98 
    99 /* static */
    100 void UINotificationMessage::warnAboutInvalidEncryptionPassword(const QString &strPasswordId)
    101 {
    102     createMessage(
    103         QApplication::translate("UIMessageCenter", "Invalid Password ..."),
    104         QApplication::translate("UIMessageCenter", "Encryption password for <nobr>ID = '%1'</nobr> is invalid.")
    105                                                    .arg(strPasswordId));
    106124}
    107125
     
    130148
    131149/* static */
    132 void UINotificationMessage::remindAboutBetaBuild()
    133 {
    134     createMessage(
    135         QApplication::translate("UIMessageCenter", "BETA build warning!"),
    136         QApplication::translate("UIMessageCenter", "You are running a prerelease version of VirtualBox. "
    137                                                    "This version is not suitable for production use."));
    138 }
    139 
    140 /* static */
    141 void UINotificationMessage::remindAboutExperimentalBuild()
    142 {
    143     createMessage(
    144         QApplication::translate("UIMessageCenter", "Experimental build warning!"),
    145         QApplication::translate("UIMessageCenter", "You are running an EXPERIMENTAL build of VirtualBox. "
    146                                                    "This version is not suitable for production use."));
     150void UINotificationMessage::remindAboutGuestAdditionsAreNotActive()
     151{
     152    createMessage(
     153        QApplication::translate("UIMessageCenter", "GA not active ..."),
     154        QApplication::translate("UIMessageCenter", "<p>The VirtualBox Guest Additions do not appear to be available on this "
     155                                                   "virtual machine, and shared folders cannot be used without them. To use "
     156                                                   "shared folders inside the virtual machine, please install the Guest "
     157                                                   "Additions if they are not installed, or re-install them if they are not "
     158                                                   "working correctly, by selecting <b>Insert Guest Additions CD image</b> from "
     159                                                   "the <b>Devices</b> menu. If they are installed but the machine is not yet "
     160                                                   "fully started then shared folders will be available once it is.</p>"),
     161        "remindAboutGuestAdditionsAreNotActive");
    147162}
    148163
     
    219234
    220235/* static */
    221 void UINotificationMessage::remindAboutGuestAdditionsAreNotActive()
    222 {
    223     createMessage(
    224         QApplication::translate("UIMessageCenter", "GA not active ..."),
    225         QApplication::translate("UIMessageCenter", "<p>The VirtualBox Guest Additions do not appear to be available on this "
    226                                                    "virtual machine, and shared folders cannot be used without them. To use "
    227                                                    "shared folders inside the virtual machine, please install the Guest "
    228                                                    "Additions if they are not installed, or re-install them if they are not "
    229                                                    "working correctly, by selecting <b>Insert Guest Additions CD image</b> from "
    230                                                    "the <b>Devices</b> menu. If they are installed but the machine is not yet "
    231                                                    "fully started then shared folders will be available once it is.</p>"),
    232         "remindAboutGuestAdditionsAreNotActive");
    233 }
    234 
    235 /* static */
    236236void UINotificationMessage::cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox)
    237237{
     
    267267        QApplication::translate("UIMessageCenter", "Failed to acquire snapshot parameter.") +
    268268        UIErrorString::formatErrorInfo(comSnapshot));
    269 }
    270 
    271 /* static */
    272 void UINotificationMessage::cannotAttachUSBDevice(const CConsole &comConsole, const QString &strDevice)
    273 {
    274     createMessage(
    275         QApplication::translate("UIMessageCenter", "Can't attach USB device ..."),
    276         QApplication::translate("UIMessageCenter", "Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.")
    277                                 .arg(strDevice, CConsole(comConsole).GetMachine().GetName()) +
    278         UIErrorString::formatErrorInfo(comConsole));
    279 }
    280 
    281 /* static */
    282 void UINotificationMessage::cannotAttachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo,
    283                                                   const QString &strDevice, const QString &strMachineName)
    284 {
    285     createMessage(
    286         QApplication::translate("UIMessageCenter", "Can't attach USB device ..."),
    287         QApplication::translate("UIMessageCenter", "Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.")
    288                                 .arg(strDevice, strMachineName) +
    289         UIErrorString::formatErrorInfo(comErrorInfo));
    290 }
    291 
    292 /* static */
    293 void UINotificationMessage::cannotDetachUSBDevice(const CConsole &comConsole, const QString &strDevice)
    294 {
    295     createMessage(
    296         QApplication::translate("UIMessageCenter", "Can't detach USB device ..."),
    297         QApplication::translate("UIMessageCenter", "Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.")
    298                                 .arg(strDevice, CConsole(comConsole).GetMachine().GetName()) +
    299         UIErrorString::formatErrorInfo(comConsole));
    300 }
    301 
    302 /* static */
    303 void UINotificationMessage::cannotDetachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo,
    304                                                   const QString &strDevice, const QString &strMachineName)
    305 {
    306     createMessage(
    307         QApplication::translate("UIMessageCenter", "Can't detach USB device ..."),
    308         QApplication::translate("UIMessageCenter", "Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.")
    309                                 .arg(strDevice, strMachineName) +
    310         UIErrorString::formatErrorInfo(comErrorInfo));
    311 }
    312 
    313 /* static */
    314 void UINotificationMessage::cannotAttachWebCam(const CEmulatedUSB &comDispatcher,
    315                                                const QString &strWebCamName, const QString &strMachineName)
    316 {
    317     createMessage(
    318         QApplication::translate("UIMessageCenter", "Can't attach webcam ..."),
    319         QApplication::translate("UIMessageCenter", "Failed to attach the webcam <b>%1</b> to the virtual machine <b>%2</b>.")
    320                                 .arg(strWebCamName, strMachineName) +
    321         UIErrorString::formatErrorInfo(comDispatcher));
    322 }
    323 
    324 /* static */
    325 void UINotificationMessage::cannotDetachWebCam(const CEmulatedUSB &comDispatcher,
    326                                                const QString &strWebCamName, const QString &strMachineName)
    327 {
    328     createMessage(
    329         QApplication::translate("UIMessageCenter", "Can't detach webcam ..."),
    330         QApplication::translate("UIMessageCenter", "Failed to detach the webcam <b>%1</b> from the virtual machine <b>%2</b>.")
    331                                 .arg(strWebCamName, strMachineName) +
    332         UIErrorString::formatErrorInfo(comDispatcher));
    333269}
    334270
     
    356292
    357293/* static */
     294void UINotificationMessage::cannotOpenMedium(const CVirtualBox &comVBox, const QString &strLocation)
     295{
     296    createMessage(
     297        QApplication::translate("UIMessageCenter", "Can't open medium ..."),
     298        QApplication::translate("UIMessageCenter", "Failed to open the disk image file <nobr><b>%1</b></nobr>.")
     299                                                   .arg(strLocation) +
     300        UIErrorString::formatErrorInfo(comVBox));
     301}
     302
     303/* static */
    358304void UINotificationMessage::cannotOpenMachine(const CVirtualBox &comVBox, const QString &strLocation)
    359305{
     
    366312
    367313/* static */
    368 void UINotificationMessage::cannotOpenMedium(const CVirtualBox &comVBox, const QString &strLocation)
    369 {
    370     createMessage(
    371         QApplication::translate("UIMessageCenter", "Can't open medium ..."),
    372         QApplication::translate("UIMessageCenter", "Failed to open the disk image file <nobr><b>%1</b></nobr>.")
    373                                                    .arg(strLocation) +
    374         UIErrorString::formatErrorInfo(comVBox));
     314void UINotificationMessage::cannotAttachUSBDevice(const CConsole &comConsole, const QString &strDevice)
     315{
     316    createMessage(
     317        QApplication::translate("UIMessageCenter", "Can't attach USB device ..."),
     318        QApplication::translate("UIMessageCenter", "Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.")
     319                                .arg(strDevice, CConsole(comConsole).GetMachine().GetName()) +
     320        UIErrorString::formatErrorInfo(comConsole));
     321}
     322
     323/* static */
     324void UINotificationMessage::cannotAttachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo,
     325                                                  const QString &strDevice, const QString &strMachineName)
     326{
     327    createMessage(
     328        QApplication::translate("UIMessageCenter", "Can't attach USB device ..."),
     329        QApplication::translate("UIMessageCenter", "Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.")
     330                                .arg(strDevice, strMachineName) +
     331        UIErrorString::formatErrorInfo(comErrorInfo));
     332}
     333
     334/* static */
     335void UINotificationMessage::cannotDetachUSBDevice(const CConsole &comConsole, const QString &strDevice)
     336{
     337    createMessage(
     338        QApplication::translate("UIMessageCenter", "Can't detach USB device ..."),
     339        QApplication::translate("UIMessageCenter", "Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.")
     340                                .arg(strDevice, CConsole(comConsole).GetMachine().GetName()) +
     341        UIErrorString::formatErrorInfo(comConsole));
     342}
     343
     344/* static */
     345void UINotificationMessage::cannotDetachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo,
     346                                                  const QString &strDevice, const QString &strMachineName)
     347{
     348    createMessage(
     349        QApplication::translate("UIMessageCenter", "Can't detach USB device ..."),
     350        QApplication::translate("UIMessageCenter", "Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.")
     351                                .arg(strDevice, strMachineName) +
     352        UIErrorString::formatErrorInfo(comErrorInfo));
     353}
     354
     355/* static */
     356void UINotificationMessage::cannotAttachWebCam(const CEmulatedUSB &comDispatcher,
     357                                               const QString &strWebCamName, const QString &strMachineName)
     358{
     359    createMessage(
     360        QApplication::translate("UIMessageCenter", "Can't attach webcam ..."),
     361        QApplication::translate("UIMessageCenter", "Failed to attach the webcam <b>%1</b> to the virtual machine <b>%2</b>.")
     362                                .arg(strWebCamName, strMachineName) +
     363        UIErrorString::formatErrorInfo(comDispatcher));
     364}
     365
     366/* static */
     367void UINotificationMessage::cannotDetachWebCam(const CEmulatedUSB &comDispatcher,
     368                                               const QString &strWebCamName, const QString &strMachineName)
     369{
     370    createMessage(
     371        QApplication::translate("UIMessageCenter", "Can't detach webcam ..."),
     372        QApplication::translate("UIMessageCenter", "Failed to detach the webcam <b>%1</b> from the virtual machine <b>%2</b>.")
     373                                .arg(strWebCamName, strMachineName) +
     374        UIErrorString::formatErrorInfo(comDispatcher));
    375375}
    376376
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h

    r91094 r91102  
    6161public:
    6262
    63     /** Notifies about inability to find help file at certain @a strLocation. */
    64     static void cannotFindHelpFile(const QString &strLocation);
    65     /** Notifies about inability to open @a strUrl. */
    66     static void cannotOpenURL(const QString &strUrl);
    67     /** Notifies about inability to mount image.
    68       * @param  strMachineName  Brings the machine name.
    69       * @param  strMediumName   Brings the medium name. */
    70     static void cannotMountImage(const QString &strMachineName, const QString &strMediumName);
    71     /** Notifies about inability to send ACPI shutdown. */
    72     static void cannotSendACPIToMachine();
    73     /** Notifies about invalid encryption password.
    74       * @param  strPasswordId  Brings password ID. */
    75     static void warnAboutInvalidEncryptionPassword(const QString &strPasswordId);
    76 
    77     /** Reminds about keyboard auto capturing. */
    78     static void remindAboutAutoCapture();
    79     /** Reminds about BETA build. */
    80     static void remindAboutBetaBuild();
    81     /** Reminds about BETA build. */
    82     static void remindAboutExperimentalBuild();
    83     /** Reminds about mouse integration.
    84       * @param  fSupportsAbsolute  Brings whether mouse supports absolute pointing. */
    85     static void remindAboutMouseIntegration(bool fSupportsAbsolute);
    86     /** Reminds about paused VM input. */
    87     static void remindAboutPausedVMInput();
    88     /** Revokes message about paused VM input. */
    89     static void forgetAboutPausedVMInput();
    90     /** Reminds about wrong color depth.
    91       * @param  uRealBPP    Brings real bit per pixel value.
    92       * @param  uWantedBPP  Brings wanted bit per pixel value. */
    93     static void remindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP);
    94     /** Revokes message about wrong color depth. */
    95     static void forgetAboutWrongColorDepth();
    96     /** Reminds about GA not affected. */
    97     static void remindAboutGuestAdditionsAreNotActive();
    98 
    99     /** Notifies about inability to acquire IVirtualBox parameter.
    100       * @param  comVBox  Brings the object paramter get acquired from. */
    101     static void cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox);
    102     /** Notifies about inability to acquire ISession parameter.
    103       * @param  comSession  Brings the object paramter get acquired from. */
    104     static void cannotAcquireSessionParameter(const CSession &comSession);
    105     /** Notifies about inability to acquire IMachine parameter.
    106       * @param  comSession  Brings the object paramter get acquired from. */
    107     static void cannotAcquireMachineParameter(const CMachine &comMachine);
    108     /** Notifies about inability to acquire ISnapshot parameter.
    109       * @param  comSnapshot  Brings the object paramter get acquired from. */
    110     static void cannotAcquireSnapshotParameter(const CSnapshot &comSnapshot);
    111 
    112     /** Notifies about inability to attach USB device.
    113       * @param  comConsole  Brings console USB device belongs to.
    114       * @param  strDevice   Brings the device name. */
    115     static void cannotAttachUSBDevice(const CConsole &comConsole, const QString &strDevice);
    116     /** Notifies about inability to attach USB device.
    117       * @param  comErrorInfo    Brings info about error happened.
    118       * @param  strDevice       Brings the device name.
    119       * @param  strMachineName  Brings the machine name. */
    120     static void cannotAttachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo,
    121                                       const QString &strDevice, const QString &strMachineName);
    122     /** Notifies about inability to detach USB device.
    123       * @param  comConsole  Brings console USB device belongs to.
    124       * @param  strDevice   Brings the device name. */
    125     static void cannotDetachUSBDevice(const CConsole &comConsole, const QString &strDevice);
    126     /** Notifies about inability to detach USB device.
    127       * @param  comErrorInfo    Brings info about error happened.
    128       * @param  strDevice       Brings the device name.
    129       * @param  strMachineName  Brings the machine name. */
    130     static void cannotDetachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo,
    131                                       const QString &strDevice, const QString &strMachineName);
    132     /** Notifies about inability to attach webcam.
    133       * @param  comDispatcher   Brings emulated USB dispatcher webcam being attached to.
    134       * @param  strWebCamName   Brings the webcam name.
    135       * @param  strMachineName  Brings the machine name. */
    136     static void cannotAttachWebCam(const CEmulatedUSB &comDispatcher,
    137                                    const QString &strWebCamName, const QString &strMachineName);
    138     /** Notifies about inability to detach webcam.
    139       * @param  comDispatcher   Brings emulated USB dispatcher webcam being detached from.
    140       * @param  strWebCamName   Brings the webcam name.
    141       * @param  strMachineName  Brings the machine name. */
    142     static void cannotDetachWebCam(const CEmulatedUSB &comDispatcher,
    143                                    const QString &strWebCamName, const QString &strMachineName);
    144     /** Notifies about inability to enumerate host USB devices.
    145       * @param  comHost  Brings the host devices enumerated for. */
    146     static void cannotEnumerateHostUSBDevices(const CHost &comHost);
    147     /** Notifies about inability to open machine.
    148       * @param  comVBox      Brings common VBox object trying to open machine.
    149       * @param  strLocation  Brings the machine location. */
    150     static void cannotOpenMachine(const CVirtualBox &comVBox, const QString &strLocation);
    151     /** Notifies about inability to open medium.
    152       * @param  comVBox      Brings common VBox object trying to open medium.
    153       * @param  strLocation  Brings the medium location. */
    154     static void cannotOpenMedium(const CVirtualBox &comVBox, const QString &strLocation);
    155     /** Notifies about inability to save machine settings.
    156       * @param  comMachine  Brings the machine trying to save settings. */
    157     static void cannotSaveMachineSettings(const CMachine &comMachine);
    158     /** Notifies about inability to toggle audio input.
    159       * @param  comAdapter      Brings the adapter input being toggled for.
    160       * @param  strMachineName  Brings the machine name.
    161       * @param  fEnable         Brings whether adapter input is enabled or not. */
    162     static void cannotToggleAudioInput(const CAudioAdapter &comAdapter,
    163                                        const QString &strMachineName, bool fEnable);
    164     /** Notifies about inability to toggle audio output.
    165       * @param  comAdapter      Brings the adapter output being toggled for.
    166       * @param  strMachineName  Brings the machine name.
    167       * @param  fEnable         Brings whether adapter output is enabled or not. */
    168     static void cannotToggleAudioOutput(const CAudioAdapter &comAdapter,
    169                                         const QString &strMachineName, bool fEnable);
    170     /** Notifies about inability to toggle network cable.
    171       * @param  comAdapter      Brings the adapter network cable being toggled for.
    172       * @param  strMachineName  Brings the machine name.
    173       * @param  fConnect        Brings whether network cable is connected or not. */
    174     static void cannotToggleNetworkCable(const CNetworkAdapter &comAdapter,
    175                                          const QString &strMachineName, bool fConnect);
    176     /** Notifies about inability to toggle recording.
    177       * @param  comMachine  Brings the machine recording being toggled for.
    178       * @param  fEnable     Brings whether recording is enabled or not. */
    179     static void cannotToggleRecording(const CMachine &comMachine, bool fEnable);
    180     /** Notifies about inability to toggle VRDE server.
    181       * @param  comServer       Brings the server being toggled.
    182       * @param  strMachineName  Brings the machine name.
    183       * @param  fEnable         Brings whether server is enabled or not. */
    184     static void cannotToggleVRDEServer(const CVRDEServer &comServer,
    185                                        const QString &strMachineName, bool fEnable);
     63    /** @name Simple general warnings.
     64      * @{ */
     65        /** Notifies about inability to find help file at certain @a strLocation. */
     66        static void cannotFindHelpFile(const QString &strLocation);
     67
     68        /** Notifies about inability to open @a strUrl. */
     69        static void cannotOpenURL(const QString &strUrl);
     70
     71        /** Reminds about BETA build. */
     72        static void remindAboutBetaBuild();
     73        /** Reminds about BETA build. */
     74        static void remindAboutExperimentalBuild();
     75        /** Notifies about invalid encryption password.
     76          * @param  strPasswordId  Brings password ID. */
     77        static void warnAboutInvalidEncryptionPassword(const QString &strPasswordId);
     78    /** @} */
     79
     80
     81    /** @name Simple Runtime UI warnings.
     82      * @{ */
     83        /** Notifies about inability to mount image.
     84          * @param  strMachineName  Brings the machine name.
     85          * @param  strMediumName   Brings the medium name. */
     86        static void cannotMountImage(const QString &strMachineName, const QString &strMediumName);
     87
     88        /** Notifies about inability to send ACPI shutdown. */
     89        static void cannotSendACPIToMachine();
     90
     91        /** Reminds about keyboard auto capturing. */
     92        static void remindAboutAutoCapture();
     93
     94        /** Reminds about GA not affected. */
     95        static void remindAboutGuestAdditionsAreNotActive();
     96
     97        /** Reminds about mouse integration.
     98          * @param  fSupportsAbsolute  Brings whether mouse supports absolute pointing. */
     99        static void remindAboutMouseIntegration(bool fSupportsAbsolute);
     100
     101        /** Reminds about paused VM input. */
     102        static void remindAboutPausedVMInput();
     103        /** Revokes message about paused VM input. */
     104        static void forgetAboutPausedVMInput();
     105
     106        /** Reminds about wrong color depth.
     107          * @param  uRealBPP    Brings real bit per pixel value.
     108          * @param  uWantedBPP  Brings wanted bit per pixel value. */
     109        static void remindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP);
     110        /** Revokes message about wrong color depth. */
     111        static void forgetAboutWrongColorDepth();
     112    /** @} */
     113
     114    /** @name COM general warnings.
     115      * @{ */
     116        /** Notifies about inability to acquire IVirtualBox parameter.
     117          * @param  comVBox  Brings the object paramter get acquired from. */
     118        static void cannotAcquireVirtualBoxParameter(const CVirtualBox &comVBox);
     119        /** Notifies about inability to acquire ISession parameter.
     120          * @param  comSession  Brings the object paramter get acquired from. */
     121        static void cannotAcquireSessionParameter(const CSession &comSession);
     122        /** Notifies about inability to acquire IMachine parameter.
     123          * @param  comSession  Brings the object paramter get acquired from. */
     124        static void cannotAcquireMachineParameter(const CMachine &comMachine);
     125        /** Notifies about inability to acquire ISnapshot parameter.
     126          * @param  comSnapshot  Brings the object paramter get acquired from. */
     127        static void cannotAcquireSnapshotParameter(const CSnapshot &comSnapshot);
     128
     129        /** Notifies about inability to enumerate host USB devices.
     130          * @param  comHost  Brings the host devices enumerated for. */
     131        static void cannotEnumerateHostUSBDevices(const CHost &comHost);
     132        /** Notifies about inability to open medium.
     133          * @param  comVBox      Brings common VBox object trying to open medium.
     134          * @param  strLocation  Brings the medium location. */
     135        static void cannotOpenMedium(const CVirtualBox &comVBox, const QString &strLocation);
     136    /** @} */
     137
     138    /** @name COM VirtualBox Manager warnings.
     139      * @{ */
     140        /** Notifies about inability to open machine.
     141          * @param  comVBox      Brings common VBox object trying to open machine.
     142          * @param  strLocation  Brings the machine location. */
     143        static void cannotOpenMachine(const CVirtualBox &comVBox, const QString &strLocation);
     144    /** @} */
     145
     146    /** @name COM Runtime UI warnings.
     147      * @{ */
     148        /** Notifies about inability to attach USB device.
     149          * @param  comConsole  Brings console USB device belongs to.
     150          * @param  strDevice   Brings the device name. */
     151        static void cannotAttachUSBDevice(const CConsole &comConsole, const QString &strDevice);
     152        /** Notifies about inability to attach USB device.
     153          * @param  comErrorInfo    Brings info about error happened.
     154          * @param  strDevice       Brings the device name.
     155          * @param  strMachineName  Brings the machine name. */
     156        static void cannotAttachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo,
     157                                          const QString &strDevice, const QString &strMachineName);
     158        /** Notifies about inability to detach USB device.
     159          * @param  comConsole  Brings console USB device belongs to.
     160          * @param  strDevice   Brings the device name. */
     161        static void cannotDetachUSBDevice(const CConsole &comConsole, const QString &strDevice);
     162        /** Notifies about inability to detach USB device.
     163          * @param  comErrorInfo    Brings info about error happened.
     164          * @param  strDevice       Brings the device name.
     165          * @param  strMachineName  Brings the machine name. */
     166        static void cannotDetachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo,
     167                                          const QString &strDevice, const QString &strMachineName);
     168
     169        /** Notifies about inability to attach webcam.
     170          * @param  comDispatcher   Brings emulated USB dispatcher webcam being attached to.
     171          * @param  strWebCamName   Brings the webcam name.
     172          * @param  strMachineName  Brings the machine name. */
     173        static void cannotAttachWebCam(const CEmulatedUSB &comDispatcher,
     174                                       const QString &strWebCamName, const QString &strMachineName);
     175        /** Notifies about inability to detach webcam.
     176          * @param  comDispatcher   Brings emulated USB dispatcher webcam being detached from.
     177          * @param  strWebCamName   Brings the webcam name.
     178          * @param  strMachineName  Brings the machine name. */
     179        static void cannotDetachWebCam(const CEmulatedUSB &comDispatcher,
     180                                       const QString &strWebCamName, const QString &strMachineName);
     181
     182        /** Notifies about inability to save machine settings.
     183          * @param  comMachine  Brings the machine trying to save settings. */
     184        static void cannotSaveMachineSettings(const CMachine &comMachine);
     185
     186        /** Notifies about inability to toggle audio input.
     187          * @param  comAdapter      Brings the adapter input being toggled for.
     188          * @param  strMachineName  Brings the machine name.
     189          * @param  fEnable         Brings whether adapter input is enabled or not. */
     190        static void cannotToggleAudioInput(const CAudioAdapter &comAdapter,
     191                                           const QString &strMachineName, bool fEnable);
     192        /** Notifies about inability to toggle audio output.
     193          * @param  comAdapter      Brings the adapter output being toggled for.
     194          * @param  strMachineName  Brings the machine name.
     195          * @param  fEnable         Brings whether adapter output is enabled or not. */
     196        static void cannotToggleAudioOutput(const CAudioAdapter &comAdapter,
     197                                            const QString &strMachineName, bool fEnable);
     198
     199        /** Notifies about inability to toggle network cable.
     200          * @param  comAdapter      Brings the adapter network cable being toggled for.
     201          * @param  strMachineName  Brings the machine name.
     202          * @param  fConnect        Brings whether network cable is connected or not. */
     203        static void cannotToggleNetworkCable(const CNetworkAdapter &comAdapter,
     204                                             const QString &strMachineName, bool fConnect);
     205
     206        /** Notifies about inability to toggle recording.
     207          * @param  comMachine  Brings the machine recording being toggled for.
     208          * @param  fEnable     Brings whether recording is enabled or not. */
     209        static void cannotToggleRecording(const CMachine &comMachine, bool fEnable);
     210
     211        /** Notifies about inability to toggle VRDE server.
     212          * @param  comServer       Brings the server being toggled.
     213          * @param  strMachineName  Brings the machine name.
     214          * @param  fEnable         Brings whether server is enabled or not. */
     215        static void cannotToggleVRDEServer(const CVRDEServer &comServer,
     216                                           const QString &strMachineName, bool fEnable);
     217    /** @} */
    186218
    187219protected:
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