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

KDECore

  • sources
  • kde-4.12
  • kdelibs
  • kdecore
  • kernel
ktoolinvocation.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (c) 1997-1999 Matthias Kalle Dalheimer <kalle@kde.org>
3  Copyright (c) 1997-2000 Matthias Ettrich <ettrich@troll.no>
4  Copyright (c) 1998-2005 Stephan Kulow <coolo@kde.org>
5  Copyright (c) 1999-2004 Waldo Bastian <bastian@kde.org>
6  Copyright (c) 2001-2005 Lubos Lunak <l.lunak@kde.org>
7  Copyright (C) 2008 Aaron Seigo <aseigo@kde.org>
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Library General Public
11  License as published by the Free Software Foundation; either
12  version 2 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Library General Public License for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with this library; see the file COPYING.LIB. If not, write to
21  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  Boston, MA 02110-1301, USA.
23 */
24 
25 #ifndef _KTOOLINVOCATION_H
26 #define _KTOOLINVOCATION_H
27 
28 #include <kdecore_export.h>
29 
30 #include <QtCore/QObject>
31 #include <QtCore/QByteArray>
32 #include <QtCore/QStringList>
33 
34 class OrgKdeKLauncherInterface;
35 class KUrl;
36 class KToolInvocationPrivate;
37 
71 class KDECORE_EXPORT KToolInvocation : public QObject
72 {
73 
74  Q_OBJECT
75 private:
76  KToolInvocation();
77 public:
78  // @internal
79  ~KToolInvocation();
80  static KToolInvocation *self();
81 
82 public Q_SLOTS:
96  static void invokeHelp( const QString& anchor = QString(),
97  const QString& appname = QString(),
98  const QByteArray& startup_id = QByteArray());
99 
108  static void invokeMailer( const QString &address, const QString &subject,
109  const QByteArray& startup_id = QByteArray() );
110 
120  static void invokeMailer( const KUrl &mailtoURL, const QByteArray& startup_id = QByteArray(),
121  bool allowAttachments = false );
122 
138  static void invokeMailer(const QString &to, const QString &cc, const QString &bcc,
139  const QString &subject, const QString &body,
140  const QString &messageFile = QString(),
141  const QStringList &attachURLs = QStringList(),
142  const QByteArray& startup_id = QByteArray() );
143 
158  static void invokeBrowser( const QString &url,
159  const QByteArray& startup_id = QByteArray() );
160 
171  static void invokeTerminal(const QString &command,
172  const QString& workdir = QString(),
173  const QByteArray &startup_id = "");
174 
175 public:
180  static OrgKdeKLauncherInterface *klauncher();
181  // KDE5: remove this from the public API. Make it kdelibs-private, and provide
182  // replacements for setLaunchEnv and for "making sure kdeinit/klauncher is running".
183  // (We could do the last two without waiting, of course).
184 
206 #ifndef KDE_NO_DEPRECATED
207  KDE_DEPRECATED static int startServiceByName( const QString& _name, const QString &URL,
208  QString *error=0, QString *serviceName=0, int *pid=0,
209  const QByteArray &startup_id = QByteArray(), bool noWait = false );
210 #endif
211 
233 #ifndef KDE_NO_DEPRECATED
234  KDE_DEPRECATED static int startServiceByName( const QString& _name, const QStringList &URLs=QStringList(),
235  QString *error=0, QString *serviceName=0, int *pid=0,
236  const QByteArray &startup_id = QByteArray(), bool noWait = false );
237 #endif
238 
259  static int startServiceByDesktopPath( const QString& _name, const QString &URL,
260  QString *error=0, QString *serviceName=0, int *pid = 0,
261  const QByteArray &startup_id = QByteArray(), bool noWait = false );
262 
282  static int startServiceByDesktopPath( const QString& _name, const QStringList &URLs=QStringList(),
283  QString *error=0, QString *serviceName=0, int *pid = 0,
284  const QByteArray &startup_id = QByteArray(), bool noWait = false );
285 
306  static int startServiceByDesktopName( const QString& _name, const QString &URL,
307  QString *error=0, QString *serviceName=0, int *pid = 0,
308  const QByteArray &startup_id = QByteArray(), bool noWait = false );
309 
330  static int startServiceByDesktopName( const QString& _name, const QStringList &URLs=QStringList(),
331  QString *error=0, QString *serviceName=0, int *pid = 0,
332  const QByteArray &startup_id = QByteArray(), bool noWait = false );
333 
351  static int kdeinitExec( const QString& name, const QStringList &args=QStringList(),
352  QString *error=0, int *pid = 0, const QByteArray& startup_id = QByteArray() );
353 
371  static int kdeinitExecWait( const QString& name, const QStringList &args=QStringList(),
372  QString *error=0, int *pid = 0, const QByteArray& startup_id = QByteArray() );
373 
374 Q_SIGNALS:
379  void kapplication_hook(QStringList& env , QByteArray& startup_id);
380 
381 private:
385  static void startKdeinit();
386 
387  int startServiceInternal(const char *_function,
388  const QString& _name, const QStringList &URLs,
389  QString *error, QString *serviceName, int *pid,
390  const QByteArray& startup_id, bool noWait,
391  const QString& workdir = QString());
392  static bool isMainThreadActive(QString* error = 0);
393 
394  KToolInvocationPrivate * const d;
395 };
396 
397 #endif
398 
KToolInvocation
KToolInvocation: for starting other programs.
Definition: ktoolinvocation.h:71
kdecore_export.h
OrgKdeKLauncherInterface
Definition: klauncher_iface.h:37
pid
static pid_t pid
Definition: k3resolvermanager.cpp:249
QString
QObject
KUrl
Represents and parses a URL.
Definition: kurl.h:111
QStringList
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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