nss: upgrade to release 3.73
[LibreOffice.git] / vcl / unx / kf5 / KF5FilePicker.hxx
blob4cf84c7fecbd56b47206f1713a93eaee5cf507bf
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <Qt5FilePicker.hxx>
23 #include <memory>
25 class QGridLayout;
27 class KF5FilePicker final : public Qt5FilePicker
29 Q_OBJECT
31 private:
32 //layout for extra custom controls
33 std::unique_ptr<QGridLayout> _layout;
35 public:
36 explicit KF5FilePicker(css::uno::Reference<css::uno::XComponentContext> const& context,
37 QFileDialog::FileMode);
39 // XFilePickerControlAccess functions
40 virtual void SAL_CALL setValue(sal_Int16 nControlId, sal_Int16 nControlAction,
41 const css::uno::Any& rValue) override;
42 virtual css::uno::Any SAL_CALL getValue(sal_Int16 nControlId,
43 sal_Int16 nControlAction) override;
44 virtual void SAL_CALL enableControl(sal_Int16 nControlId, sal_Bool bEnable) override;
45 virtual void SAL_CALL setLabel(sal_Int16 nControlId, const OUString& rLabel) override;
46 virtual OUString SAL_CALL getLabel(sal_Int16 nControlId) override;
48 // XServiceInfo
49 virtual OUString SAL_CALL getImplementationName() override;
50 virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override;
51 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
53 private:
54 //add a custom control widget to the file dialog
55 void addCustomControl(sal_Int16 controlId) override;
56 bool eventFilter(QObject* watched, QEvent* event) override;
58 private Q_SLOTS:
59 // the KF5 file picker has its own automatic extension handling
60 void updateAutomaticFileExtension() override {}
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */