libkonq
KNewMenu Class Reference
#include <knewmenu.h>

Detailed Description
The 'New' submenu, both for the File menu and the RMB popup menu.(The same instance can be used by both). It fills the menu with 'Folder' and one item per installed template.
To use this class, 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 shown if installed templates are added/updated/deleted.
Definition at line 48 of file knewmenu.h.
Public Slots | |
void | slotCheckUpToDate () |
Public Member Functions | |
KNewMenu (KActionCollection *parent, QWidget *parentWidget, const QString &name) | |
void | setPopupFiles (const KUrl::List &files) |
virtual | ~KNewMenu () |
Protected Slots | |
virtual void | slotResult (KJob *job) |
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
parent the parent KActionCollection this KAction should be added to. parentWidget the parent widget that will be the owner of this KNewMenu and that will take care of destroying this instance once the parentWidget itself got destroyed. name action name, when adding the action to the collection
Definition at line 139 of file knewmenu.cpp.
KNewMenu::~KNewMenu | ( | ) | [virtual] |
Definition at line 154 of file knewmenu.cpp.
Member Function Documentation
void KNewMenu::setPopupFiles | ( | const KUrl::List & | files | ) |
Set the files the popup is shown for Call this before showing up the menu.
Definition at line 596 of file knewmenu.cpp.
void KNewMenu::slotCheckUpToDate | ( | ) | [slot] |
Checks if updating the list is necessary IMPORTANT : Call this in the slot for aboutToShow.
Definition at line 165 of file knewmenu.cpp.
void KNewMenu::slotResult | ( | KJob * | job | ) | [protected, virtual, slot] |
Called when the job that copied the template has finished.
This method is virtual so that error handling can be reimplemented. Make sure to call the base class slotResult when !job->error() though.
Definition at line 576 of file knewmenu.cpp.
The documentation for this class was generated from the following files: