summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-23 21:31:26 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-24 14:24:55 +0200
commit2d63403fa3bf7fe6019b58ce4af5c49968e03a5b (patch)
tree499a9982f1453de2d56a9c33b9b637fa13a05bdc /vcl
parentfa0a981af41a2606541eec1cb20a379a739691e0 (diff)
move aboutdialog header inside vcl
Change-Id: I1906992759afec0176b723917662fa0644a03c1c Reviewed-on: https://gerrit.libreoffice.org/76221 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/aboutdialog.hxx62
-rw-r--r--vcl/source/app/salvtables.cxx2
-rw-r--r--vcl/source/window/aboutdialog.cxx2
-rw-r--r--vcl/source/window/builder.cxx2
4 files changed, 65 insertions, 3 deletions
diff --git a/vcl/inc/aboutdialog.hxx b/vcl/inc/aboutdialog.hxx
new file mode 100644
index 000000000000..02cc2e734b10
--- /dev/null
+++ b/vcl/inc/aboutdialog.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_VCL_ABOUT_DIALOG_HXX
+#define INCLUDED_VCL_ABOUT_DIALOG_HXX
+
+#include <vcl/fixed.hxx>
+#include <vcl/fixedhyper.hxx>
+#include <vcl/dialog.hxx>
+#include <vcl/layout.hxx>
+#include <vcl/vclmedit.hxx>
+
+namespace vcl
+{
+class AboutDialog : public Dialog
+{
+private:
+ BitmapEx m_aBackgroundBitmap;
+
+ std::unique_ptr<VclBuilder> m_xBuilder;
+ VclPtr<VclContainer> m_xContents;
+ VclPtr<VclMultiLineEdit> m_xVersion;
+ VclPtr<FixedHyperlink> m_xBuildIdLink;
+ VclPtr<FixedText> m_xDescriptionText;
+ VclPtr<FixedText> m_xCopyrightText;
+ VclPtr<FixedImage> m_xLogoImage;
+ VclPtr<FixedText> m_xLogoReplacement;
+
+ void StyleControls();
+
+protected:
+ virtual void Paint(vcl::RenderContext& rRenderContext,
+ const ::tools::Rectangle& rRect) override;
+ virtual bool set_property(const OString& rKey, const OUString& rValue) override;
+ virtual void set_content_area(VclBox* pBox) override;
+
+public:
+ explicit AboutDialog(vcl::Window* pParent, WinBits nStyle = WB_STDDIALOG,
+ InitFlag eFlag = InitFlag::Default);
+ virtual ~AboutDialog() override;
+ virtual void dispose() override;
+
+ void SetLogo(const Image& rLogoBitmap);
+ void SetBackground(const Image& rBackgroundBitmap);
+ void SetVersion(const OUString& rVersion) { m_xVersion->SetText(rVersion); }
+ void SetCopyright(const OUString& rCopyright) { m_xCopyrightText->SetText(rCopyright); }
+ void SetWebsiteLink(const OUString& rURL) { m_xBuildIdLink->SetURL(rURL); }
+ void SetWebsiteLabel(const OUString& rLabel) { m_xBuildIdLink->SetText(rLabel); }
+
+ OUString GetWebsiteLabel() const { return m_xBuildIdLink->GetText(); }
+};
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 5aab75be773d..6f8d11cb7886 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -36,7 +36,6 @@
#include <unotools/accessiblerelationsethelper.hxx>
#include <utility>
#include <tools/helpers.hxx>
-#include <vcl/aboutdialog.hxx>
#include <vcl/builder.hxx>
#include <vcl/calendar.hxx>
#include <vcl/combobox.hxx>
@@ -65,6 +64,7 @@
#include <vcl/vclmedit.hxx>
#include <vcl/viewdataentry.hxx>
#include <vcl/virdev.hxx>
+#include <aboutdialog.hxx>
#include <bitmaps.hlst>
SalFrame::SalFrame()
diff --git a/vcl/source/window/aboutdialog.cxx b/vcl/source/window/aboutdialog.cxx
index b8a8aa595982..ba09f423ab05 100644
--- a/vcl/source/window/aboutdialog.cxx
+++ b/vcl/source/window/aboutdialog.cxx
@@ -12,11 +12,11 @@
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <rtl/character.hxx>
-#include <vcl/aboutdialog.hxx>
#include <vcl/layout.hxx>
#include <vcl/weld.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
+#include <aboutdialog.hxx>
#include <tools/stream.hxx>
#include <rtl/bootstrap.hxx>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 604d9950dece..0a4c66e0cbf1 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -20,7 +20,6 @@
#include <sal/log.hxx>
#include <unotools/localedatawrapper.hxx>
#include <unotools/resmgr.hxx>
-#include <vcl/aboutdialog.hxx>
#include <vcl/builder.hxx>
#include <vcl/builderfactory.hxx>
#include <vcl/button.hxx>
@@ -61,6 +60,7 @@
#include <desktop/crashreport.hxx>
#include <salinst.hxx>
#include <strings.hrc>
+#include <aboutdialog.hxx>
#include <treeglue.hxx>
#include <tools/svlibrary.h>
#include <tools/diagnose_ex.h>