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

KIO

  • kio
  • kio
kfileitemactions.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
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Library General Public License as published
6 by the Free Software Foundation; either version 2 of the License or
7 ( at your option ) version 3 or, at the discretion of KDE e.V.
8 ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
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 KFILEITEMACTIONS_H
22#define KFILEITEMACTIONS_H
23
24#include <kservice.h>
25#include <kfileitem.h>
26#include <kio/kio_export.h>
27
28class KFileItemListProperties;
29class KAction;
30class QMenu;
31class KFileItemActionsPrivate;
32
44class KIO_EXPORT KFileItemActions : public QObject
45{
46 Q_OBJECT
47public:
53 KFileItemActions(QObject* parent = 0);
54
58 ~KFileItemActions();
59
64 void setItemListProperties(const KFileItemListProperties& itemList);
65
74 void setParentWidget(QWidget* widget);
75
84 void addOpenWithActionsTo(QMenu* menu, const QString& traderConstraint = QString());
85
92 KAction* preferredOpenWithAction(const QString& traderConstraint);
93
117 static KService::List associatedApplications(const QStringList& mimeTypeList, const QString& traderConstraint);
118
132 int addServiceActionsTo(QMenu* menu);
133
134Q_SIGNALS:
140 void openWithDialogAboutToBeShown();
141
142public Q_SLOTS:
149 void runPreferredApplications(const KFileItemList& fileOpenList, const QString& traderConstraint);
150
151private:
152 KFileItemActionsPrivate* const d;
153 friend class KFileItemActionsPrivate;
154};
155
156#endif /* KFILEITEMACTIONS_H */
157
KAction
KFileItemActionsPrivate
Definition kfileitemactions_p.h:37
KFileItemActions::addServiceActionsTo
int addServiceActionsTo(QMenu *menu)
Generate the user-defined actions and submenus, and adds them to the menu.
Definition kfileitemactions.cpp:204
KFileItemActions::KFileItemActions
KFileItemActions(QObject *parent=0)
Creates a KFileItemActions instance.
Definition kfileitemactions.cpp:179
KFileItemActions::setItemListProperties
void setItemListProperties(const KFileItemListProperties &itemList)
Sets all the data for the next instance of the popupmenu.
Definition kfileitemactions.cpp:190
KFileItemActions::openWithDialogAboutToBeShown
void openWithDialogAboutToBeShown()
Emitted before the "Open With" dialog is shown This is used e.g in folderview to close the folder pee...
KFileItemActions::preferredOpenWithAction
KAction * preferredOpenWithAction(const QString &traderConstraint)
Returns an action for the preferred application only.
Definition kfileitemactions.cpp:712
KFileItemActions::runPreferredApplications
void runPreferredApplications(const KFileItemList &fileOpenList, const QString &traderConstraint)
Slot used to execute a list of files in their respective preferred application.
Definition kfileitemactions.cpp:633
KFileItemActions::addOpenWithActionsTo
void addOpenWithActionsTo(QMenu *menu, const QString &traderConstraint=QString())
Generate the "Open With <Application>" actions, and adds them to the menu.
Definition kfileitemactions.cpp:497
KFileItemActions::setParentWidget
void setParentWidget(QWidget *widget)
Set the parent widget for any dialogs being shown.
Definition kfileitemactions.cpp:721
KFileItemActions::associatedApplications
static KService::List associatedApplications(const QStringList &mimeTypeList, const QString &traderConstraint)
Helper method used internally, can also be used for similar GUIs that show the list of associated app...
Definition kfileitemactions.cpp:431
KFileItemActions::KFileItemActionsPrivate
friend class KFileItemActionsPrivate
Definition kfileitemactions.h:153
KFileItemListProperties
Provides information about the common properties of a group of KFileItem objects.
Definition kfileitemlistproperties.h:50
KFileItemList
List of KFileItems, which adds a few helper methods to QList<KFileItem>.
Definition kfileitem.h:675
KService::List
QList< Ptr > List
QMenu
QObject
QWidget
kfileitem.h
kio_export.h
kservice.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Tue Mar 25 2025 00:00:00 by doxygen 1.14.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • 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