6#include <AppKit/NSWorkspace.h>
7#include <AppKit/NSColorSampler.h>
8#include <Foundation/NSURL.h>
11#include <QtCore/qscopedvaluerollback.h>
13#include <QtGui/qdesktopservices.h>
14#include <QtGui/private/qcoregraphics_p.h>
21 if (
url == m_handlingUrl)
24 return [[NSWorkspace sharedWorkspace] openURL:
url.toNSURL()];
35 QScopedValueRollback<QUrl> rollback(m_handlingUrl,
url);
50 [m_colorSampler showSamplerWithSelectionHandler:^(NSColor *selectedColor) {
55 NSColorSampler *m_colorSampler =
nullptr;
69 default:
return false;
void pickColor() override
bool handleUrl(const QUrl &url)
bool hasCapability(Capability capability) const override
QPlatformServiceColorPicker * colorPicker(QWindow *parent) override
bool openUrl(const QUrl &url) override
bool openDocument(const QUrl &url) override
static bool openUrl(const QUrl &url)
Opens the given url in the appropriate Web browser for the user's desktop environment,...
Combined button and popup list for selecting options.
QColor qt_mac_toQColor(CGColorRef color)
QUrl url("example.com")
[constructor-url-reference]