• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Kross

  • sources
  • kde-4.12
  • kdelibs
  • kross
  • core
actioncollection.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * actioncollection.cpp
3  * This file is part of the KDE project
4  * copyright (C)2004-2006 by Sebastian Sauer (mail@dipe.org)
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  * You should have received a copy of the GNU Library General Public License
15  * along with this program; see the file COPYING. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  ***************************************************************************/
19 
20 #include "actioncollection.h"
21 #include "action.h"
22 #include "manager.h"
23 
24 #include <QtCore/QHash>
25 #include <QtCore/QStringList>
26 #include <QtCore/QPointer>
27 #include <QtCore/QIODevice>
28 #include <QtCore/QFile>
29 #include <QtCore/QFileInfo>
30 #include <QtXml/QDomAttr>
31 
32 #include <kicon.h>
33 #include <klocalizedstring.h>
34 
35 using namespace Kross;
36 
37 namespace Kross {
38 
40  class ActionCollection::Private
41  {
42  public:
43  QPointer<ActionCollection> parent;
44  QHash< QString, QPointer<ActionCollection> > collections;
45  QStringList collectionnames;
46 
47  QList< Action* > actionList;
48  QHash< QString, Action* > actionMap;
49 
50  QString text;
51  QString description;
52  QString iconname;
53  bool enabled;
54  bool blockupdated;
55 
56  Private(ActionCollection* const p) : parent(p) {}
57  };
58 
59 }
60 
61 ActionCollection::ActionCollection(const QString& name, ActionCollection* parent)
62  : QObject(0)
63  , d( new Private(0) )
64 {
65  setObjectName(name);
66  d->text = name;
67  d->enabled = true;
68  d->blockupdated = false;
69 
70  setParentCollection(parent);
71 }
72 
73 ActionCollection::~ActionCollection()
74 {
75  if ( d->parent ) {
76  emit d->parent->collectionToBeRemoved(this, d->parent);
77  d->parent->unregisterCollection( objectName() );
78  emit d->parent->collectionRemoved( this, d->parent );
79  }
80  delete d;
81 }
82 
83 QString ActionCollection::name() const { return objectName(); }
84 
85 QString ActionCollection::text() const { return d->text; }
86 void ActionCollection::setText(const QString& text) { d->text = text; emit dataChanged(this); emitUpdated(); }
87 
88 QString ActionCollection::description() const { return d->description; }
89 void ActionCollection::setDescription(const QString& description) { d->description = description; emit dataChanged(this); emitUpdated(); }
90 
91 QString ActionCollection::iconName() const { return d->iconname; }
92 void ActionCollection::setIconName(const QString& iconname) { d->iconname = iconname; emit dataChanged(this); }
93 QIcon ActionCollection::icon() const { return KIcon(d->iconname); }
94 
95 bool ActionCollection::isEnabled() const { return d->enabled; }
96 void ActionCollection::setEnabled(bool enabled) { d->enabled = enabled; emit dataChanged(this); emitUpdated(); }
97 
98 ActionCollection* ActionCollection::parentCollection() const
99 {
100  return d->parent;
101 }
102 
103 void ActionCollection::setParentCollection( ActionCollection *parent )
104 {
105  if ( d->parent ) {
106  emit d->parent->collectionToBeRemoved(this, d->parent);
107  d->parent->unregisterCollection( objectName() );
108  setParent( 0 );
109  emit d->parent->collectionRemoved( this, d->parent );
110  d->parent = 0;
111  }
112  setParent(0);
113  if ( parent ) {
114  emit parent->collectionToBeInserted(this, parent);
115  setParent( parent );
116  d->parent = parent;
117  parent->registerCollection( this );
118  emit parent->collectionInserted( this, parent );
119  }
120  emitUpdated();
121 }
122 
123 bool ActionCollection::hasCollection(const QString& name) const
124 {
125  return d->collections.contains(name);
126 }
127 
128 ActionCollection* ActionCollection::collection(const QString& name) const
129 {
130  return d->collections.contains(name) ? d->collections[name] : QPointer<ActionCollection>(0);
131 }
132 
133 QStringList ActionCollection::collections() const
134 {
135  return d->collectionnames;
136 }
137 
138 void ActionCollection::registerCollection(ActionCollection* collection)
139 {
140  Q_ASSERT(collection);
141  const QString name = collection->objectName();
142  //Q_ASSERT( !name.isNull() );
143  if (!d->collections.contains(name))
144  {
145  d->collections.insert(name, collection);
146  d->collectionnames.append(name);
147  }
148  connectSignals(collection, true);
149  emitUpdated();
150 }
151 
152 void ActionCollection::unregisterCollection(const QString& name)
153 {
154  if( ! d->collections.contains(name) )
155  return;
156  ActionCollection* collection = d->collections[name];
157  d->collectionnames.removeAll(name);
158  d->collections.remove(name);
159  connectSignals(collection, false);
160  emitUpdated();
161 }
162 
163 QList<Action*> ActionCollection::actions() const
164 {
165  return d->actionList;
166 }
167 
168 Action* ActionCollection::action(const QString& name) const
169 {
170  return d->actionMap.contains(name) ? d->actionMap[name] : 0;
171 }
172 
173 void ActionCollection::addAction(Action* action)
174 {
175  Q_ASSERT( action && ! action->objectName().isEmpty() );
176  addAction(action->objectName(), action);
177 }
178 
179 void ActionCollection::addAction(const QString& name, Action* action)
180 {
181  Q_ASSERT( action && ! name.isEmpty() );
182  emit actionToBeInserted(action, this);
183  if( d->actionMap.contains(name) )
184  d->actionList.removeAll( d->actionMap[name] );
185  d->actionMap.insert(name, action);
186  d->actionList.append(action);
187  action->setParent(this); // in case it is not set
188  connectSignals(action, true);
189  emit actionInserted(action, this);
190  emitUpdated();
191 }
192 
193 void ActionCollection::removeAction(const QString& name)
194 {
195  if( ! d->actionMap.contains(name) )
196  return;
197  Action* action = d->actionMap[name];
198  connectSignals(action, false);
199  emit actionToBeRemoved(action, this);
200  d->actionList.removeAll(action);
201  d->actionMap.remove(name);
202  //krossdebug( QString("ActionCollection::removeAction: %1 %2").arg(action->name()).arg(action->parent()->objectName()) );
203  action->setParent( 0 );
204  emit actionRemoved(action, this);
205  emitUpdated();
206 }
207 
208 void ActionCollection::removeAction(Action* action)
209 {
210  Q_ASSERT( action && ! action->objectName().isEmpty() );
211  if( ! d->actionMap.contains(action->objectName()) ) {
212  Q_ASSERT( ! d->actionList.contains(action) );
213  return;
214  }
215  removeAction( action->objectName() );
216 }
217 
218 void ActionCollection::connectSignals(Action *action, bool conn)
219 {
220  if ( conn ) {
221  connect(action, SIGNAL(dataChanged(Action*)), this, SIGNAL(dataChanged(Action*)));
222  connect(action, SIGNAL(updated()), this, SLOT(emitUpdated()));
223  } else {
224  disconnect(action, SIGNAL(dataChanged(Action*)), this, SIGNAL(dataChanged(Action*)));
225  disconnect(action, SIGNAL(updated()), this, SLOT(emitUpdated()));
226  }
227 }
228 
229 void ActionCollection::connectSignals(ActionCollection *collection, bool conn)
230 {
231  if ( conn ) {
232  connect(collection, SIGNAL(dataChanged(Action*)), this, SIGNAL(dataChanged(Action*)));
233  connect(collection, SIGNAL(dataChanged(ActionCollection*)), this, SIGNAL(dataChanged(ActionCollection*)));
234 
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*)));
239 
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*)));
244  connect(collection, SIGNAL(updated()), this, SLOT(emitUpdated()));
245  } else {
246  disconnect(collection, SIGNAL(dataChanged(ActionCollection*)), this, SIGNAL(dataChanged(ActionCollection*)));
247 
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*)));
252 
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*)));
257  disconnect(collection, SIGNAL(updated()), this, SLOT(emitUpdated()));
258  }
259 }
260 
261 void ActionCollection::emitUpdated()
262 {
263  if (!d->blockupdated) emit updated();
264 }
265 
266 /*********************************************************************
267  * Unserialize from XML / QIODevice / file / resource to child
268  * ActionCollection's and Action's this ActionCollection has.
269  */
270 
271 bool ActionCollection::readXml(const QDomElement& element, const QDir& directory)
272 {
273  return readXml(element, QStringList(directory.absolutePath()));
274 }
275 
276 bool ActionCollection::readXml(const QDomElement& element, const QStringList& searchPath)
277 {
278  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
279  krossdebug( QString("ActionCollection::readXml tagName=\"%1\"").arg(element.tagName()) );
280  #endif
281 
282  d->blockupdated = true; // block updated() signals and emit it only once if everything is done
283  bool ok = true;
284  QDomNodeList list = element.childNodes();
285  const int size = list.size();
286  for(int i = 0; i < size; ++i) {
287  QDomElement elem = list.item(i).toElement();
288  if( elem.isNull() ) continue;
289 
290  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
291  krossdebug( QString(" ActionCollection::readXml child=%1 tagName=\"%2\"").arg(i).arg(elem.tagName()) );
292  #endif
293 
294  if( elem.tagName() == "collection") {
295  const QString name = elem.attribute("name");
296  const QByteArray text = elem.attribute("text").toUtf8();
297  const QByteArray description = elem.attribute("comment").toUtf8();
298  const QString iconname = elem.attribute("icon");
299  bool enabled = QVariant(elem.attribute("enabled","true")).toBool();
300  ActionCollection* c = d->collections.contains(name) ? d->collections[name] : QPointer<ActionCollection>(0);
301  if( ! c )
302  c = new ActionCollection(name, this);
303 
304  c->setText( text.isEmpty() ? name : i18n( text ) );
305  c->setDescription( description.isEmpty() ? c->text() : i18n( description ) );
306  c->setIconName( iconname );
307 
308  if( ! enabled )
309  c->setEnabled(false);
310  if( ! c->readXml(elem, searchPath) )
311  ok = false;
312  }
313  else if( elem.tagName() == "script") {
314  QString name = elem.attribute("name");
315  Action* a = dynamic_cast< Action* >( action(name) );
316  if( a ) {
317  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
318  krossdebug( QString(" ActionCollection::readXml Updating Action \"%1\"").arg(a->objectName()) );
319  #endif
320  }
321  else {
322  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
323  krossdebug( QString(" ActionCollection::readXml Creating Action \"%1\"").arg(name) );
324  #endif
325 
326  a = new Action(this, name);
327  addAction(name, a);
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*)));
330  }
331  a->fromDomElement(elem, searchPath);
332  }
333  //else if( ! fromXml(elem) ) ok = false;
334  }
335 
336  d->blockupdated = false; // unblock signals
337  emitUpdated();
338  return ok;
339 }
340 
341 bool ActionCollection::readXml(QIODevice* device, const QDir& directory)
342 {
343  return readXml(device, QStringList(directory.absolutePath()));
344 }
345 
346 bool ActionCollection::readXml(QIODevice* device, const QStringList& searchPath)
347 {
348  QString errMsg;
349  int errLine, errCol;
350  QDomDocument document;
351  bool ok = document.setContent(device, false, &errMsg, &errLine, &errCol);
352  if( ! ok ) {
353  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
354  krosswarning( QString("ActionCollection::readXml Error at line %1 in col %2: %3").arg(errLine).arg(errCol).arg(errMsg) );
355  #endif
356  return false;
357  }
358  return readXml(document.documentElement(), searchPath);
359 }
360 
361 bool ActionCollection::readXmlFile(const QString& file)
362 {
363  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
364  krossdebug( QString("ActionCollection::readXmlFile file=\"%1\"").arg(file) );
365  #endif
366 
367  QFile f(file);
368  if( ! f.open(QIODevice::ReadOnly) ) {
369  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
370  krosswarning( QString("ActionCollection::readXmlFile reading file \"%1\" failed.").arg(file) );
371  #endif
372  return false;
373  }
374  bool ok = readXml(&f, QFileInfo(file).dir());
375  f.close();
376 
377  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
378  if( ! ok )
379  krosswarning( QString("ActionCollection::readXmlFile parsing XML content of file \"%1\" failed.").arg(file) );
380  #endif
381  return ok;
382 }
383 
384 /*********************************************************************
385  * Serialize from child ActionCollection's and Action's this
386  * ActionCollection has to XML / QIODevice / file / resource.
387  */
388 
389 QDomElement ActionCollection::writeXml()
390 {
391  return writeXml(QStringList());
392 }
393 
394 QDomElement ActionCollection::writeXml(const QStringList& searchPath)
395 {
396  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
397  krossdebug( QString("ActionCollection::writeXml collection.objectName=\"%1\"").arg(objectName()) );
398  #endif
399 
400  QDomDocument document;
401  QDomElement element = document.createElement("collection");
402  if( ! objectName().isNull() )
403  element.setAttribute("name", objectName());
404  if( ! text().isNull() && text() != objectName() )
405  element.setAttribute("text", text());
406  if( ! d->description.isNull() )
407  element.setAttribute("comment", d->description);
408  if( ! d->iconname.isNull() )
409  element.setAttribute("icon", d->iconname);
410  if( ! d->enabled )
411  element.setAttribute("enabled", d->enabled);
412 
413  foreach(Action* a, actions()) {
414  Q_ASSERT(a);
415  #ifdef KROSS_ACTIONCOLLECTION_DEBUG
416  krossdebug( QString(" ActionCollection::writeXml action.objectName=\"%1\" action.file=\"%2\"").arg(a->objectName()).arg(a->file()) );
417  #endif
418  QDomElement e = a->toDomElement(searchPath);
419  if( ! e.isNull() )
420  element.appendChild(e);
421  }
422 
423  foreach(const QString &name, d->collectionnames) {
424  ActionCollection* c = d->collections[name];
425  if( ! c ) continue;
426  QDomElement e = c->writeXml(searchPath);
427  if( ! e.isNull() )
428  element.appendChild(e);
429  }
430 
431  return element;
432 }
433 
434 bool ActionCollection::writeXml(QIODevice* device, int indent)
435 {
436  return writeXml(device, indent, QStringList());
437 }
438 
439 bool ActionCollection::writeXml(QIODevice* device, int indent, const QStringList& searchPath)
440 {
441  QDomDocument document;
442  QDomElement root = document.createElement("KrossScripting");
443 
444  foreach(Action* a, actions()) {
445  QDomElement e = a->toDomElement(searchPath);
446  if( ! e.isNull() )
447  root.appendChild(e);
448  }
449 
450  foreach(const QString &name, d->collectionnames) {
451  ActionCollection* c = d->collections[name];
452  if( ! c ) continue;
453  QDomElement e = c->writeXml(searchPath);
454  if( ! e.isNull() )
455  root.appendChild(e);
456  }
457 
458  document.appendChild(root);
459  return device->write( document.toByteArray(indent) ) != -1;
460 }
461 
462 #include "actioncollection.moc"
QVariant
Kross::ActionCollection::actionRemoved
void actionRemoved(Action *child, ActionCollection *parent)
This signal is emitted after child has been removed from parent.
i18n
QString i18n(const char *text)
Kross::ActionCollection::connectSignals
void connectSignals(ActionCollection *collection, bool conn)
Definition: actioncollection.cpp:229
Kross::ActionCollection::parentCollection
ActionCollection * parentCollection() const
Definition: actioncollection.cpp:98
Kross::ActionCollection::hasCollection
bool hasCollection(const QString &name) const
Definition: actioncollection.cpp:123
Kross::ActionCollection::setText
void setText(const QString &text)
Set the display text to text .
Definition: actioncollection.cpp:86
Kross::ActionCollection::actions
QList< Action * > actions() const
Definition: actioncollection.cpp:163
Kross::ActionCollection::actionToBeInserted
void actionToBeInserted(Action *child, ActionCollection *parent)
This signal is emitted just before child is added to parent.
Kross::ActionCollection::iconName
QString iconName() const
Definition: actioncollection.cpp:91
Kross::ActionCollection::readXmlFile
bool readXmlFile(const QString &file)
Read the XML from the file file .
Definition: actioncollection.cpp:361
Kross::ActionCollection::isEnabled
bool isEnabled() const
Return the enable this ActionCollection has.
Definition: actioncollection.cpp:95
Kross::Action::toDomElement
QDomElement toDomElement() const
Definition: action.cpp:212
Kross::ActionCollection::actionInserted
void actionInserted(Action *child, ActionCollection *parent)
This signal is emitted after child has been added to parent.
Kross::Action::file
QString file() const
Definition: action.cpp:351
QString
QHash
Kross::ActionCollection::actionToBeRemoved
void actionToBeRemoved(Action *child, ActionCollection *parent)
This signal is emitted before child is removed from parent.
QObject
Kross::ActionCollection::setDescription
void setDescription(const QString &description)
Set the optional description for this ActionCollection.
Definition: actioncollection.cpp:89
Kross::ActionCollection::registerCollection
void registerCollection(ActionCollection *collection)
Definition: actioncollection.cpp:138
Kross::ActionCollection::unregisterCollection
void unregisterCollection(const QString &name)
Definition: actioncollection.cpp:152
Kross::ActionCollection::~ActionCollection
virtual ~ActionCollection()
Destructor.
Definition: actioncollection.cpp:73
Kross::ActionCollection::collectionRemoved
void collectionRemoved(ActionCollection *child, ActionCollection *parent)
This signal is emitted after child has been removed from parent.
Kross::ActionCollection::collectionInserted
void collectionInserted(ActionCollection *child, ActionCollection *parent)
This signal is emitted after child has been added to parent.
Kross::ActionCollection::dataChanged
void dataChanged(Action *)
This signal is emitted when the data of a child action is changed.
Kross::ActionCollection::setParentCollection
void setParentCollection(ActionCollection *parent)
Set the parent to parent. NOTE: Do not use setParent().
Definition: actioncollection.cpp:103
action.h
Kross::ActionCollection::ActionCollection
ActionCollection(const QString &name, ActionCollection *parent=0)
Constructor.
Definition: actioncollection.cpp:61
QStringList
KIcon
Kross::ActionCollection::setEnabled
void setEnabled(bool enabled)
Enable or disable this ActionCollection.
Definition: actioncollection.cpp:96
Kross::ActionCollection::collection
ActionCollection * collection(const QString &name) const
Definition: actioncollection.cpp:128
Kross::ActionCollection::setIconName
void setIconName(const QString &iconname)
Set the name of the icon to iconname .
Definition: actioncollection.cpp:92
Kross::Action::fromDomElement
void fromDomElement(const QDomElement &element)
Method to read settings from the QDomElement element that contains details about e.g.
Definition: action.cpp:153
manager.h
Kross::krosswarning
void krosswarning(const QString &s)
Warning function.
Definition: krossconfig.cpp:34
Kross::ActionCollection::collections
QStringList collections() const
Definition: actioncollection.cpp:133
Kross::ActionCollection::writeXml
QDomElement writeXml()
Definition: actioncollection.cpp:389
Kross::ActionCollection::readXml
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
Kross::ActionCollection::text
QString text() const
Definition: actioncollection.cpp:85
Kross::ActionCollection::icon
QIcon icon() const
Definition: actioncollection.cpp:93
ok
KGuiItem ok()
Kross::Manager::self
static Manager & self()
Return the Manager instance.
Definition: manager.cpp:73
klocalizedstring.h
Kross::ActionCollection::description
QString description() const
Definition: actioncollection.cpp:88
Kross::ActionCollection::updated
void updated()
This signal is emitted if the content of the ActionCollection was changed.
Kross::ActionCollection::addAction
void addAction(Action *action)
Definition: actioncollection.cpp:173
Kross::ActionCollection::name
QString name() const
Definition: actioncollection.cpp:83
Kross::Action
The Action class is an abstract container to deal with scripts like a single standalone script file...
Definition: action.h:94
Kross::ActionCollection::action
Action * action(const QString &name) const
Definition: actioncollection.cpp:168
Kross::ActionCollection
The ActionCollection class manages collections of Action instances.
Definition: actioncollection.h:45
kicon.h
QIODevice
actioncollection.h
Kross::krossdebug
void krossdebug(const QString &s)
Debugging function.
Definition: krossconfig.cpp:28
Kross::ActionCollection::collectionToBeRemoved
void collectionToBeRemoved(ActionCollection *child, ActionCollection *parent)
This signal is emitted before child is removed from parent.
QList
Kross::ActionCollection::collectionToBeInserted
void collectionToBeInserted(ActionCollection *child, ActionCollection *parent)
This signal is emitted just before child is added to parent.
Kross::ActionCollection::removeAction
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

KDE's Doxygen guidelines are available online.

Kross

Skip menu "Kross"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal