LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
iiconthememanager.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <functional>
12 #include <QString>
13 #include <QList>
14 
15 class QAction;
16 class QIcon;
17 
39 {
40 protected:
41  virtual ~IIconThemeManager () {}
42 public:
56  virtual QIcon GetIcon (const QString& on, const QString& off = QString ()) = 0;
57 
69  virtual void UpdateIconset (const QList<QAction*>& actions) = 0;
70 
78  virtual void ManageWidget (QWidget *widget) = 0;
79 
86  virtual void RegisterChangeHandler (const std::function<void ()>& function) = 0;
87 
88  virtual QIcon GetPluginIcon () = 0;
89 
90  virtual QIcon GetPluginIcon (const QString& name) = 0;
91 };
92 
93 Q_DECLARE_INTERFACE (IIconThemeManager, "org.LeechCraft.IIconThemeManager/1.0")
IIconThemeManager::GetIcon
virtual QIcon GetIcon(const QString &on, const QString &off=QString())=0
Returns the current theme's icon for the given on and off states.
QList
Definition: ianrulesstorage.h:14
IIconThemeManager::ManageWidget
virtual void ManageWidget(QWidget *widget)=0
Watches the given widget recursively and its child actions.
IIconThemeManager::UpdateIconset
virtual void UpdateIconset(const QList< QAction * > &actions)=0
Updates the icons of the given actions.
IIconThemeManager
Interface for accessing LeechCraft-wide icons manager.
Definition: iiconthememanager.h:38
IIconThemeManager::GetPluginIcon
virtual QIcon GetPluginIcon()=0
IIconThemeManager::RegisterChangeHandler
virtual void RegisterChangeHandler(const std::function< void()> &function)=0
Registers the theme change handler.
IIconThemeManager::~IIconThemeManager
virtual ~IIconThemeManager()
Definition: iiconthememanager.h:41