6#include <QtGui/qwindow.h>
9#include <QtCore/private/qcore_mac_p.h>
15 UIAdaptivePresentationControllerDelegate>
24 if (self = [super
init]) {
27 self.presentationController.delegate = self;
28 self.supportsAlpha =
dialog->
options()->testOption(QColorDialogOptions::ShowAlphaChannel);
38 uiColor = [UIColor colorWithHue:qColor.hsvHueF()
39 saturation:qColor.hsvSaturationF()
40 brightness:qColor.valueF()
41 alpha:qColor.alphaF()];
43 uiColor = [UIColor colorWithRed:qColor.redF()
46 alpha:qColor.alphaF()];
48 self.selectedColor = uiColor;
53 UIColor *
color = self.selectedColor;
60 qWarning() <<
"Incompatible color space";
64 m_colorDialog->updateColor(newColor);
65 emit m_colorDialog->currentColorChanged(newColor);
70- (
void)colorPickerViewControllerDidSelectColor:(UIColorPickerViewController *)viewController
76- (
void)colorPickerViewControllerDidFinish:(UIColorPickerViewController *)viewController
80 emit m_colorDialog->accept();
84- (
void)presentationControllerDidDismiss:(UIPresentationController *)presentationController
87 emit m_colorDialog->reject();
111 if (!m_viewController) {
118 m_viewController.modalInPresentation = YES;
126 if (
window.rootViewController.presentedViewController)
129 [window.rootViewController presentViewController:m_viewController animated:YES completion:nil];
138 m_viewController =
nullptr;
145 if (m_viewController)
151 return m_currentColor;
156 m_currentColor =
color;
The QColor class provides colors based on RGB, HSV or CMYK values.
Spec
The type of color specified, either RGB, extended RGB, HSV, CMYK or HSL.
void setRgbF(float r, float g, float b, float a=1.0)
Sets the color channels of this color to r (red), g (green), b (blue) and a (alpha,...
bool isValid() const noexcept
Returns true if the color is valid; otherwise returns false.
int exec(ProcessEventsFlags flags=AllEvents)
Enters the main event loop and waits until exit() is called.
void exit(int returnCode=0)
Tells the event loop to exit with a return code.
Options options
the various options that affect the look and feel of the dialog
void setCurrentColor(const QColor &) override
QColor currentColor() const override
void updateColor(const QColor &)
bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override
QObject * parent() const
Returns a pointer to the parent object.
AppleApplication * qt_apple_sharedApplication()
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
GLfloat GLfloat GLfloat alpha
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
QFileDialog dialog(this)
[1]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent