26 #include "internal/berryWorkbenchRegistryConstants.h"
31 class PropChangedRunnable:
public SafeRunnable
37 IPropertyChangeListener::Events::EventType::AbstractDelegate* delegate;
39 PropChangedRunnable(PropertyChangeEvent::
Pointer event) :
46 delegate->Execute(event);
54 QString IntroPart::GetDefaultTitle()
const
69 const ListenerList& listeners =
71 for (
auto iter = listeners.begin(); iter
72 != listeners.end(); ++iter)
74 runnable->delegate = *iter;
92 this->partSite = site;
98 if (this->imageDescriptor.cacheKey() == titleImage.cacheKey())
102 this->imageDescriptor = titleImage;
108 if (this->titleLabel == titleLabel)
110 this->titleLabel = titleLabel;
131 if (!this->imageDescriptor.isNull())
133 return this->imageDescriptor;
140 if (!titleLabel.isEmpty())
144 return GetDefaultTitle();
148 throw (PartInitException)
168 configElement = cfig;
170 titleLabel = cfig->GetAttribute(WorkbenchRegistryConstants::ATT_LABEL);
173 QString strIcon = cfig->GetAttribute(WorkbenchRegistryConstants::ATT_ICON);
174 if (strIcon.isEmpty())
180 configElement->GetContributor()->GetName(), strIcon);
void RemoveListener(IPropertyChangeListener *listener)
DelegateList< AbstractDelegate >::ListType ListenerList
itk::SmartPointer< Self > Pointer
void SetTitle(const QString &titleLabel)
IIntroSite::Pointer GetIntroSite() const override
void FirePropertyChange(int propertyId)
static void Run(ISafeRunnable::Pointer code)
void RemovePropertyListener(IPropertyChangeListener *l) override
void AddPropertyListener(IPropertyChangeListener *l) override
IConfigurationElement::Pointer GetConfigurationElement()
void SetSite(IIntroSite::Pointer site)
QIcon GetTitleImage() const override
berry::SmartPointer< Self > Pointer
#define berryObjectMacro(...)
void SaveState(IMemento::Pointer memento) override
static const int PROP_TITLE
void AddListener(IPropertyChangeListener *listener)
ListenerList GetListeners() const
static void Run(ISafeRunnable::Pointer runnable)
void Init(IIntroSite::Pointer site, IMemento::Pointer memento) override
QString GetPartName() const override
static const QString INTEGER_PROPERTY
void SetInitializationData(const IConfigurationElement::Pointer &cfig, const QString &propertyName, const Object::Pointer &data) override
static QIcon ImageDescriptorFromPlugin(const QString &pluginId, const QString &imageFilePath)
QIcon GetDefaultImage() const
void SetTitleImage(const QIcon &titleImage)