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

Kross

Kross::ActionCollectionEditor

Kross::ActionCollectionEditor Class Reference

#include <view.h>

Inheritance diagram for Kross::ActionCollectionEditor:

Inheritance graph
[legend]

List of all members.


Detailed Description

The ActionCollectionEditor class implements a general editor for Action and ActionCollection instances.

Example that shows how to display the editor with an Action ;

 KDialog d(this);
 Action* a = new Action();
 new ActionCollectionEditor(a, d.mainWidget());
 d.exec();

Example that shows how to display the editor with an ActionCollection ;

 KDialog d(this);
 ActionCollection* c = new ActionCollection();
 new ActionCollectionEditor(c, d.mainWidget());
 d.exec();

Definition at line 65 of file view.h.


Public Member Functions

 ActionCollectionEditor (Action *action, QWidget *parent=0)
 ActionCollectionEditor (ActionCollection *collection, QWidget *parent=0)
virtual ~ActionCollectionEditor ()
Action * action () const
ActionCollection * collection () const
virtual bool isValid ()
virtual void commit ()
QLineEdit * nameEdit () const
QLineEdit * textEdit () const
QLineEdit * commentEdit () const
QLineEdit * iconEdit () const
QComboBox * interpreterEdit () const
KUrlRequester * fileEdit () const

Protected Member Functions

virtual void initGui ()

Constructor & Destructor Documentation

ActionCollectionEditor::ActionCollectionEditor ( Action *  action,
QWidget *  parent = 0 
) [explicit]

Constructor.

Parameters:
action The Action instance this editor should operate on.
parent The optional parent widget this widget is child of.

Definition at line 104 of file view.cpp.

ActionCollectionEditor::ActionCollectionEditor ( ActionCollection *  collection,
QWidget *  parent = 0 
) [explicit]

Constructor.

Parameters:
collection The ActionCollection instance this editor should operate on.
parent The optional parent widget this widget is child of.

Definition at line 110 of file view.cpp.

ActionCollectionEditor::~ActionCollectionEditor (  )  [virtual]

Destructor.

Definition at line 116 of file view.cpp.


Member Function Documentation

Action * ActionCollectionEditor::action (  )  const

Returns:
the Action instance this editor operates on or NULL if this editor does not operate on a Action instance.

Definition at line 121 of file view.cpp.

ActionCollection * ActionCollectionEditor::collection (  )  const

Returns:
the ActionCollection instance this editor operates on or NULL if this editor does not operate on a ActionCollection instance.

Definition at line 126 of file view.cpp.

bool ActionCollectionEditor::isValid (  )  [virtual]

Returns:
true if the values within the editor fields are valid.

Definition at line 239 of file view.cpp.

void ActionCollectionEditor::commit (  )  [virtual]

This method got called if the changes done in the editor should be saved aka committed to the Action or ActionCollection instance.

Definition at line 245 of file view.cpp.

QLineEdit * ActionCollectionEditor::nameEdit (  )  const

Following getters are providing access to the edit-widgets once the initGui() was called by the constructors.

Some widgets like e.g. the fileEdit() may return NULL if they are not used / displayed (what is for the fileEdit the case if this ActionCollectionEditor instance has no Action ).

Definition at line 131 of file view.cpp.

QLineEdit * ActionCollectionEditor::textEdit (  )  const

Definition at line 132 of file view.cpp.

QLineEdit * ActionCollectionEditor::commentEdit (  )  const

Definition at line 133 of file view.cpp.

QLineEdit * ActionCollectionEditor::iconEdit (  )  const

Definition at line 134 of file view.cpp.

QComboBox * ActionCollectionEditor::interpreterEdit (  )  const

Definition at line 135 of file view.cpp.

KUrlRequester * ActionCollectionEditor::fileEdit (  )  const

Definition at line 136 of file view.cpp.

void ActionCollectionEditor::initGui (  )  [protected, virtual]

Initialize the GUI.

Called by the both constructors and does create e.g. the nameEdit() and the textEdit() widgets.

Definition at line 138 of file view.cpp.


The documentation for this class was generated from the following files:
  • view.h
  • view.cpp

Kross

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   WTF
  • KJSEmbed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  •   core
  • Phonon
  •   Backend
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal