Kross::FormModule

Kross::FormModule Class Reference

#include <form.h>

Inheritance diagram for Kross::FormModule:

Public Slots

QWidgetactiveModalWidget ()
 
QWidgetactiveWindow ()
 
QActioncreateAction (QObject *parent)
 
QWidgetcreateAssistant (const QString &caption)
 
QWidgetcreateDialog (const QString &caption)
 
QWidgetcreateFileWidget (QWidget *parent, const QString &startDirOrVariable=QString())
 
QObjectcreateLayout (QWidget *parent, const QString &layout)
 
QWidgetcreateListView (QWidget *parent)
 
QWidgetcreateWidget (const QString &className)
 
QWidgetcreateWidget (QWidget *parent, const QString &className, const QString &name=QString())
 
QWidgetcreateWidgetFromUI (QWidget *parent, const QString &xml)
 
QWidgetcreateWidgetFromUIFile (QWidget *parent, const QString &filename)
 
QObjectloadPart (QWidget *parent, const QString &name, const QUrl &url=QUrl())
 
QString showMessageBox (const QString &dialogtype, const QString &caption, const QString &message, const QString &details=QString())
 
QWidgetshowProgressDialog (const QString &caption, const QString &labelText)
 
QString tr (const QString &str)
 
QString tr (const QString &str, const QString &comment)
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

The FormModule provides access to UI functionality like dialogs or widgets.

Example (in Python) :

import Kross
forms = Kross.module("forms")
dialog = forms.createDialog("My Dialog")
dialog.setButtons("Ok|Cancel")
page = dialog.addPage("Welcome","Welcome Page","document-open")
label = forms.createWidget(page,"QLabel")
label.text = "Hello World Label"
if dialog.exec_loop():
forms.showMessageBox("Information", "Okay...", "The Ok-button was pressed")

Definition at line 535 of file form.h.

Member Function Documentation

QWidget * FormModule::activeModalWidget ( )
slot
Returns
the active modal widget. Modal widgets are special top-level widgets which are subclasses of QDialog and are modal.

Definition at line 674 of file form.cpp.

QWidget * FormModule::activeWindow ( )
slot
Returns
the application top-level window that has the keyboard input focus, or NULL if no application window has the focus.

Definition at line 679 of file form.cpp.

QAction * FormModule::createAction ( QObject parent)
slot

Create and return a new QAction instance.

Parameters
parentthe parent QObject the new QAction instance is a child of.
Returns
the new QAction instance or NULL.

Definition at line 851 of file form.cpp.

QWidget * FormModule::createAssistant ( const QString caption)
slot

Create and return a new FormAssistant instance.

Parameters
captionThe displayed caption of the dialog.

Definition at line 733 of file form.cpp.

QWidget * FormModule::createDialog ( const QString caption)
slot

Create and return a new FormDialog instance.

Parameters
captionThe displayed caption of the dialog.

Definition at line 728 of file form.cpp.

QWidget * FormModule::createFileWidget ( QWidget parent,
const QString startDirOrVariable = QString() 
)
slot

Create and return a new FormFileWidget instance.

Parameters
parentthe parent QWidget the new FormFileWidget instance is a child of.
startDirOrVariablethe start-directory or -variable.
Returns
the new FormFileWidget instance or NULL.

Definition at line 833 of file form.cpp.

QObject * FormModule::createLayout ( QWidget parent,
const QString layout 
)
slot

Create and return a new QWidget instance.

Parameters
parentthe parent QWidget the new QWidget is a child of.
layoutthe layout style the widget has. This could be one of the following strings;
Returns
the new QLayout instance or NULL.

Definition at line 738 of file form.cpp.

QWidget * FormModule::createListView ( QWidget parent)
slot

Create and return a new FormListView instance.

Parameters
parentthe parent QWidget the new FormListView instance is a child of.
Returns
the new FormFileWidget instance or NULL.

Definition at line 842 of file form.cpp.

QWidget * FormModule::createWidget ( const QString className)
slot

Create and return a new QWidget instance.

Parameters
parentthe parent QWidget the new QWidget is a child of.
classNamethe name of the class that should be created and returned. For example "QLabel" or "QForm".
namethe objectName the new widget has.
Returns
the new QWidget instance or NULL.

Definition at line 754 of file form.cpp.

QWidget * FormModule::createWidget ( QWidget parent,
const QString className,
const QString name = QString() 
)
slot

Create and return a new QWidget instance.

Parameters
parentthe parent QWidget the new QWidget is a child of.
classNamethe name of the class that should be created and returned. For example "QLabel" or "QForm".
namethe objectName the new widget has.
Returns
the new QWidget instance or NULL.

Definition at line 761 of file form.cpp.

QWidget * FormModule::createWidgetFromUI ( QWidget parent,
const QString xml 
)
slot

Create and return a new QWidget instance.

Parameters
parentthe new QWidget is a child of parent.
xmlthe UI XML string used to construct the new widget.
Returns
the new QWidget instance or NULL.

Definition at line 780 of file form.cpp.

QWidget * FormModule::createWidgetFromUIFile ( QWidget parent,
const QString filename 
)
slot

Create and return a new QWidget instance.

Parameters
parentthe parent QWidget the new QWidget is a child of.
filenamethe full filename of the UI file which is readed and its UI XML content is used to construct the new widget.

Definition at line 817 of file form.cpp.

QObject * FormModule::loadPart ( QWidget parent,
const QString name,
const QUrl url = QUrl() 
)
slot

Load and return a KPart component.

Parameters
parentThe parent QWidget the KPart's widget will be child of.
nameThe name of the KPart library like e.g. "libkhtmlpart".
urlOptional Url that should be opened on load.

Definition at line 856 of file form.cpp.

QString FormModule::showMessageBox ( const QString dialogtype,
const QString caption,
const QString message,
const QString details = QString() 
)
slot

Show a messagebox.

Parameters
dialogtypeThe type of the dialog which could be one of the following;
  • Sorry
  • Error
  • Information
  • QuestionYesNo
  • WarningYesNo
  • WarningContinueCancel
  • WarningYesNoCancel
  • QuestionYesNoCancel
captionThe caption the messagedialog displays.
messageThe message that is displayed in the messagedialog.
detailsThe optional details
Returns
The buttoncode which chould be one of the following;
  • Ok
  • Cancel
  • Yes
  • No
  • Continue

Definition at line 684 of file form.cpp.

QWidget * FormModule::showProgressDialog ( const QString caption,
const QString labelText 
)
slot

Show a progressdialog to provide visible feedback on the progress of a slow operation.

Parameters
captionThe caption the progressdialog displays.
labelTextThe displayed label.
Returns
The QProgressDialog widget instance.

Definition at line 723 of file form.cpp.

QString FormModule::tr ( const QString str)
slot
Returns
i18n'ed version of the string

Definition at line 771 of file form.cpp.

QString FormModule::tr ( const QString str,
const QString comment 
)
slot
Returns
i18n'ed version of the string, differentiated by the comment text (like '@title:window')

Definition at line 775 of file form.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 13 2020 22:58:55 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.