lib
KoTemplateChooseDia Class Reference
#include <KoTemplateChooseDia.h>

Detailed Description
This class is used to show the template dialog on startup.Unless you need something special, you should use the static method choose().
The template choose dialog
Definition at line 131 of file KoTemplateChooseDia.h.
Public Types | |
enum | ReturnType { Cancel, Template, File, Empty } |
enum | DialogType { Everything, OnlyTemplates, NoTemplates } |
Public Member Functions | |
QString | getTemplate () const |
QString | getFullTemplate () const |
ReturnType | getReturnType () const |
DialogType | getDialogType () const |
Static Public Member Functions | |
static ReturnType | choose (KInstance *instance, QString &file, const DialogType &dialogType, const QCString &templateType, QWidget *parent) |
Protected Slots | |
virtual void | slotOk () |
Member Enumeration Documentation
The Dialog returns one of these values depending on the input of the user.
Cancel = The user pressed 'Cancel' Template = The user selected a template File = The user has chosen a file Empty = The user selected "Empty document"
Definition at line 144 of file KoTemplateChooseDia.h.
To configure the dialog you have to use this enum.
Everything = Show templates and the rest of the dialog OnlyTemplates = Show only the templates NoTemplates = Just guess :)
Reimplemented from KDialogBase.
Definition at line 151 of file KoTemplateChooseDia.h.
Member Function Documentation
static ReturnType KoTemplateChooseDia::choose | ( | KInstance * | instance, | |
QString & | file, | |||
const DialogType & | dialogType, | |||
const QCString & | templateType, | |||
QWidget * | parent | |||
) | [static] |
This is the static method you'll normally use to show the dialog.
- Parameters:
-
instance the KInstance of your app The native mimetype is retrieved from the (desktop file of) that instance. file this is the filename which is returned to your app More precisely, it's a url (to give to KURL) if ReturnType is File and it's a path (to open directly) if ReturnType is Template dialogType the type of the dialog templateType the template type of your application (see kword or kpresenter for details) parent pointer to parent widget
- Returns:
- The return type (see above)
QString KoTemplateChooseDia::getTemplate | ( | ) | const |
QString KoTemplateChooseDia::getFullTemplate | ( | ) | const |
Method to get the "full" template (path+template).
Definition at line 287 of file KoTemplateChooseDia.cpp.
KoTemplateChooseDia::ReturnType KoTemplateChooseDia::getReturnType | ( | ) | const |
The ReturnType (call this one after exec()).
Definition at line 291 of file KoTemplateChooseDia.cpp.
KoTemplateChooseDia::DialogType KoTemplateChooseDia::getDialogType | ( | ) | const |
The dialogType - normally you won't need this one.
Definition at line 295 of file KoTemplateChooseDia.cpp.
void KoTemplateChooseDia::slotOk | ( | void | ) | [protected, virtual, slot] |
Activated when the Ok button has been clicked.
Reimplemented from KDialogBase.
Definition at line 635 of file KoTemplateChooseDia.cpp.
The documentation for this class was generated from the following files: