LibreOffice Module vcl (master)  1
aboutdialog.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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 
10 #ifndef INCLUDED_VCL_ABOUT_DIALOG_HXX
11 #define INCLUDED_VCL_ABOUT_DIALOG_HXX
12 
13 #include <vcl/fixed.hxx>
14 #include <vcl/fixedhyper.hxx>
15 #include <vcl/dialog.hxx>
16 #include <vcl/layout.hxx>
17 #include <vcl/vclmedit.hxx>
18 
19 namespace vcl
20 {
21 class AboutDialog : public Dialog
22 {
23 private:
25 
26  std::unique_ptr<VclBuilder> m_xBuilder;
34 
35  void StyleControls();
36 
37 protected:
38  virtual void Paint(vcl::RenderContext& rRenderContext,
39  const ::tools::Rectangle& rRect) override;
40  virtual bool set_property(const OString& rKey, const OUString& rValue) override;
41  virtual void set_content_area(VclBox* pBox) override;
42 
43 public:
44  explicit AboutDialog(vcl::Window* pParent, WinBits nStyle = WB_STDDIALOG,
45  InitFlag eFlag = InitFlag::Default);
46  virtual ~AboutDialog() override;
47  virtual void dispose() override;
48 
49  void SetLogo(const Image& rLogoBitmap);
50  void SetBackground(const Image& rBackgroundBitmap);
51  void SetVersion(const OUString& rVersion) { m_xVersion->SetText(rVersion); }
52  void SetCopyright(const OUString& rCopyright) { m_xCopyrightText->SetText(rCopyright); }
53  void SetWebsiteLink(const OUString& rURL) { m_xBuildIdLink->SetURL(rURL); }
54  void SetWebsiteLabel(const OUString& rLabel) { m_xBuildIdLink->SetText(rLabel); }
55 
56  OUString GetWebsiteLabel() const { return m_xBuildIdLink->GetText(); }
57 };
58 }
59 
60 #endif
61 
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
BitmapEx m_aBackgroundBitmap
Definition: aboutdialog.hxx:24
VclPtr< FixedText > m_xDescriptionText
Definition: aboutdialog.hxx:30
VclPtr< FixedText > m_xCopyrightText
Definition: aboutdialog.hxx:31
virtual void dispose() override
This is intended to be used to clear any locally held references to other Window-subclass objects...
Definition: aboutdialog.cxx:49
virtual bool set_property(const OString &rKey, const OUString &rValue) override
sal_Int64 WinBits
void SetBackground()
VclPtr< VclMultiLineEdit > m_xVersion
Definition: aboutdialog.hxx:28
virtual OUString GetText() const
Definition: window.cxx:3051
std::unique_ptr< VclBuilder > m_xBuilder
Definition: aboutdialog.hxx:26
void SetWebsiteLabel(const OUString &rLabel)
Definition: aboutdialog.hxx:54
Use given parent or get a default one using GetDefaultParent(...)
virtual void SetText(const OUString &rStr) override
Definition: ctrl.cxx:95
VclPtr< VclContainer > m_xContents
Definition: aboutdialog.hxx:27
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:304
void SetLogo(const Image &rLogoBitmap)
Definition: aboutdialog.cxx:85
InitFlag
Definition: dialog.hxx:37
VclPtr< FixedText > m_xLogoReplacement
Definition: aboutdialog.hxx:33
void SetVersion(const OUString &rVersion)
Definition: aboutdialog.hxx:51
VclPtr< FixedHyperlink > m_xBuildIdLink
Definition: aboutdialog.hxx:29
Definition: image.hxx:51
VclPtr< FixedImage > m_xLogoImage
Definition: aboutdialog.hxx:32
AboutDialog(vcl::Window *pParent, WinBits nStyle=WB_STDDIALOG, InitFlag eFlag=InitFlag::Default)
Definition: aboutdialog.cxx:20
virtual void set_content_area(VclBox *pBox) override
Definition: aboutdialog.cxx:37
void SetWebsiteLink(const OUString &rURL)
Definition: aboutdialog.hxx:53
virtual ~AboutDialog() override
Definition: aboutdialog.cxx:47
void SetCopyright(const OUString &rCopyright)
Definition: aboutdialog.hxx:52
virtual void SetText(const OUString &rStr) override
Definition: vclmedit.cxx:1111
OUString GetWebsiteLabel() const
Definition: aboutdialog.hxx:56
virtual void Paint(vcl::RenderContext &rRenderContext, const ::tools::Rectangle &rRect) override