lib Library API Documentation

KoTemplateChooseDia Class Reference

This class is used to show the template dialog on startup. The template choose dialog. More...

#include <koTemplateChooseDia.h>

List of all members.

Public Types

enum  ReturnType { Cancel, Template, File, Empty }
enum  DialogType { Everything, OnlyTemplates, NoTemplates }

Public Member Functions

 KoTemplateChooseDia (QWidget *parent, const char *name, KInstance *global, const QCString &format="", const QString &nativePattern=QString::null, const QString &nativeName=QString::null, const DialogType &dialogType=Everything, const QCString &templateType="")
QString getTemplate () const
QString getFullTemplate () const
ReturnType getReturnType () const
DialogType getDialogType () const

Static Public Member Functions

ReturnType choose (KInstance *global, QString &file, const QCString &format="", const QString &nativePattern=QString::null, const QString &nativeName=QString::null, const DialogType &dialogType=Everything, const QCString &templateType="")

Protected Slots

virtual void slotOk ()


Detailed Description

This class is used to show the template dialog on startup. The template choose dialog.

Unless you need something special, you should use the static method choose().

Author:
Reginald Stadlbauer <reggie@kde.org>

Werner Trobin <trobin@kde.org>

Definition at line 129 of file koTemplateChooseDia.h.


Member Enumeration Documentation

enum KoTemplateChooseDia::ReturnType
 

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 142 of file koTemplateChooseDia.h.

Referenced by choose(), and getReturnType().

enum KoTemplateChooseDia::DialogType
 

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 :)

Definition at line 149 of file koTemplateChooseDia.h.

Referenced by getDialogType().


Constructor & Destructor Documentation

KoTemplateChooseDia::KoTemplateChooseDia QWidget *  parent,
const char *  name,
KInstance *  global,
const QCString &  format = "",
const QString &  nativePattern = QString::null,
const QString &  nativeName = QString::null,
const DialogType dialogType = Everything,
const QCString &  templateType = ""
 

This is the CTOR to create a dialog.

Parameters:
parent parent the parent of the dialog
name the Qt internal name
global the KInstance of your app
format is the mimetype of the app (e.g. application/x-kspread)
nativePattern is the native pattern (e.g. *.ksp)
nativeName is the name of your app (e.g KSpread)
dialogType the type of the dialog
templateType the template type of your application (see kword or kpresenter for details)
Returns:
The return type (see above)

Definition at line 168 of file koTemplateChooseDia.cc.

Referenced by choose().


Member Function Documentation

KoTemplateChooseDia::ReturnType KoTemplateChooseDia::choose KInstance *  global,
QString &  file,
const QCString &  format = "",
const QString &  nativePattern = QString::null,
const QString &  nativeName = QString::null,
const DialogType dialogType = Everything,
const QCString &  templateType = ""
[static]
 

This is the static method you'll normally use to show the dialog.

Parameters:
global the KInstance of your app
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
format is the mimetype of the app (e.g. application/x-kspread)
nativeName is the name of your app (e.g KSpread)
nativePattern is the native pattern (e.g. *.ksp)
dialogType the type of the dialog
templateType the template type of your application (see kword or kpresenter for details)
Returns:
The return type (see above)

Definition at line 217 of file koTemplateChooseDia.cc.

References getFullTemplate(), getReturnType(), KoTemplateChooseDia(), noStartupDlg(), and ReturnType.

QString KoTemplateChooseDia::getTemplate  )  const
 

Method to get the current template.

Definition at line 257 of file koTemplateChooseDia.cc.

QString KoTemplateChooseDia::getFullTemplate  )  const
 

Method to get the "full" template (path+template).

Definition at line 261 of file koTemplateChooseDia.cc.

Referenced by choose().

KoTemplateChooseDia::ReturnType KoTemplateChooseDia::getReturnType  )  const
 

The ReturnType (call this one after exec()).

Definition at line 265 of file koTemplateChooseDia.cc.

References ReturnType.

Referenced by choose().

KoTemplateChooseDia::DialogType KoTemplateChooseDia::getDialogType  )  const
 

The dialogType - normally you won't need this one.

Definition at line 269 of file koTemplateChooseDia.cc.

References DialogType.

void KoTemplateChooseDia::slotOk  )  [protected, virtual, slot]
 

Activated when the Ok button has been clicked.

Definition at line 570 of file koTemplateChooseDia.cc.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for lib Library Version 1.3.5.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Nov 17 13:19:31 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2003