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

Kross

  • Kross
  • ActionCollectionEditor
Public Member Functions | Protected Member Functions | List of all members
Kross::ActionCollectionEditor Class Reference

#include <view.h>

Inheritance diagram for Kross::ActionCollectionEditor:
QWidget

Public Member Functions

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

Protected Member Functions

virtual void initGui ()
 

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();
KDialog
Kross::ActionCollectionEditor
The ActionCollectionEditor class implements a general editor for Action and ActionCollection instance...
Definition: view.h:66
Kross::Action
The Action class is an abstract container to deal with scripts like a single standalone script file.
Definition: action.h:99

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();
Kross::ActionCollection
The ActionCollection class manages collections of Action instances.
Definition: actioncollection.h:46

Definition at line 65 of file view.h.

Constructor & Destructor Documentation

◆ ActionCollectionEditor() [1/2]

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

Constructor.

Parameters
actionThe Action instance this editor should operate on.
parentThe optional parent widget this widget is child of.

Definition at line 105 of file view.cpp.

◆ ActionCollectionEditor() [2/2]

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

Constructor.

Parameters
collectionThe ActionCollection instance this editor should operate on.
parentThe optional parent widget this widget is child of.

Definition at line 111 of file view.cpp.

◆ ~ActionCollectionEditor()

ActionCollectionEditor::~ActionCollectionEditor ( )
virtual

Destructor.

Definition at line 117 of file view.cpp.

Member Function Documentation

◆ action()

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 122 of file view.cpp.

◆ collection()

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 127 of file view.cpp.

◆ commentEdit()

QLineEdit * ActionCollectionEditor::commentEdit ( ) const

Definition at line 134 of file view.cpp.

◆ commit()

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.

◆ fileEdit()

KUrlRequester * ActionCollectionEditor::fileEdit ( ) const

Definition at line 137 of file view.cpp.

◆ iconEdit()

QLineEdit * ActionCollectionEditor::iconEdit ( ) const

Definition at line 135 of file view.cpp.

◆ initGui()

void ActionCollectionEditor::initGui ( )
protectedvirtual

Initialize the GUI.

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

Definition at line 139 of file view.cpp.

◆ interpreterEdit()

QComboBox * ActionCollectionEditor::interpreterEdit ( ) const

Definition at line 136 of file view.cpp.

◆ isValid()

bool ActionCollectionEditor::isValid ( )
virtual
Returns
true if the values within the editor fields are valid.

Definition at line 239 of file view.cpp.

◆ nameEdit()

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 132 of file view.cpp.

◆ textEdit()

QLineEdit * ActionCollectionEditor::textEdit ( ) const

Definition at line 133 of file view.cpp.


The documentation for this class was generated from the following files:
  • view.h
  • view.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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