// forward declaration of unit test classes. Required for friend relationship. class IconThemeInfoTest; class IconThemeSelectorTest; class IconThemeScannerTest;
namespace vcl
{ /** This class provides information about an icon theme.
*/ class VCL_DLLPUBLIC IconThemeInfo
{ public: /** The name of the icon theme to use for high contrast mode */ static constexpr OUString HIGH_CONTRAST_ID_BRIGHT = u"sifr"_ustr; static constexpr OUString HIGH_CONTRAST_ID_DARK = u"sifr_dark"_ustr;
/** Construct an IconThemeInfo from the URL to a file. *Thismethodwillthrowastd::runtime_erroriftheURLcannotbeproperlyparsed. *ChecktheURLwithUrlCanBeParsed()first.
*/
IconThemeInfo(const OUString& urlToFile);
/** Obtain the icon size by theme name. *@internal *Itisnotclearwherethisinformationbelongsto.Thesizeswerehard-codedbeforetheymovedhere. *Maybethereisawaytodeterminethesizesfromtheiconthemepackages.
*/ static Size SizeByThemeName(std::u16string_view);
/** Check whether an IconThemeInfo can be constructed from a URL */ staticbool UrlCanBeParsed(std::u16string_view url);
/** Find an icon theme by its id in a vector. *Throwsaruntime_errorifthethemeisnotcontainedinthevector
*/ staticconst vcl::IconThemeInfo&
FindIconThemeById(const std::vector<vcl::IconThemeInfo>& themes, const OUString& themeId);
/** Check whether a theme with a specified id is in a vector of IconThemeInfo */ staticbool IconThemeIsInVector(const std::vector<vcl::IconThemeInfo>& themes, const OUString& themeId);
private: /** private constructor for testing purposes only */
IconThemeInfo();
/** Determine the icon theme name from the filename *Ifthenamehasanunderscore,thenameistakenfromthefirstunderscoretothelastdot, *e.g.,images_oxygen.zipbecomesoxygen *Ifthenamedoesnothaveanunderscoreinit,thewholenameuntilthelastdotisreturned, *e.g.default.zipbecomesdefault
*/ static OUString FileNameToThemeId(std::u16string_view);
/** Creates the display name for the given id of a file. *Currently,weonlyuppercasetheid.
*/ static OUString ThemeIdToDisplayName(const OUString&);
/** The name which is presented to the user */
OUString mDisplayName; /** The theme id. This id is used in ... to determine the file name */
OUString mThemeId; /** The url to the icon theme package */
OUString mUrlToFile;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.