summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp')
-rw-r--r--Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
index 031c32d9e..c37099654 100644
--- a/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebColorPickerQt.cpp
@@ -22,6 +22,7 @@
#include "config.h"
#include "WebColorPickerQt.h"
+#include "ColorChooserContextObject.h"
#include "qquickwebview_p.h"
#include "qquickwebview_p_p.h"
#include <QtQml/QQmlContext>
@@ -31,33 +32,6 @@ using namespace WebCore;
namespace WebKit {
-class ColorChooserContextObject : public QObject {
- Q_OBJECT
- Q_PROPERTY(QColor currentColor READ currentColor CONSTANT FINAL)
- Q_PROPERTY(QRectF elementRect READ elementRect CONSTANT FINAL)
-
-public:
- ColorChooserContextObject(const QColor& color, const QRectF& rect)
- : m_currentColor(color)
- , m_rect(rect)
- {
- }
-
- QColor currentColor() const { return m_currentColor; }
- QRectF elementRect() const { return m_rect; }
-
- Q_INVOKABLE void accept(const QColor& color) { emit accepted(color); }
- Q_INVOKABLE void reject() { emit rejected(); }
-
-Q_SIGNALS:
- void accepted(const QColor&);
- void rejected();
-
-private:
- QColor m_currentColor;
- QRectF m_rect;
-};
-
WebColorPickerQt::WebColorPickerQt(WebColorPicker::Client* client, QQuickWebView* webView, const Color& initialColor, const IntRect& elementRect)
: WebColorPicker(client)
, m_webView(webView)
@@ -149,5 +123,4 @@ void WebColorPickerQt::endPicker()
} // namespace WebKit
-#include "WebColorPickerQt.moc"
#include "moc_WebColorPickerQt.cpp"