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

Kross

Kross::FormDialog

Kross::FormDialog Class Reference

#include <form.h>

Inheritance diagram for Kross::FormDialog:

Inheritance graph
[legend]

List of all members.


Detailed Description

The FormDialog class provides access to KDialog objects as top-level containers.

Example (in Python) :

 import Kross
 forms = Kross.module("forms")
 mydialog = forms.createDialog("MyDialog")
 mydialog.setButtons("Ok|Cancel")
 mydialog.setFaceType("Plain") #Auto Plain List Tree Tabbed
 mywidget = forms.createWidgetFromUIFile(mydialog, "./mywidget.ui")
 mywidget["QLineEdit"].setText("some string")
 if mydialog.exec_loop():
     if mydialog.result() == "Ok":
         print mywidget["QLineEdit"].text

Definition at line 204 of file form.h.


Public Slots

bool setButtons (const QString &buttons)
bool setFaceType (const QString &facetype)
QString currentPage () const
bool setCurrentPage (const QString &name)
QWidget * page (const QString &name) const
QWidget * addPage (const QString &name, const QString &header=QString(), const QString &iconname=QString())
int exec ()
int exec_loop ()
QString result ()

Public Member Functions

 FormDialog (const QString &caption)
virtual ~FormDialog ()

Constructor & Destructor Documentation

FormDialog::FormDialog ( const QString &  caption  ) 

Definition at line 313 of file form.cpp.

FormDialog::~FormDialog (  )  [virtual]

Definition at line 325 of file form.cpp.


Member Function Documentation

bool FormDialog::setButtons ( const QString &  buttons  )  [slot]

Set the buttons.

Parameters:
buttons string that defines the displayed buttons. For example the string may look like "Ok" or "Ok|Cancel" or "Yes|No|Cancel".
Returns:
true if the passed buttons string was valid and setting the buttons was successfully else false is returned.

Definition at line 330 of file form.cpp.

bool FormDialog::setFaceType ( const QString &  facetype  )  [slot]

Set the face type of the dialog.

Parameters:
facetype the face type which could be "Auto", "Plain", "List", "Tree" or "Tabbed" as defined in KPageView::FaceType .

Definition at line 342 of file form.cpp.

QString FormDialog::currentPage (  )  const [slot]

Returns:
the name of the currently selected page.

Use the page() method to get the matching page QWidget instance.

Reimplemented from KPageDialog.

Definition at line 354 of file form.cpp.

bool FormDialog::setCurrentPage ( const QString &  name  )  [slot]

Set the current page to name .

If there exists no page with such a pagename the method returns false else (if the page was successfully set) true is returned.

Definition at line 360 of file form.cpp.

QWidget * FormDialog::page ( const QString &  name  )  const [slot]

Returns:
the QWidget page instance which has the pagename name or NULL if there exists no such page.

Definition at line 368 of file form.cpp.

QWidget * FormDialog::addPage ( const QString &  name,
const QString &  header = QString(),
const QString &  iconname = QString() 
) [slot]

Add and return a new page.

Parameters:
name The name the page has. This name is for example returned at the currentPage() method and should be unique. The name is also used to display a short title for the page.
header The longer header title text used for display purposes.
iconname The name of the icon which the page have. This could be for example "about_kde", "document-open", "configure" or any other iconname known by KDE.
Returns:
the new QWidget page instance.

Definition at line 373 of file form.cpp.

int Kross::FormDialog::exec (  )  [inline, slot]

Shows the dialog as a modal dialog, blocking until the user closes it and returns the execution result.

Returns:
>=1 if the dialog was accepted (e.g. "Ok" pressed) else the user rejected the dialog (e.g. by pressing "Cancel" or just closing the dialog by pressing the escape-key).

Reimplemented from QDialog.

Definition at line 273 of file form.h.

int Kross::FormDialog::exec_loop (  )  [inline, slot]

Same as the exec() method above provided for Python-lovers (python does not like functions named "exec" and PyQt named it "exec_loop", so just let's do the same).

Definition at line 280 of file form.h.

QString FormDialog::result (  )  [slot]

Returns:
the result.

The result may for example "Ok", "Cancel", "Yes" or "No".

Reimplemented from QDialog.

Definition at line 390 of file form.cpp.


The documentation for this class was generated from the following files:
  • form.h
  • form.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