libkonq Library API Documentation

KNewMenu Class Reference

The 'New' submenu, both for the File menu and the RMB popup menu. More...

#include <knewmenu.h>

List of all members.

Public Slots

void slotCheckUpToDate ()
 Checks if updating the list is necessary IMPORTANT : Call this in the slot for aboutToShow.


Public Member Functions

 KNewMenu (KActionCollection *_collec, const char *name=0L)
 Constructor.

 KNewMenu (KActionCollection *_collec, QWidget *parentWidget, const char *name=0L)
void setPopupFiles (KURL::List &_files)
 Set the files the popup is shown for Call this before showing up the menu.

void setPopupFiles (const KURL &_file)

Protected Slots

void slotNewFile ()
 Called when New->* is clicked.

void slotFillTemplates ()
 Fills the templates list.

void slotResult (KIO::Job *)
void slotRenamed (KIO::Job *, const KURL &, const KURL &)


Detailed Description

The 'New' submenu, both for the File menu and the RMB popup menu.

(The same instance can be used by both). Fills it with 'Folder' and one item per Template. For this you need to connect aboutToShow() of the File menu with slotCheckUpToDate() and to call slotCheckUpToDate() before showing the RMB popupmenu.

KNewMenu automatically updates the list of templates if templates are added/updated/deleted.

Author:
David Faure <faure@kde.org> Ideas and code for the new template handling mechanism ('link' desktop files) from Christoph Pickart <pickart@iam.uni-bonn.de>

Definition at line 50 of file knewmenu.h.


Constructor & Destructor Documentation

KNewMenu::KNewMenu KActionCollection *  _collec,
const char *  name = 0L
 

Constructor.

Definition at line 61 of file knewmenu.cc.


Member Function Documentation

void KNewMenu::setPopupFiles KURL::List &  _files  )  [inline]
 

Set the files the popup is shown for Call this before showing up the menu.

Definition at line 65 of file knewmenu.h.

void KNewMenu::slotCheckUpToDate  )  [slot]
 

Checks if updating the list is necessary IMPORTANT : Call this in the slot for aboutToShow.

Definition at line 87 of file knewmenu.cc.

References slotFillTemplates().

void KNewMenu::slotNewFile  )  [protected, slot]
 

Called when New->* is clicked.

Definition at line 286 of file knewmenu.cc.

void KNewMenu::slotFillTemplates  )  [protected, slot]
 

Fills the templates list.

Definition at line 240 of file knewmenu.cc.

Referenced by slotCheckUpToDate().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Thu Jan 29 23:03:28 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001