LibreOffice Module desktop (master) 1
dp_gui_updateinstalldialog.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <sal/config.h>
23#include <vcl/weld.hxx>
24#include <rtl/ref.hxx>
25
26#include <string_view>
27#include <vector>
28
31 class XExtensionManager;
32}
33namespace com::sun::star::uno {
34 class XComponentContext;
35}
36
37namespace dp_gui {
38
39 struct UpdateData;
40 class UpdateCommandEnv;
41
42
47{
48public:
55 UpdateInstallDialog(weld::Window* parent, std::vector<UpdateData> & aVecUpdateData,
56 css::uno::Reference< css::uno::XComponentContext > const & xCtx);
57
58 virtual ~UpdateInstallDialog() override;
59
60 virtual short run() override;
61
62private:
65
66 class Thread;
67 friend class Thread;
68 friend class UpdateCommandEnv;
69
70 DECL_LINK(cancelHandler, weld::Button&, void);
71
72 //signals in the dialog that we have finished.
73 void updateDone();
74 //Writes a particular error into the info listbox.
76 {
80 };
81 void setError(INSTALL_ERROR err, std::u16string_view sExtension, std::u16string_view exceptionMessage);
82 void setError(std::u16string_view exceptionMessage);
83 const css::uno::Reference< css::deployment::XExtensionManager >& getExtensionManager() const
84 { return m_xExtensionManager; }
85
87 css::uno::Reference< css::deployment::XExtensionManager > m_xExtensionManager;
88 //Signals that an error occurred during download and installation
91
92 OUString m_sInstalling;
93 OUString m_sFinished;
94 OUString m_sNoErrors;
98 OUString m_sNoInstall;
100
101 std::unique_ptr<weld::Label> m_xFt_action;
102 std::unique_ptr<weld::ProgressBar> m_xStatusbar;
103 std::unique_ptr<weld::Label> m_xFt_extension_name;
104 std::unique_ptr<weld::TextView> m_xMle_info;
105 std::unique_ptr<weld::Button> m_xHelp;
106 std::unique_ptr<weld::Button> m_xOk;
107 std::unique_ptr<weld::Button> m_xCancel;
108};
109
110}
111
112/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
The modal “Download and Installation” dialog.
std::unique_ptr< weld::ProgressBar > m_xStatusbar
std::unique_ptr< weld::Label > m_xFt_extension_name
void setError(INSTALL_ERROR err, std::u16string_view sExtension, std::u16string_view exceptionMessage)
std::unique_ptr< weld::Button > m_xCancel
DECL_LINK(cancelHandler, weld::Button &, void)
UpdateInstallDialog & operator=(UpdateInstallDialog const &)=delete
std::unique_ptr< weld::Label > m_xFt_action
UpdateInstallDialog(UpdateInstallDialog const &)=delete
std::unique_ptr< weld::Button > m_xHelp
const css::uno::Reference< css::deployment::XExtensionManager > & getExtensionManager() const
std::unique_ptr< weld::TextView > m_xMle_info
std::unique_ptr< weld::Button > m_xOk
css::uno::Reference< css::deployment::XExtensionManager > m_xExtensionManager
UpdateInstallDialog(weld::Window *parent, std::vector< UpdateData > &aVecUpdateData, css::uno::Reference< css::uno::XComponentContext > const &xCtx)
Create an instance.
Definition: dp_gui.h:22