LibreOffice Module vcl (master) 1
IconThemeSelector.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
10#ifndef INCLUDED_VCL_ICONTHEMESELECTOR_HXX
11#define INCLUDED_VCL_ICONTHEMESELECTOR_HXX
12
13#include <rtl/ustring.hxx>
14
15#include <vcl/dllapi.h>
16
17#include <vector>
18
19// forward declaration of unit test class. Required for friend relationship.
20class IconThemeSelectorTest;
21
22namespace vcl {
23class IconThemeInfo;
24
32public:
34
42 OUString
43 SelectIconTheme(
44 const std::vector<IconThemeInfo>& installedThemes,
45 const OUString& theme
46 ) const;
47
57 OUString
58 SelectIconThemeForDesktopEnvironment(
59 const std::vector<IconThemeInfo>& installedThemes,
60 const OUString& desktopEnvironment) const;
61
62 void
63 SetUseHighContrastTheme(bool);
64
66 bool
67 SetPreferredIconTheme(const OUString&, bool bDarkIconTheme);
68
69 bool
71
72 bool
74
75private:
77 static OUString
78 ReturnFallback(const std::vector<IconThemeInfo>& installedThemes);
79
81 static constexpr OUStringLiteral FALLBACK_LIGHT_ICON_THEME_ID = u"colibre";
82 static constexpr OUStringLiteral FALLBACK_DARK_ICON_THEME_ID = u"colibre_dark";
83
84 static OUString
85 GetIconThemeForDesktopEnvironment(const OUString& desktopEnvironment, bool bPreferDarkIconTheme);
86
90
91 friend class ::IconThemeSelectorTest;
92};
93
94} /* namespace vcl */
95
96#endif // INCLUDED_VCL_ICONTHEMESELECTOR_HXX
97
98/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class helps to choose an icon theme from a list of installed themes.
#define VCL_DLLPUBLIC
Definition: dllapi.h:29
float u
bool operator==(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:175
bool operator!=(const ItalicMatrix &a, const ItalicMatrix &b)
Definition: vclenum.hxx:180