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 #ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_UPDATEINSTALLDIALOG_HXX
21 #define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_UPDATEINSTALLDIALOG_HXX
22 
23 #include <sal/config.h>
24 #include <vcl/weld.hxx>
25 #include <rtl/ref.hxx>
26 #include <vector>
27 
29 namespace com { namespace sun { namespace star { namespace deployment {
30  class XExtensionManager;
31 }}}}
32 namespace com { namespace sun { namespace star { namespace uno {
33  class XComponentContext;
34 }}}}
35 
36 namespace vcl { class Window; }
37 
38 namespace dp_gui {
39 
40  struct UpdateData;
41  class UpdateCommandEnv;
42 
43 
48 {
49 public:
56  UpdateInstallDialog(weld::Window* parent, std::vector<UpdateData> & aVecUpdateData,
57  css::uno::Reference< css::uno::XComponentContext > const & xCtx);
58 
59  virtual ~UpdateInstallDialog() override;
60 
61  virtual short run() override;
62 
63 private:
64  UpdateInstallDialog(UpdateInstallDialog const &) = delete;
66 
67  class Thread;
68  friend class Thread;
69  friend class UpdateCommandEnv;
70 
71  DECL_LINK(cancelHandler, weld::Button&, void);
72 
73  //signals in the dialog that we have finished.
74  void updateDone();
75  //Writes a particular error into the info listbox.
77  {
81  };
82  void setError(INSTALL_ERROR err, OUString const & sExtension, OUString const & exceptionMessage);
83  void setError(OUString const & exceptionMessage);
84  const css::uno::Reference< css::deployment::XExtensionManager >& getExtensionManager() const
85  { return m_xExtensionManager; }
86 
88  css::uno::Reference< css::deployment::XExtensionManager > m_xExtensionManager;
89  //Signals that an error occurred during download and installation
90  bool m_bError;
91  bool m_bNoEntry;
92 
93  OUString m_sInstalling;
94  OUString m_sFinished;
95  OUString m_sNoErrors;
96  OUString m_sErrorDownload;
99  OUString m_sNoInstall;
101 
102  std::unique_ptr<weld::Label> m_xFt_action;
103  std::unique_ptr<weld::ProgressBar> m_xStatusbar;
104  std::unique_ptr<weld::Label> m_xFt_extension_name;
105  std::unique_ptr<weld::TextView> m_xMle_info;
106  std::unique_ptr<weld::Button> m_xHelp;
107  std::unique_ptr<weld::Button> m_xOk;
108  std::unique_ptr<weld::Button> m_xCancel;
109 };
110 
111 }
112 
113 #endif
114 
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void setError(INSTALL_ERROR err, OUString const &sExtension, OUString const &exceptionMessage)
The modal “Download and Installation” dialog.
std::unique_ptr< weld::Button > m_xCancel
std::unique_ptr< weld::Button > m_xHelp
UpdateInstallDialog & operator=(UpdateInstallDialog const &)=delete
std::unique_ptr< weld::Label > m_xFt_extension_name
DECL_LINK(cancelHandler, weld::Button &, void)
std::unique_ptr< weld::TextView > m_xMle_info
const css::uno::Reference< css::deployment::XExtensionManager > & getExtensionManager() const
std::unique_ptr< weld::Label > m_xFt_action
std::unique_ptr< weld::ProgressBar > m_xStatusbar
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:50