<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title>libkonq Library: KNewMenu Class Reference (libkonq Library)</title> <link href="../../common/doxygen.css" rel="stylesheet" type="text/css"> </head> <div class="header"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td rowspan="2" width="92"> <a href="../../index.html" title="The API documentation main page"><img src="../../common/docheadergears.png" style="border:0px;" alt=""></a> </td> <td width="95%"> <h1>libkonq Library API Documentation</h1> </td> </tr> <tr> <td valign="bottom"> <table class="links" border=0 cellspacing=0> <tr> <td><a href="index.html">Overview</a></td> <td><a href="hierarchy.html" title="Inheritance list, sorted roughly alphabetically">Class Hierarchy</a></td> <td><a href="classes.html" title="Alphabetical list of classes">Classes</a></td> <td><a href="annotated.html" title="Classes, structs, unions and interfaces with brief descriptions">Classes (annotated)</a></td> <td><a href="functions.html" title="Documented class members with links to the classes they belong to">Members</a></td> <td><a href="namespaces.html" title="All documented namespaces with brief descriptions">Namespaces</a></td> <td><a href="files.html" title="A list of all documented files with brief descriptions">Source Files</a></td> </tr> </table> </td></tr></table> </div> <div id="hgrad"></div> <div class="text"> <!-- Generated by Doxygen 1.4.4 --> <h1>KNewMenu Class Reference</h1><!-- doxytag: class="KNewMenu" --><!-- doxytag: inherits="KActionMenu" -->The 'New' submenu, both for the File menu and the RMB popup menu. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="knewmenu_8h-source.html">knewmenu.h</a>></code> <p> <a href="classKNewMenu-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Slots</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#i0">slotCheckUpToDate</a> ()</td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#a0">KNewMenu</a> (KActionCollection *_collec, const char *name=0L)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1"></a><!-- doxytag: member="KNewMenu::KNewMenu" ref="a1" args="(KActionCollection *_collec, QWidget *parentWidget, const char *name=0L)" --> </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#a1">KNewMenu</a> (KActionCollection *_collec, QWidget *parentWidget, const char *name=0L)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2"></a><!-- doxytag: member="KNewMenu::~KNewMenu" ref="a2" args="()" --> virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#a2">~KNewMenu</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#a3">setPopupFiles</a> (KURL::List &_files)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4"></a><!-- doxytag: member="KNewMenu::setPopupFiles" ref="a4" args="(const KURL &_file)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#a4">setPopupFiles</a> (const KURL &_file)</td></tr> <tr><td colspan="2"><br><h2>Protected Slots</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#j0">slotNewDir</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#j1">slotNewFile</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#j2">slotFillTemplates</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="j3"></a><!-- doxytag: member="KNewMenu::slotResult" ref="j3" args="(KIO::Job *)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#j3">slotResult</a> (KIO::Job *)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="j4"></a><!-- doxytag: member="KNewMenu::slotRenamed" ref="j4" args="(KIO::Job *, const KURL &, const KURL &)" --> void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKNewMenu.html#j4">slotRenamed</a> (KIO::Job *, const KURL &, const KURL &)</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The 'New' submenu, both for the File menu and the RMB popup menu. <p> (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 <a class="el" href="classKNewMenu.html#i0">slotCheckUpToDate()</a> and to call <a class="el" href="classKNewMenu.html#i0">slotCheckUpToDate()</a> before showing the RMB popupmenu.<p> KNewMenu automatically updates the list of templates if templates are added/updated/deleted.<p> <dl compact><dt><b>Author:</b></dt><dd>David Faure <<a href="mailto:faure@kde.org">faure@kde.org</a>> Ideas and code for the new template handling mechanism ('link' desktop files) from Christoph Pickart <<a href="mailto:pickart@iam.uni-bonn.de">pickart@iam.uni-bonn.de</a>></dd></dl> <p> <p> Definition at line <a class="el" href="knewmenu_8h-source.html#l00052">52</a> of file <a class="el" href="knewmenu_8h-source.html">knewmenu.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="a0"></a><!-- doxytag: member="KNewMenu::KNewMenu" ref="a0" args="(KActionCollection *_collec, const char *name=0L)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">KNewMenu::KNewMenu </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">KActionCollection * </td> <td class="mdname" nowrap> <em>_collec</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const char * </td> <td class="mdname" nowrap> <em>name</em> = <code>0L</code></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Constructor. <p> <p> Definition at line <a class="el" href="knewmenu_8cc-source.html#l00066">66</a> of file <a class="el" href="knewmenu_8cc-source.html">knewmenu.cc</a>. </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="a3"></a><!-- doxytag: member="KNewMenu::setPopupFiles" ref="a3" args="(KURL::List &_files)" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void KNewMenu::setPopupFiles </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">KURL::List & </td> <td class="mdname1" valign="top" nowrap> <em>_files</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Set the files the popup is shown for Call this before showing up the menu. <p> <p> Definition at line <a class="el" href="knewmenu_8h-source.html#l00068">68</a> of file <a class="el" href="knewmenu_8h-source.html">knewmenu.h</a>. </td> </tr> </table> <a class="anchor" name="i0"></a><!-- doxytag: member="KNewMenu::slotCheckUpToDate" ref="i0" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void KNewMenu::slotCheckUpToDate </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Checks if updating the list is necessary IMPORTANT : Call this in the slot for aboutToShow. <p> <p> Definition at line <a class="el" href="knewmenu_8cc-source.html#l00099">99</a> of file <a class="el" href="knewmenu_8cc-source.html">knewmenu.cc</a>. <p> References <a class="el" href="knewmenu_8cc-source.html#l00292">slotFillTemplates()</a>. </td> </tr> </table> <a class="anchor" name="j0"></a><!-- doxytag: member="KNewMenu::slotNewDir" ref="j0" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void KNewMenu::slotNewDir </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Called when New->Directory. <p> .. is clicked <p> Definition at line <a class="el" href="knewmenu_8cc-source.html#l00359">359</a> of file <a class="el" href="knewmenu_8cc-source.html">knewmenu.cc</a>. <p> References <a class="el" href="konq__operations_8cc-source.html#l00758">KonqOperations::newDir()</a>. </td> </tr> </table> <a class="anchor" name="j1"></a><!-- doxytag: member="KNewMenu::slotNewFile" ref="j1" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void KNewMenu::slotNewFile </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Called when New->* is clicked. <p> <p> Definition at line <a class="el" href="knewmenu_8cc-source.html#l00369">369</a> of file <a class="el" href="knewmenu_8cc-source.html">knewmenu.cc</a>. <p> References <a class="el" href="knewmenu_8cc-source.html#l00581">KURLDesktopFileDlg::fileName()</a>, <a class="el" href="knewmenu_8cc-source.html#l00484">slotRenamed()</a>, <a class="el" href="knewmenu_8cc-source.html#l00494">slotResult()</a>, and <a class="el" href="knewmenu_8cc-source.html#l00573">KURLDesktopFileDlg::url()</a>. </td> </tr> </table> <a class="anchor" name="j2"></a><!-- doxytag: member="KNewMenu::slotFillTemplates" ref="j2" args="()" --><p> <table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void KNewMenu::slotFillTemplates </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected, slot]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td> <p> Fills the templates list. <p> <p> Definition at line <a class="el" href="knewmenu_8cc-source.html#l00292">292</a> of file <a class="el" href="knewmenu_8cc-source.html">knewmenu.cc</a>. <p> Referenced by <a class="el" href="knewmenu_8cc-source.html#l00099">slotCheckUpToDate()</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="knewmenu_8h-source.html">knewmenu.h</a><li><a class="el" href="knewmenu_8cc-source.html">knewmenu.cc</a></ul> </div> <div id="bottom-nav"> <img src="../../common/bottom2.png" align="right" height="59" width="227" alt="KDE Logo"> </div> <div class="bottom"> This file is part of the documentation for libkonq Library Version 3.4.2. </div> <div class="bottom" style="color:#cccccc"> Documentation copyright © 1996-2004 the KDE developers.<br> Generated on Wed Jun 14 19:05:22 2006 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.4.4 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>, © 1997-2003 </div> </body> </html>