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

libkonq

KNewMenu Class Reference

#include <knewmenu.h>

Inheritance diagram for KNewMenu:

Inheritance graph
[legend]

List of all members.


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.

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

KNewMenu::KNewMenu ( KActionCollection *  parent,
QWidget *  parentWidget,
const QString &  name 
)

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:
  • knewmenu.h
  • knewmenu.cpp

libkonq

Skip menu "libkonq"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • Konsole
  • Libraries
  •   libkonq
Generated for API Reference 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