summaryrefslogtreecommitdiff
path: root/vcl/unx/kde5/KDE5SalGraphics.hxx
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2017-08-28 18:29:20 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-10-25 03:23:12 +0200
commitdd7a3147f160813022d1c2724bbdf7fc46ffcc59 (patch)
tree73398c2d5aadd6366c131d27fa824e61cb215246 /vcl/unx/kde5/KDE5SalGraphics.hxx
parent07cd70c86c8919107ef02dc12ea23ae8d72d5a1a (diff)
kde5: copy basic kde4 blocks -> kde5 and build againt qt5/kf5 libs
Change-Id: I70f0c4147721a20459e1183ff40cf0ac8adf49e6
Diffstat (limited to 'vcl/unx/kde5/KDE5SalGraphics.hxx')
-rw-r--r--vcl/unx/kde5/KDE5SalGraphics.hxx53
1 files changed, 53 insertions, 0 deletions
diff --git a/vcl/unx/kde5/KDE5SalGraphics.hxx b/vcl/unx/kde5/KDE5SalGraphics.hxx
new file mode 100644
index 000000000000..eb513388f369
--- /dev/null
+++ b/vcl/unx/kde5/KDE5SalGraphics.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include <memory>
+
+#include <rtl/string.hxx>
+#include <unx/saldisp.hxx>
+#include <unx/salgdi.h>
+
+#include <QtGui/QImage>
+
+/**
+ * Handles native graphics requests and performs the needed drawing operations.
+ */
+class KDESalGraphics : public X11SalGraphics
+{
+public:
+ virtual bool IsNativeControlSupported( ControlType, ControlPart ) override;
+
+ virtual bool hitTestNativeControl( ControlType, ControlPart,
+ const tools::Rectangle&, const Point&, bool& ) override;
+
+ virtual bool drawNativeControl( ControlType, ControlPart, const tools::Rectangle&,
+ ControlState, const ImplControlValue&, const OUString& ) override;
+
+ virtual bool getNativeControlRegion( ControlType, ControlPart, const tools::Rectangle&,
+ ControlState, const ImplControlValue&,
+ const OUString&, tools::Rectangle&, tools::Rectangle& ) override;
+
+private:
+ std::unique_ptr<QImage> m_image;
+ QRect lastPopupRect;
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */