Kross
actioncollection.cpp
Go to the documentation of this file.
86 void ActionCollection::setText(const QString& text) { d->text = text; emit dataChanged(this); emitUpdated(); }
89 void ActionCollection::setDescription(const QString& description) { d->description = description; emit dataChanged(this); emitUpdated(); }
92 void ActionCollection::setIconName(const QString& iconname) { d->iconname = iconname; emit dataChanged(this); }
96 void ActionCollection::setEnabled(bool enabled) { d->enabled = enabled; emit dataChanged(this); emitUpdated(); }
202 //krossdebug( QString("ActionCollection::removeAction: %1 %2").arg(action->name()).arg(action->parent()->objectName()) );
233 connect(collection, SIGNAL(dataChanged(ActionCollection*)), this, SIGNAL(dataChanged(ActionCollection*)));
235 connect(collection, SIGNAL(collectionToBeInserted(ActionCollection*,ActionCollection*)), this, SIGNAL(collectionToBeInserted(ActionCollection*,ActionCollection*)));
236 connect(collection, SIGNAL(collectionInserted(ActionCollection*,ActionCollection*)), this, SIGNAL(collectionInserted(ActionCollection*,ActionCollection*)));
237 connect(collection, SIGNAL(collectionToBeRemoved(ActionCollection*,ActionCollection*)), this, SIGNAL(collectionToBeRemoved(ActionCollection*,ActionCollection*)));
238 connect(collection, SIGNAL(collectionRemoved(ActionCollection*,ActionCollection*)), this, SIGNAL(collectionRemoved(ActionCollection*,ActionCollection*)));
240 connect(collection, SIGNAL(actionToBeInserted(Action*,ActionCollection*)), this, SIGNAL(actionToBeInserted(Action*,ActionCollection*)));
241 connect(collection, SIGNAL(actionInserted(Action*,ActionCollection*)), this, SIGNAL(actionInserted(Action*,ActionCollection*)));
242 connect(collection, SIGNAL(actionToBeRemoved(Action*,ActionCollection*)), this, SIGNAL(actionToBeRemoved(Action*,ActionCollection*)));
243 connect(collection, SIGNAL(actionRemoved(Action*,ActionCollection*)), this, SIGNAL(actionRemoved(Action*,ActionCollection*)));
246 disconnect(collection, SIGNAL(dataChanged(ActionCollection*)), this, SIGNAL(dataChanged(ActionCollection*)));
248 disconnect(collection, SIGNAL(collectionToBeInserted(ActionCollection*,ActionCollection*)), this, SIGNAL(collectionToBeInserted(ActionCollection*,ActionCollection*)));
249 disconnect(collection, SIGNAL(collectionInserted(ActionCollection*,ActionCollection*)), this, SIGNAL(collectionInserted(ActionCollection*,ActionCollection*)));
250 disconnect(collection, SIGNAL(collectionToBeRemoved(ActionCollection*,ActionCollection*)), this, SIGNAL(collectionToBeRemoved(ActionCollection*,ActionCollection*)));
251 disconnect(collection, SIGNAL(collectionRemoved(ActionCollection*,ActionCollection*)), this, SIGNAL(collectionRemoved(ActionCollection*,ActionCollection*)));
253 disconnect(collection, SIGNAL(actionToBeInserted(Action*,ActionCollection*)), this, SIGNAL(actionToBeInserted(Action*,ActionCollection*)));
254 disconnect(collection, SIGNAL(actionInserted(Action*,ActionCollection*)), this, SIGNAL(actionInserted(Action*,ActionCollection*)));
255 disconnect(collection, SIGNAL(actionToBeRemoved(Action*,ActionCollection*)), this, SIGNAL(actionToBeRemoved(Action*,ActionCollection*)));
256 disconnect(collection, SIGNAL(actionRemoved(Action*,ActionCollection*)), this, SIGNAL(actionRemoved(Action*,ActionCollection*)));
291 krossdebug( QString(" ActionCollection::readXml child=%1 tagName=\"%2\"").arg(i).arg(elem.tagName()) );
300 ActionCollection* c = d->collections.contains(name) ? d->collections[name] : QPointer<ActionCollection>(0);
318 krossdebug( QString(" ActionCollection::readXml Updating Action \"%1\"").arg(a->objectName()) );
328 connect(a, SIGNAL(started(Kross::Action*)), &Manager::self(), SIGNAL(started(Kross::Action*)) );
329 connect(a, SIGNAL(finished(Kross::Action*)), &Manager::self(), SIGNAL(finished(Kross::Action*)));
354 krosswarning( QString("ActionCollection::readXml Error at line %1 in col %2: %3").arg(errLine).arg(errCol).arg(errMsg) );
379 krosswarning( QString("ActionCollection::readXmlFile parsing XML content of file \"%1\" failed.").arg(file) );
397 krossdebug( QString("ActionCollection::writeXml collection.objectName=\"%1\"").arg(objectName()) );
416 krossdebug( QString(" ActionCollection::writeXml action.objectName=\"%1\" action.file=\"%2\"").arg(a->objectName()).arg(a->file()) );
void actionRemoved(Action *child, ActionCollection *parent)
This signal is emitted after child has been removed from parent.
QString i18n(const char *text)
void connectSignals(ActionCollection *collection, bool conn)
Definition: actioncollection.cpp:229
ActionCollection * parentCollection() const
Definition: actioncollection.cpp:98
bool hasCollection(const QString &name) const
Definition: actioncollection.cpp:123
QList< Action * > actions() const
Definition: actioncollection.cpp:163
void actionToBeInserted(Action *child, ActionCollection *parent)
This signal is emitted just before child is added to parent.
bool readXmlFile(const QString &file)
Read the XML from the file file .
Definition: actioncollection.cpp:361
bool isEnabled() const
Return the enable this ActionCollection has.
Definition: actioncollection.cpp:95
void actionInserted(Action *child, ActionCollection *parent)
This signal is emitted after child has been added to parent.
void actionToBeRemoved(Action *child, ActionCollection *parent)
This signal is emitted before child is removed from parent.
void setDescription(const QString &description)
Set the optional description for this ActionCollection.
Definition: actioncollection.cpp:89
void registerCollection(ActionCollection *collection)
Definition: actioncollection.cpp:138
void unregisterCollection(const QString &name)
Definition: actioncollection.cpp:152
void collectionRemoved(ActionCollection *child, ActionCollection *parent)
This signal is emitted after child has been removed from parent.
void collectionInserted(ActionCollection *child, ActionCollection *parent)
This signal is emitted after child has been added to parent.
void dataChanged(Action *)
This signal is emitted when the data of a child action is changed.
void setParentCollection(ActionCollection *parent)
Set the parent to parent. NOTE: Do not use setParent().
Definition: actioncollection.cpp:103
ActionCollection(const QString &name, ActionCollection *parent=0)
Constructor.
Definition: actioncollection.cpp:61
void setEnabled(bool enabled)
Enable or disable this ActionCollection.
Definition: actioncollection.cpp:96
ActionCollection * collection(const QString &name) const
Definition: actioncollection.cpp:128
void setIconName(const QString &iconname)
Set the name of the icon to iconname .
Definition: actioncollection.cpp:92
void fromDomElement(const QDomElement &element)
Method to read settings from the QDomElement element that contains details about e.g.
Definition: action.cpp:153
QStringList collections() const
Definition: actioncollection.cpp:133
bool readXml(const QDomElement &element, const QDir &directory=QDir())
Load child Action and ActionCollection instances this collection has from the element ...
Definition: actioncollection.cpp:271
KGuiItem ok()
void updated()
This signal is emitted if the content of the ActionCollection was changed.
void addAction(Action *action)
Definition: actioncollection.cpp:173
The Action class is an abstract container to deal with scripts like a single standalone script file...
Definition: action.h:94
Action * action(const QString &name) const
Definition: actioncollection.cpp:168
The ActionCollection class manages collections of Action instances.
Definition: actioncollection.h:45
void collectionToBeRemoved(ActionCollection *child, ActionCollection *parent)
This signal is emitted before child is removed from parent.
void collectionToBeInserted(ActionCollection *child, ActionCollection *parent)
This signal is emitted just before child is added to parent.
void removeAction(const QString &name)
Definition: actioncollection.cpp:193
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.