VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h@ 102493

Last change on this file since 102493 was 100389, checked in by vboxsync, 15 months ago

FE/Qt: bugref:9080. A first attempt for loading file entries from a Viso file.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 26.5 KB
Line 
1/* $Id: UIMessageCenter.h 100389 2023-07-05 13:26:22Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMessageCenter class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef FEQT_INCLUDED_SRC_globals_UIMessageCenter_h
29#define FEQT_INCLUDED_SRC_globals_UIMessageCenter_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34/* Qt includes: */
35#include <QObject>
36
37/* GUI includes: */
38#include "UILibraryDefs.h"
39#include "UIMediumDefs.h"
40
41/* COM includes: */
42#include "COMEnums.h"
43#include "CProgress.h"
44
45/* Forward declarations: */
46class UIMedium;
47struct StorageSlot;
48#ifdef VBOX_WITH_DRAG_AND_DROP
49class CGuest;
50#endif
51
52
53/** Possible message types. */
54enum MessageType
55{
56 MessageType_Info = 1,
57 MessageType_Question,
58 MessageType_Warning,
59 MessageType_Error,
60 MessageType_Critical,
61 MessageType_GuruMeditation
62};
63Q_DECLARE_METATYPE(MessageType);
64
65
66/** Singleton QObject extension
67 * providing GUI with corresponding messages. */
68class SHARED_LIBRARY_STUFF UIMessageCenter : public QObject
69{
70 Q_OBJECT;
71
72signals:
73
74 /** Asks to show message-box.
75 * @param pParent Brings the message-box parent.
76 * @param enmType Brings the message-box type.
77 * @param strMessage Brings the message.
78 * @param strDetails Brings the details.
79 * @param iButton1 Brings the button 1 type.
80 * @param iButton2 Brings the button 2 type.
81 * @param iButton3 Brings the button 3 type.
82 * @param strButtonText1 Brings the button 1 text.
83 * @param strButtonText2 Brings the button 2 text.
84 * @param strButtonText3 Brings the button 3 text.
85 * @param strAutoConfirmId Brings whether this message can be auto-confirmed. */
86 void sigToShowMessageBox(QWidget *pParent, MessageType enmType,
87 const QString &strMessage, const QString &strDetails,
88 int iButton1, int iButton2, int iButton3,
89 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3,
90 const QString &strAutoConfirmId, const QString &strHelpKeyword) const;
91
92public:
93
94 /** Creates message-center singleton. */
95 static void create();
96 /** Destroys message-center singleton. */
97 static void destroy();
98
99 /** Defines whether warning with particular @a strWarningName is @a fShown. */
100 void setWarningShown(const QString &strWarningName, bool fShown) const;
101 /** Returns whether warning with particular @a strWarningName is shown. */
102 bool warningShown(const QString &strWarningName) const;
103
104 /** Shows a general type of 'Message'.
105 * @param pParent Brings the message-box parent.
106 * @param enmType Brings the message-box type.
107 * @param strMessage Brings the message.
108 * @param strDetails Brings the details.
109 * @param pcszAutoConfirmId Brings the auto-confirm ID.
110 * @param iButton1 Brings the button 1 type.
111 * @param iButton2 Brings the button 2 type.
112 * @param iButton3 Brings the button 3 type.
113 * @param strButtonText1 Brings the button 1 text.
114 * @param strButtonText2 Brings the button 2 text.
115 * @param strButtonText3 Brings the button 3 text.
116 * @param strHelpKeyword Brings the help keyword string. */
117 int message(QWidget *pParent, MessageType enmType,
118 const QString &strMessage, const QString &strDetails,
119 const char *pcszAutoConfirmId = 0,
120 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0,
121 const QString &strButtonText1 = QString(),
122 const QString &strButtonText2 = QString(),
123 const QString &strButtonText3 = QString(),
124 const QString &strHelpKeyword = QString()) const;
125
126 /** Shows an 'Error' type of 'Message'.
127 * Provides single Ok button.
128 * @param pParent Brings the message-box parent.
129 * @param enmType Brings the message-box type.
130 * @param strMessage Brings the message.
131 * @param strDetails Brings the details.
132 * @param pcszAutoConfirmId Brings the auto-confirm ID.
133 * @param strHelpKeyword Brings the help keyword string. */
134 void error(QWidget *pParent, MessageType enmType,
135 const QString &strMessage,
136 const QString &strDetails,
137 const char *pcszAutoConfirmId = 0,
138 const QString &strHelpKeyword = QString()) const;
139
140 /** Shows an 'Error with Question' type of 'Message'.
141 * Provides Ok and Cancel buttons (called same way by default).
142 * @param pParent Brings the message-box parent.
143 * @param enmType Brings the message-box type.
144 * @param strMessage Brings the message.
145 * @param strDetails Brings the details.
146 * @param pcszAutoConfirmId Brings the auto-confirm ID.
147 * @param strOkButtonText Brings the Ok button text.
148 * @param strCancelButtonText Brings the Cancel button text.
149 * @param strHelpKeyword Brings the help keyword string. */
150 bool errorWithQuestion(QWidget *pParent, MessageType enmType,
151 const QString &strMessage,
152 const QString &strDetails,
153 const char *pcszAutoConfirmId = 0,
154 const QString &strOkButtonText = QString(),
155 const QString &strCancelButtonText = QString(),
156 const QString &strHelpKeyword = QString()) const;
157
158 /** Shows an 'Alert' type of 'Error'.
159 * Omit details.
160 * @param pParent Brings the message-box parent.
161 * @param enmType Brings the message-box type.
162 * @param strMessage Brings the message.
163 * @param pcszAutoConfirmId Brings the auto-confirm ID.
164 * @param strHelpKeyword Brings the help keyword string. */
165 void alert(QWidget *pParent, MessageType enmType,
166 const QString &strMessage,
167 const char *pcszAutoConfirmId = 0,
168 const QString &strHelpKeyword = QString()) const;
169
170 /** Shows a 'Question' type of 'Message'.
171 * Omit details.
172 * @param pParent Brings the message-box parent.
173 * @param enmType Brings the message-box type.
174 * @param strMessage Brings the message.
175 * @param pcszAutoConfirmId Brings the auto-confirm ID.
176 * @param iButton1 Brings the button 1 type.
177 * @param iButton2 Brings the button 2 type.
178 * @param iButton3 Brings the button 3 type.
179 * @param strButtonText1 Brings the button 1 text.
180 * @param strButtonText2 Brings the button 2 text.
181 * @param strButtonText3 Brings the button 3 text. */
182 int question(QWidget *pParent, MessageType enmType,
183 const QString &strMessage,
184 const char *pcszAutoConfirmId = 0,
185 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0,
186 const QString &strButtonText1 = QString(),
187 const QString &strButtonText2 = QString(),
188 const QString &strButtonText3 = QString()) const;
189
190 /** Shows a 'Binary' type of 'Question'.
191 * Omit details. Provides Ok and Cancel buttons (called same way by default).
192 * @param pParent Brings the message-box parent.
193 * @param enmType Brings the message-box type.
194 * @param strMessage Brings the message.
195 * @param pcszAutoConfirmId Brings the auto-confirm ID.
196 * @param strOkButtonText Brings the button 1 text.
197 * @param strCancelButtonText Brings the button 2 text.
198 * @param fDefaultFocusForOk Brings whether Ok button should be focused initially. */
199 bool questionBinary(QWidget *pParent, MessageType enmType,
200 const QString &strMessage,
201 const char *pcszAutoConfirmId = 0,
202 const QString &strOkButtonText = QString(),
203 const QString &strCancelButtonText = QString(),
204 bool fDefaultFocusForOk = true) const;
205
206 /** Shows a 'Trinary' type of 'Question'.
207 * Omit details. Provides Yes, No and Cancel buttons (called same way by default).
208 * @param pParent Brings the message-box parent.
209 * @param enmType Brings the message-box type.
210 * @param strMessage Brings the message.
211 * @param pcszAutoConfirmId Brings the auto-confirm ID.
212 * @param strChoice1ButtonText Brings the button 1 text.
213 * @param strChoice2ButtonText Brings the button 2 text.
214 * @param strCancelButtonText Brings the button 3 text. */
215 int questionTrinary(QWidget *pParent, MessageType enmType,
216 const QString &strMessage,
217 const char *pcszAutoConfirmId = 0,
218 const QString &strChoice1ButtonText = QString(),
219 const QString &strChoice2ButtonText = QString(),
220 const QString &strCancelButtonText = QString()) const;
221
222 /** Shows a general type of 'Message with Option'.
223 * @param pParent Brings the message-box parent.
224 * @param enmType Brings the message-box type.
225 * @param strMessage Brings the message.
226 * @param strOptionText Brings the option text.
227 * @param fDefaultOptionValue Brings the default option value.
228 * @param iButton1 Brings the button 1 type.
229 * @param iButton2 Brings the button 2 type.
230 * @param iButton3 Brings the button 3 type.
231 * @param strButtonText1 Brings the button 1 text.
232 * @param strButtonText2 Brings the button 2 text.
233 * @param strButtonText3 Brings the button 3 text. */
234 int messageWithOption(QWidget *pParent, MessageType enmType,
235 const QString &strMessage,
236 const QString &strOptionText,
237 bool fDefaultOptionValue = true,
238 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0,
239 const QString &strButtonText1 = QString(),
240 const QString &strButtonText2 = QString(),
241 const QString &strButtonText3 = QString()) const;
242
243 /** Shows modal progress-dialog.
244 * @param comProgress Brings the progress this dialog is based on.
245 * @param strTitle Brings the title.
246 * @param strImage Brings the image.
247 * @param pParent Brings the parent.
248 * @param cMinDuration Brings the minimum diration to show this dialog after expiring it. */
249 bool showModalProgressDialog(CProgress &comProgress, const QString &strTitle,
250 const QString &strImage = "", QWidget *pParent = 0,
251 int cMinDuration = 2000);
252
253 /** @name Startup warnings.
254 * @{ */
255 void cannotFindLanguage(const QString &strLangId, const QString &strNlsPath) const;
256 void cannotLoadLanguage(const QString &strLangFile) const;
257
258 void cannotInitUserHome(const QString &strUserHome) const;
259 void cannotInitCOM(HRESULT rc) const;
260
261 void cannotHandleRuntimeOption(const QString &strOption) const;
262
263#ifdef RT_OS_LINUX
264 void warnAboutWrongUSBMounted() const;
265#endif
266
267 void cannotStartSelector() const;
268 void cannotStartRuntime() const;
269 /** @} */
270
271 /** @name General COM warnings.
272 * @{ */
273 void cannotCreateVirtualBoxClient(const CVirtualBoxClient &comClient) const;
274 void cannotAcquireVirtualBox(const CVirtualBoxClient &comClient) const;
275
276 void cannotFindMachineByName(const CVirtualBox &comVBox, const QString &strName) const;
277 void cannotFindMachineById(const CVirtualBox &comVBox, const QUuid &uId) const;
278 void cannotSetExtraData(const CVirtualBox &comVBox, const QString &strKey, const QString &strValue);
279 void cannotOpenMedium(const CVirtualBox &comVBox, const QString &strLocation, QWidget *pParent = 0) const;
280
281 void cannotOpenSession(const CSession &comSession) const;
282 void cannotOpenSession(const CMachine &comMachine) const;
283 void cannotOpenSession(const CProgress &comProgress, const QString &strMachineName) const;
284
285 void cannotSetExtraData(const CMachine &machine, const QString &strKey, const QString &strValue);
286
287 void cannotAttachDevice(const CMachine &machine, UIMediumDeviceType type, const QString &strLocation,
288 const StorageSlot &storageSlot, QWidget *pParent = 0);
289 void cannotDetachDevice(const CMachine &machine, UIMediumDeviceType type, const QString &strLocation,
290 const StorageSlot &storageSlot, QWidget *pParent = 0) const;
291 bool cannotRemountMedium(const CMachine &machine, const UIMedium &medium,
292 bool fMount, bool fRetry, QWidget *pParent = 0) const;
293
294 void cannotSetHostSettings(const CHost &comHost, QWidget *pParent = 0) const;
295 void cannotSetSystemProperties(const CSystemProperties &properties, QWidget *pParent = 0) const;
296 void cannotSaveMachineSettings(const CMachine &machine, QWidget *pParent = 0) const;
297
298 void cannotAddDiskEncryptionPassword(const CConsole &console);
299 /** @} */
300
301 /** @name Common warnings.
302 * @{ */
303 bool confirmResetMachine(const QString &strNames) const;
304
305 void cannotSaveSettings(const QString strDetails, QWidget *pParent = 0) const;
306 void warnAboutUnaccessibleUSB(const COMBaseWithEI &object, QWidget *pParent = 0) const;
307 void warnAboutStateChange(QWidget *pParent = 0) const;
308 bool confirmSettingsDiscarding(QWidget *pParent = 0) const;
309 bool confirmSettingsReloading(QWidget *pParent = 0) const;
310 int confirmRemovingOfLastDVDDevice(QWidget *pParent = 0) const;
311 bool confirmStorageBusChangeWithOpticalRemoval(QWidget *pParent = 0) const;
312 bool confirmStorageBusChangeWithExcessiveRemoval(QWidget *pParent = 0) const;
313 bool warnAboutIncorrectPort(QWidget *pParent = 0) const;
314 bool warnAboutIncorrectAddress(QWidget *pParent = 0) const;
315 bool warnAboutEmptyGuestAddress(QWidget *pParent = 0) const;
316 bool warnAboutNameShouldBeUnique(QWidget *pParent = 0) const;
317 bool warnAboutRulesConflict(QWidget *pParent = 0) const;
318 bool confirmCancelingPortForwardingDialog(QWidget *pParent = 0) const;
319 bool confirmRestoringDefaultKeys(QWidget *pParent = 0) const;
320 /** @} */
321
322 /** @name VirtualBox Manager warnings.
323 * @{ */
324 bool warnAboutInaccessibleMedia() const;
325
326 bool confirmDiscardSavedState(const QString &strNames) const;
327 bool confirmTerminateCloudInstance(const QString &strNames) const;
328 bool confirmACPIShutdownMachine(const QString &strNames) const;
329 bool confirmPowerOffMachine(const QString &strNames) const;
330 bool confirmStartMultipleMachines(const QString &strNames) const;
331 /** @} */
332
333 /** @name VirtualBox Manager / Chooser Pane warnings.
334 * @{ */
335 bool confirmAutomaticCollisionResolve(const QString &strName, const QString &strGroupName) const;
336 /// @todo move after fixing thread stuff
337 void cannotSetGroups(const CMachine &machine) const;
338 bool confirmMachineItemRemoval(const QStringList &names) const;
339 int confirmMachineRemoval(const QList<CMachine> &machines) const;
340 int confirmCloudMachineRemoval(const QList<CCloudMachine> &machines) const;
341 /** @} */
342
343 /** @name VirtualBox Manager / Snapshot Pane warnings.
344 * @{ */
345 int confirmSnapshotRestoring(const QString &strSnapshotName, bool fAlsoCreateNewSnapshot) const;
346 bool confirmSnapshotRemoval(const QString &strSnapshotName) const;
347 bool warnAboutSnapshotRemovalFreeSpace(const QString &strSnapshotName, const QString &strTargetImageName,
348 const QString &strTargetImageMaxSize, const QString &strTargetFileSystemFree) const;
349 /** @} */
350
351 /** @name VirtualBox Manager / Extension Manager warnings.
352 * @{ */
353 bool confirmInstallExtensionPack(const QString &strPackName, const QString &strPackVersion,
354 const QString &strPackDescription, QWidget *pParent = 0) const;
355 bool confirmReplaceExtensionPack(const QString &strPackName, const QString &strPackVersionNew,
356 const QString &strPackVersionOld, const QString &strPackDescription,
357 QWidget *pParent = 0) const;
358 bool confirmRemoveExtensionPack(const QString &strPackName, QWidget *pParent = 0) const;
359 /** @} */
360
361 /** @name VirtualBox Manager / Media Manager warnings.
362 * @{ */
363 bool confirmMediumRelease(const UIMedium &medium, bool fInduced, QWidget *pParent = 0) const;
364 bool confirmMediumRemoval(const UIMedium &medium, QWidget *pParent = 0) const;
365 int confirmDeleteHardDiskStorage(const QString &strLocation, QWidget *pParent = 0) const;
366 bool confirmInaccesibleMediaClear(const QStringList &mediaNameList, UIMediumDeviceType enmType, QWidget *pParent = 0);
367 bool confirmVisoDiscard(QWidget *pParent = 0) const;
368 /** @} */
369
370 /** @name VirtualBox Manager / Network Manager warnings.
371 * @{ */
372 bool confirmCloudNetworkRemoval(const QString &strName, QWidget *pParent = 0) const;
373 bool confirmHostNetworkInterfaceRemoval(const QString &strName, QWidget *pParent = 0) const;
374 bool confirmHostOnlyNetworkRemoval(const QString &strName, QWidget *pParent = 0) const;
375 bool confirmNATNetworkRemoval(const QString &strName, QWidget *pParent = 0) const;
376 /** @} */
377
378 /** @name VirtualBox Manager / Cloud Profile Manager warnings.
379 * @{ */
380 bool confirmCloudProfileRemoval(const QString &strName, QWidget *pParent = 0) const;
381 bool confirmCloudProfilesImport(QWidget *pParent = 0) const;
382 int confirmCloudProfileManagerClosing(QWidget *pParent = 0) const;
383 /** @} */
384
385 /** @name VirtualBox Manager / Cloud Console Manager warnings.
386 * @{ */
387 bool confirmCloudConsoleApplicationRemoval(const QString &strName, QWidget *pParent = 0) const;
388 bool confirmCloudConsoleProfileRemoval(const QString &strName, QWidget *pParent = 0) const;
389 /** @} */
390
391 /** @name VirtualBox Manager / Downloading warnings.
392 * @{ */
393#ifdef VBOX_GUI_WITH_NETWORK_MANAGER
394 bool confirmLookingForGuestAdditions() const;
395 bool confirmDownloadGuestAdditions(const QString &strUrl, qulonglong uSize) const;
396 void cannotSaveGuestAdditions(const QString &strURL, const QString &strTarget) const;
397 bool proposeMountGuestAdditions(const QString &strUrl, const QString &strSrc) const;
398
399 bool confirmLookingForUserManual(const QString &strMissedLocation) const;
400 bool confirmDownloadUserManual(const QString &strURL, qulonglong uSize) const;
401 void cannotSaveUserManual(const QString &strURL, const QString &strTarget) const;
402
403 bool confirmLookingForExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion) const;
404 bool confirmDownloadExtensionPack(const QString &strExtPackName, const QString &strURL, qulonglong uSize) const;
405 void cannotSaveExtensionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const;
406 bool proposeInstallExtentionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const;
407 bool proposeDeleteExtentionPack(const QString &strTo) const;
408 bool proposeDeleteOldExtentionPacks(const QStringList &strFiles) const;
409#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
410 /** @} */
411
412 /** @name Runtime UI warnings.
413 * @{ */
414 bool cannotRestoreSnapshot(const CMachine &machine, const QString &strSnapshotName, const QString &strMachineName) const;
415 bool cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const;
416 void cannotStartMachine(const CConsole &console, const QString &strName) const;
417 void cannotStartMachine(const CProgress &progress, const QString &strName) const;
418
419 bool warnAboutNetworkInterfaceNotFound(const QString &strMachineName, const QString &strIfNames) const;
420
421 void warnAboutVBoxSVCUnavailable() const;
422 bool warnAboutGuruMeditation(const QString &strLogFolder);
423 void showRuntimeError(MessageType emnMessageType, const QString &strErrorId, const QString &strErrorMsg) const;
424
425 bool confirmInputCapture(bool &fAutoConfirmed) const;
426 bool confirmGoingFullscreen(const QString &strHotKey) const;
427 bool confirmGoingSeamless(const QString &strHotKey) const;
428 bool confirmGoingScale(const QString &strHotKey) const;
429
430 bool cannotEnterFullscreenMode(ULONG uWidth, ULONG uHeight, ULONG uBpp, ULONG64 uMinVRAM) const;
431 void cannotEnterSeamlessMode(ULONG uWidth, ULONG uHeight, ULONG uBpp, ULONG64 uMinVRAM) const;
432 bool cannotSwitchScreenInFullscreen(quint64 uMinVRAM) const;
433 void cannotSwitchScreenInSeamless(quint64 uMinVRAM) const;
434
435#ifdef VBOX_WITH_DRAG_AND_DROP
436 /// @todo move to notification-center as progress notification .. one day :)
437 void cannotDropDataToGuest(const CDnDTarget &dndTarget, QWidget *pParent = 0) const;
438 void cannotDropDataToGuest(const CProgress &progress, QWidget *pParent = 0) const;
439 void cannotDropDataToHost(const CDnDSource &dndSource, QWidget *pParent = 0) const;
440 void cannotDropDataToHost(const CProgress &progress, QWidget *pParent = 0) const;
441#endif /* VBOX_WITH_DRAG_AND_DROP */
442 /** @} */
443
444 /** @name VirtualBox Manager / Wizard warnings.
445 * @{ */
446 /// @todo move to notification-center after wizards get theirs.. :)
447 bool confirmHardDisklessMachine(QWidget *pParent = 0) const;
448 bool confirmExportMachinesInSaveState(const QStringList &machineNames, QWidget *pParent = 0) const;
449 bool confirmOverridingFile(const QString &strPath, QWidget *pParent = 0) const;
450 bool confirmOverridingFiles(const QVector<QString> &strPaths, QWidget *pParent = 0) const;
451 /** @} */
452
453 /** @name VirtualBox Manager / FD Creation Dialog warnings.
454 * @{ */
455 void cannotCreateMediumStorage(const CVirtualBox &comVBox, const QString &strLocation, QWidget *pParent = 0) const;
456 /** @} */
457
458public slots:
459
460 /* Handlers: Help menu stuff: */
461 void sltShowHelpWebDialog();
462 void sltShowBugTracker();
463 void sltShowForums();
464 void sltShowOracle();
465 void sltShowOnlineDocumentation();
466 void sltShowHelpAboutDialog();
467 void sltResetSuppressedMessages();
468
469private slots:
470
471 /** Shows message-box.
472 * @param pParent Brings the message-box parent.
473 * @param enmType Brings the message-box type.
474 * @param strMessage Brings the message.
475 * @param strDetails Brings the details.
476 * @param iButton1 Brings the button 1 type.
477 * @param iButton2 Brings the button 2 type.
478 * @param iButton3 Brings the button 3 type.
479 * @param strButtonText1 Brings the button 1 text.
480 * @param strButtonText2 Brings the button 2 text.
481 * @param strButtonText3 Brings the button 3 text.
482 * @param strAutoConfirmId Brings whether this message can be auto-confirmed.
483 * @param strHelpKeyword Brings the help keyword string. */
484 void sltShowMessageBox(QWidget *pParent, MessageType enmType,
485 const QString &strMessage, const QString &strDetails,
486 int iButton1, int iButton2, int iButton3,
487 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3,
488 const QString &strAutoConfirmId, const QString &strHelpKeyword) const;
489
490private:
491
492 /** Constructs message-center. */
493 UIMessageCenter();
494 /** Destructs message-center. */
495 ~UIMessageCenter();
496
497 /** Prepares all. */
498 void prepare();
499 /** Cleanups all. */
500 void cleanup();
501
502 /** Shows message-box.
503 * @param pParent Brings the message-box parent.
504 * @param enmType Brings the message-box type.
505 * @param strMessage Brings the message.
506 * @param strDetails Brings the details.
507 * @param iButton1 Brings the button 1 type.
508 * @param iButton2 Brings the button 2 type.
509 * @param iButton3 Brings the button 3 type.
510 * @param strButtonText1 Brings the button 1 text.
511 * @param strButtonText2 Brings the button 2 text.
512 * @param strButtonText3 Brings the button 3 text.
513 * @param strAutoConfirmId Brings whether this message can be auto-confirmed.
514 * @param strHelpKeyword Brings the help keyowrd. */
515 int showMessageBox(QWidget *pParent, MessageType type,
516 const QString &strMessage, const QString &strDetails,
517 int iButton1, int iButton2, int iButton3,
518 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3,
519 const QString &strAutoConfirmId, const QString &strHelpKeyword) const;
520
521 /** Holds the list of shown warnings. */
522 mutable QStringList m_warnings;
523
524 /** Holds the singleton message-center instance. */
525 static UIMessageCenter *s_pInstance;
526 /** Returns the singleton message-center instance. */
527 static UIMessageCenter *instance();
528 /** Allows for shortcut access. */
529 friend UIMessageCenter &msgCenter();
530};
531
532/** Singleton Message Center 'official' name. */
533inline UIMessageCenter &msgCenter() { return *UIMessageCenter::instance(); }
534
535
536#endif /* !FEQT_INCLUDED_SRC_globals_UIMessageCenter_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette