Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-updates > by-pkgid > 7a18965e2ffd92515e6886f479af5961 > files > 309

kdebase-devel-doc-3.5.9-37.2mdv2008.1.x86_64.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">

<head>
  <title>libkonq: knewmenu.h Source File (libkonq)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <meta http-equiv="Content-Style-Type" content="text/css" />

  <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org"  r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org"  r (n 0 s 0 v 0 l 0))' />

  <meta name="trademark" content="KDE e.V." />
  <meta name="description" content="K Desktop Environment Homepage, KDE.org" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />

  <link rel="shortcut icon" href="../../favicon.ico" />

<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />



</head>

<body>

<div id="nav_header_top" align="right">
  <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>

  <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a>
  <span class="doNotDisplay">::</span>

  <div id="nav_header_title" align="left">KDE API Reference</div>


</div>

<div id="nav_header_bottom" align="right">
  <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
  <div id="nav_header_bottom_right" style="text-align: left;">
/ <a href="../..">API Reference</a>
 / <a href=".">libkonq</a>
  </div>
</div>


<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
      <td valign="top" class="menuheader" height="0"></td>

  <td id="contentcolumn" valign="top" rowspan="2" >
    <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;">
    <a name="content"></a>


<!-- Generated by Doxygen 1.5.5 -->
<h1>knewmenu.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* This file is part of the KDE project</span>
<a name="l00002"></a>00002 <span class="comment">   Copyright (C) 1998-2000 David Faure &lt;faure@kde.org&gt;</span>
<a name="l00003"></a>00003 <span class="comment">                 2003      Sven Leiber &lt;s.leiber@web.de&gt;</span>
<a name="l00004"></a>00004 <span class="comment"></span>
<a name="l00005"></a>00005 <span class="comment">   This library is free software; you can redistribute it and/or</span>
<a name="l00006"></a>00006 <span class="comment">   modify it under the terms of the GNU Library General Public</span>
<a name="l00007"></a>00007 <span class="comment">   License version 2 as published by the Free Software Foundation.</span>
<a name="l00008"></a>00008 <span class="comment"></span>
<a name="l00009"></a>00009 <span class="comment">   This library is distributed in the hope that it will be useful,</span>
<a name="l00010"></a>00010 <span class="comment">   but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<a name="l00011"></a>00011 <span class="comment">   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
<a name="l00012"></a>00012 <span class="comment">   Library General Public License for more details.</span>
<a name="l00013"></a>00013 <span class="comment"></span>
<a name="l00014"></a>00014 <span class="comment">   You should have received a copy of the GNU Library General Public License</span>
<a name="l00015"></a>00015 <span class="comment">   along with this library; see the file COPYING.LIB.  If not, write to</span>
<a name="l00016"></a>00016 <span class="comment">   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,</span>
<a name="l00017"></a>00017 <span class="comment">   Boston, MA 02110-1301, USA.</span>
<a name="l00018"></a>00018 <span class="comment">*/</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef __knewmenu_h</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __knewmenu_h</span>
<a name="l00022"></a>00022 <span class="preprocessor"></span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;qintdict.h&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;qstringlist.h&gt;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;kaction.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;kdialogbase.h&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;kurl.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;libkonq_export.h&gt;</span>
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">namespace </span>KIO { <span class="keyword">class </span>Job; }
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="keyword">class </span>KDirWatch;
<a name="l00034"></a>00034 <span class="keyword">class </span>KLineEdit;
<a name="l00035"></a>00035 <span class="keyword">class </span>KURLRequester;
<a name="l00036"></a>00036 <span class="keyword">class </span>QPopupMenu;
<a name="l00037"></a>00037 
<a name="l00052"></a><a class="code" href="classKNewMenu.html">00052</a> <span class="keyword">class </span>LIBKONQ_EXPORT <a class="code" href="classKNewMenu.html" title="The &amp;#39;New&amp;#39; submenu, both for the File menu and the RMB popup menu.">KNewMenu</a> : <span class="keyword">public</span> KActionMenu
<a name="l00053"></a>00053 {
<a name="l00054"></a>00054   Q_OBJECT
<a name="l00055"></a>00055 <span class="keyword">public</span>:
<a name="l00056"></a>00056 
<a name="l00060"></a>00060     <a class="code" href="classKNewMenu.html" title="The &amp;#39;New&amp;#39; submenu, both for the File menu and the RMB popup menu.">KNewMenu</a>( KActionCollection * _collec, <span class="keyword">const</span> <span class="keywordtype">char</span> *name=0L );
<a name="l00061"></a>00061     <a class="code" href="classKNewMenu.html" title="The &amp;#39;New&amp;#39; submenu, both for the File menu and the RMB popup menu.">KNewMenu</a>( KActionCollection * _collec, QWidget *parentWidget, <span class="keyword">const</span> <span class="keywordtype">char</span> *name=0L );
<a name="l00062"></a>00062     <span class="keyword">virtual</span> ~<a class="code" href="classKNewMenu.html" title="The &amp;#39;New&amp;#39; submenu, both for the File menu and the RMB popup menu.">KNewMenu</a>();
<a name="l00063"></a>00063 
<a name="l00068"></a><a class="code" href="classKNewMenu.html#e412c85647028d4e54d0cbabff636f74">00068</a>     <span class="keywordtype">void</span> setPopupFiles(<a class="codeRef" doxygen="kdecore.tag:../../../kdelibs-apidocs/kdecore/html/" href="../../../kdelibs-apidocs/kdecore/html/classKURL_1_1List.html">KURL::List</a> &amp; _files) {
<a name="l00069"></a>00069         popupFiles = _files;
<a name="l00070"></a>00070     }
<a name="l00071"></a>00071     <span class="keywordtype">void</span> setPopupFiles(<span class="keyword">const</span> <a class="codeRef" doxygen="kdecore.tag:../../../kdelibs-apidocs/kdecore/html/" href="../../../kdelibs-apidocs/kdecore/html/classKURL.html">KURL</a> &amp; _file) {
<a name="l00072"></a>00072         popupFiles.clear();
<a name="l00073"></a>00073         popupFiles.append( _file );
<a name="l00074"></a>00074     }
<a name="l00075"></a>00075 
<a name="l00076"></a>00076 <span class="keyword">public</span> slots:
<a name="l00081"></a>00081     <span class="keywordtype">void</span> slotCheckUpToDate( );
<a name="l00082"></a>00082 
<a name="l00083"></a>00083 <span class="keyword">protected</span> slots:
<a name="l00087"></a>00087     <span class="keywordtype">void</span> slotNewDir();
<a name="l00088"></a>00088 
<a name="l00092"></a>00092     <span class="keywordtype">void</span> slotNewFile();
<a name="l00093"></a>00093 
<a name="l00097"></a>00097     <span class="keywordtype">void</span> slotFillTemplates();
<a name="l00098"></a>00098 
<a name="l00099"></a>00099     <span class="keywordtype">void</span> slotResult( KIO::Job * );
<a name="l00100"></a>00100     <span class="comment">// Special case (filename conflict when creating a link=url file)</span>
<a name="l00101"></a>00101     <span class="keywordtype">void</span> slotRenamed( KIO::Job *, <span class="keyword">const</span> <a class="codeRef" doxygen="kdecore.tag:../../../kdelibs-apidocs/kdecore/html/" href="../../../kdelibs-apidocs/kdecore/html/classKURL.html">KURL</a>&amp;, <span class="keyword">const</span> <a class="codeRef" doxygen="kdecore.tag:../../../kdelibs-apidocs/kdecore/html/" href="../../../kdelibs-apidocs/kdecore/html/classKURL.html">KURL</a>&amp; );
<a name="l00102"></a>00102 
<a name="l00103"></a>00103 <span class="keyword">private</span>:
<a name="l00104"></a>00104 
<a name="l00108"></a>00108     <span class="keywordtype">void</span> fillMenu();
<a name="l00109"></a>00109 
<a name="l00114"></a>00114     <span class="keywordtype">void</span> parseFiles();
<a name="l00115"></a>00115 
<a name="l00119"></a>00119     <span class="keywordtype">void</span> makeMenus();
<a name="l00120"></a>00120 
<a name="l00128"></a>00128     <span class="keyword">enum</span> { LINKTOTEMPLATE = 1, TEMPLATE, SEPARATOR };
<a name="l00129"></a>00129 
<a name="l00130"></a>00130     <span class="keyword">struct </span>Entry {
<a name="l00131"></a>00131         QString text;
<a name="l00132"></a>00132         QString filePath; <span class="comment">// empty for SEPARATOR</span>
<a name="l00133"></a>00133         QString templatePath; <span class="comment">// same as filePath for TEMPLATE</span>
<a name="l00134"></a>00134         QString icon;
<a name="l00135"></a>00135         <span class="keywordtype">int</span> entryType;
<a name="l00136"></a>00136         QString comment;
<a name="l00137"></a>00137     };
<a name="l00138"></a>00138     <span class="comment">// NOTE: only filePath is known before we call parseFiles</span>
<a name="l00139"></a>00139 
<a name="l00144"></a>00144     <span class="keyword">static</span> QValueList&lt;Entry&gt; * s_templatesList;
<a name="l00145"></a>00145 
<a name="l00146"></a>00146     <span class="keyword">class </span>KNewMenuPrivate;
<a name="l00147"></a>00147     KNewMenuPrivate* d;
<a name="l00148"></a>00148 
<a name="l00154"></a>00154     <span class="keyword">static</span> <span class="keywordtype">int</span> s_templatesVersion;
<a name="l00155"></a>00155 
<a name="l00160"></a>00160     <span class="keyword">static</span> <span class="keywordtype">bool</span> s_filesParsed;
<a name="l00161"></a>00161 
<a name="l00162"></a>00162     <span class="keywordtype">int</span> menuItemsVersion;
<a name="l00163"></a>00163 
<a name="l00168"></a>00168     <a class="codeRef" doxygen="kdecore.tag:../../../kdelibs-apidocs/kdecore/html/" href="../../../kdelibs-apidocs/kdecore/html/classKURL_1_1List.html">KURL::List</a> popupFiles;
<a name="l00169"></a>00169 
<a name="l00173"></a>00173     <span class="keywordtype">bool</span> m_isURLDesktopFile;
<a name="l00174"></a>00174     QString m_linkURL; <span class="comment">// the url to put in the file</span>
<a name="l00175"></a>00175 
<a name="l00176"></a>00176     <span class="keyword">static</span> KDirWatch * s_pDirWatch;
<a name="l00177"></a>00177 };
<a name="l00178"></a>00178 
<a name="l00185"></a>00185 <span class="keyword">class </span>KURLDesktopFileDlg : <span class="keyword">public</span> KDialogBase
<a name="l00186"></a>00186 {
<a name="l00187"></a>00187     Q_OBJECT
<a name="l00188"></a>00188 <span class="keyword">public</span>:
<a name="l00189"></a>00189     KURLDesktopFileDlg( <span class="keyword">const</span> QString&amp; textFileName, <span class="keyword">const</span> QString&amp; textUrl );
<a name="l00190"></a>00190     KURLDesktopFileDlg( <span class="keyword">const</span> QString&amp; textFileName, <span class="keyword">const</span> QString&amp; textUrl, QWidget *parent );
<a name="l00191"></a>00191     <span class="keyword">virtual</span> ~KURLDesktopFileDlg() {}
<a name="l00192"></a>00192 
<a name="l00196"></a>00196     QString fileName() <span class="keyword">const</span>;
<a name="l00200"></a>00200     QString url() <span class="keyword">const</span>;
<a name="l00201"></a>00201 
<a name="l00202"></a>00202 <span class="keyword">protected</span> slots:
<a name="l00203"></a>00203     <span class="keywordtype">void</span> slotClear();
<a name="l00204"></a>00204     <span class="keywordtype">void</span> slotNameTextChanged( <span class="keyword">const</span> QString&amp; );
<a name="l00205"></a>00205     <span class="keywordtype">void</span> slotURLTextChanged( <span class="keyword">const</span> QString&amp; );
<a name="l00206"></a>00206 <span class="keyword">private</span>:
<a name="l00207"></a>00207     <span class="keywordtype">void</span> initDialog( <span class="keyword">const</span> QString&amp; textFileName, <span class="keyword">const</span> QString&amp; defaultName, <span class="keyword">const</span> QString&amp; textUrl, <span class="keyword">const</span> QString&amp; defaultUrl );
<a name="l00208"></a>00208 
<a name="l00212"></a>00212     KLineEdit *m_leFileName;
<a name="l00216"></a>00216     KURLRequester *m_urlRequester;
<a name="l00217"></a>00217 
<a name="l00221"></a>00221     <span class="keywordtype">bool</span> m_fileNameEdited;
<a name="l00222"></a>00222 };
<a name="l00223"></a>00223 
<a name="l00224"></a>00224 <span class="preprocessor">#endif</span>
</pre></div></div>
    </div></div>


      </td>
  </tr>
  <tr>
    <td valign="top" id="leftmenu" width="25%">
      <a name="navigation"></a>
      <div class="menu_box"><h2>libkonq</h2>
<div class="nav_list">
<ul><li><a href="index.html">Main Page</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul>
<!--
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
  <option value="classFaviconsModule.html">faviconsmodule</option>,  <option value="classKFileIVI.html">kfileivi</option>,  <option value="classKNewMenu.html">knewmenu</option>,  <option value="classKonqBgndDialog.html">konqbgnddialog</option>,  <option value="classKonqFavIconMgr.html">konqfaviconmgr</option>,  <option value="classKonqFMSettings.html">konqfmsettings</option>,  <option value="classKonqHistoryComm.html">konqhistorycomm</option>,  <option value="classKonqHistoryManager.html">konqhistorymanager</option>,  <option value="classKonqIconDrag2.html">konqicondrag2</option>,  <option value="classKonqIconViewWidget.html">konqiconviewwidget</option>,  <option value="classKonqMultiRestoreJob.html">konqmultirestorejob</option>,  <option value="classKonqOperations.html">konqoperations</option>,  <option value="classKonqPopupMenu.html">konqpopupmenu</option>,  <option value="classKonqPropsView.html">konqpropsview</option>,  <option value="classKonqXMLGUIClient.html">konqxmlguiclient</option>,
</select>
</form>
</div>
-->
</div></div>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<li><a href="../../kate/html/index.html">kate</a></li><li><a href="../../kwin/html/index.html">kwin</a></li><li>&nbsp;&nbsp;<a href="../../kwin/lib/html/index.html">lib</a></li><li><a href="../../libkonq/html/index.html">libkonq</a></li>
</ul></div></div>


        </td>
</tr>
</table>

<span class="doNotDisplay">
  <a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
  <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
  <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>


<div style="height: 8px"></div>

<div id="footer">
  <div id="footer_left">
    Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groo&#116;&#64;kde&#46;or&#x67;">Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
    KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
    <a href="http://www.kde.org/contact/impressum.php">Legal</a>
  </div>
  <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>

<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->

</body>
</html>