• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KFile

  • kfile
knewfilemenu.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 Copyright (C) 1998-2009 David Faure <faure@kde.org>
3 2003 Sven Leiber <s.leiber@web.de>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 or at your option version 3.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KNEWFILEMENU_H
22#define KNEWFILEMENU_H
23
24#include <kactionmenu.h>
25#include <kurl.h>
26#include <kfile_export.h>
27
28class KJob;
29
30class KActionCollection;
31class KNewFileMenuPrivate;
32
54class KFILE_EXPORT KNewFileMenu : public KActionMenu
55{
56 Q_OBJECT
57public:
66 KNewFileMenu(KActionCollection* collection, const QString& name, QObject* parent);
67
74 virtual ~KNewFileMenu();
75
79 bool isModal() const;
80
84 KUrl::List popupFiles() const;
85
90 void setModal(bool modality);
91
96 void setParentWidget(QWidget* parentWidget);
97
102 void setPopupFiles(const KUrl::List& files);
103
109 void setSupportedMimeTypes(const QStringList& mime);
110
114 void setViewShowsHiddenFiles(bool b);
115
119 QStringList supportedMimeTypes() const;
120
121public Q_SLOTS:
127 void checkUpToDate();
128
137 void createDirectory();
138
139Q_SIGNALS:
143 void fileCreated(const KUrl& url);
144
148 void directoryCreated(const KUrl& url);
149
150protected Q_SLOTS:
151
157 virtual void slotResult(KJob* job);
158
159
160private:
161 Q_PRIVATE_SLOT(d, void _k_slotAbortDialog())
162 Q_PRIVATE_SLOT(d, void _k_slotActionTriggered(QAction*))
163 Q_PRIVATE_SLOT(d, void _k_slotCreateDirectory(bool writeHiddenDir = false))
164 Q_PRIVATE_SLOT(d, void _k_slotCreateHiddenDirectory())
165 Q_PRIVATE_SLOT(d, void _k_slotFillTemplates())
166 Q_PRIVATE_SLOT(d, void _k_slotOtherDesktopFile())
167 Q_PRIVATE_SLOT(d, void _k_slotRealFileOrDir())
168 Q_PRIVATE_SLOT(d, void _k_slotTextChanged(const QString))
169 Q_PRIVATE_SLOT(d, void _k_slotSymLink())
170 Q_PRIVATE_SLOT(d, void _k_slotUrlDesktopFile())
171
172 KNewFileMenuPrivate* const d;
173
174};
175
176#endif
KActionCollection
KActionMenu
KJob
KNewFileMenu
The 'Create New' submenu, for creating files using templates (e.g.
Definition: knewfilemenu.h:55
KNewFileMenu::directoryCreated
void directoryCreated(const KUrl &url)
Emitted once the directory url has been successfully created.
KNewFileMenu::fileCreated
void fileCreated(const KUrl &url)
Emitted once the file (or symlink) url has been successfully created.
KUrl::List
KUrl
QAction
QObject
QWidget
kactionmenu.h
kfile_export.h
kurl.h
name
const char * name(StandardAction id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KFile

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal