All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.widgets.QMessageBox Maven / Gradle / Ivy

There is a newer version: 6.8.0
Show newest version
package io.qt.widgets;

import io.qt.*;


/**
 * 

Modal dialog for informing the user or for asking the user a question and receiving an answer

*

Java wrapper for Qt class QMessageBox

*/ public class QMessageBox extends io.qt.widgets.QDialog { /** * This variable stores the meta-object for the class. */ public static final io.qt.core.@NonNull QMetaObject staticMetaObject = io.qt.core.QMetaObject.forType(QMessageBox.class); /** *

Java wrapper for Qt enum QMessageBox::ButtonRole

*/ public enum ButtonRole implements QtEnumerator { /** *

Representing QMessageBox::InvalidRole

*/ InvalidRole(-1), /** *

Representing QMessageBox::AcceptRole

*/ AcceptRole(0), /** *

Representing QMessageBox::RejectRole

*/ RejectRole(1), /** *

Representing QMessageBox::DestructiveRole

*/ DestructiveRole(2), /** *

Representing QMessageBox::ActionRole

*/ ActionRole(3), /** *

Representing QMessageBox::HelpRole

*/ HelpRole(4), /** *

Representing QMessageBox::YesRole

*/ YesRole(5), /** *

Representing QMessageBox::NoRole

*/ NoRole(6), /** *

Representing QMessageBox::ResetRole

*/ ResetRole(7), /** *

Representing QMessageBox::ApplyRole

*/ ApplyRole(8), /** *

Representing QMessageBox::NRoles

*/ NRoles(9); static { QtJambi_LibraryUtilities.initialize(); } private ButtonRole(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull ButtonRole resolve(int value) { switch (value) { case -1: return InvalidRole; case 0: return AcceptRole; case 1: return RejectRole; case 2: return DestructiveRole; case 3: return ActionRole; case 4: return HelpRole; case 5: return YesRole; case 6: return NoRole; case 7: return ResetRole; case 8: return ApplyRole; case 9: return NRoles; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QMessageBox::Icon

*/ public enum Icon implements QtEnumerator { /** *

Representing QMessageBox::NoIcon

*/ NoIcon(0), /** *

Representing QMessageBox::Information

*/ Information(1), /** *

Representing QMessageBox::Warning

*/ Warning(2), /** *

Representing QMessageBox::Critical

*/ Critical(3), /** *

Representing QMessageBox::Question

*/ Question(4); static { QtJambi_LibraryUtilities.initialize(); } private Icon(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull Icon resolve(int value) { switch (value) { case 0: return NoIcon; case 1: return Information; case 2: return Warning; case 3: return Critical; case 4: return Question; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** *

Java wrapper for Qt enum QMessageBox::Option

* * @see Options */ public enum Option implements QtFlagEnumerator { /** *

Representing QMessageBox::Option::DontUseNativeDialog

*/ DontUseNativeDialog(1); static { QtJambi_LibraryUtilities.initialize(); } private Option(int value) { this.value = value; } /** * {@inheritDoc} */ public int value() { return value; } /** * Create a QFlags of the enum entry. * @return QFlags */ public @NonNull Options asFlags() { return new Options(value); } /** * Combines this entry with other enum entry. * @param e enum entry * @return new flag */ public @NonNull Options combined(@NonNull Option e) { return asFlags().setFlag(e, true); } /** * Excludes other enum entry from a flag of this entry. * @param e enum entry * @return new flag */ public @NonNull Options cleared(@NonNull Option e) { return asFlags().setFlag(e, false); } /** * Creates a new {@link Options} from the entries. * @param values entries * @return new flag */ public static @NonNull Options flags(@Nullable Option @NonNull... values) { return new Options(values); } /** * Returns the corresponding enum entry for the given value. * @param value * @return enum entry */ public static @NonNull Option resolve(int value) { switch (value) { case 1: return DontUseNativeDialog; default: throw new QNoSuchEnumValueException(value); } } private final int value; } /** * {@link QFlags} type for enum {@link Option} */ public static final class Options extends QFlags




© 2015 - 2024 Weber Informatics LLC | Privacy Policy