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

KIO

  • kio
  • kio
krun_p.h
Go to the documentation of this file.
1 // -*- mode: c++; c-basic-offset: 2 -*-
2 /* This file is part of the KDE project
3  Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
4  Copyright (C) 2006 David Faure <faure@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KRUN_P_H
23 #define KRUN_P_H
24 
25 #include <QtCore/QObject>
26 #include <QtCore/QPointer>
27 
28 #include "kprocess.h"
29 #include "kstartupinfo.h"
30 
37 class KProcessRunner : public QObject
38 {
39  Q_OBJECT
40 
41  public:
42 
43 #ifndef Q_WS_X11
44  static int run(KProcess *, const QString & executable);
45 #else
46  static int run(KProcess *, const QString & executable, const KStartupInfoId& id);
47 #endif
48 
49  virtual ~KProcessRunner();
50 
51  int pid() const;
52 
53  protected Q_SLOTS:
54 
55  void slotProcessExited(int, QProcess::ExitStatus);
56 
57  private:
58 #ifndef Q_WS_X11
59  KProcessRunner(KProcess *, const QString & binName);
60 #else
61  KProcessRunner(KProcess *, const QString & binName, const KStartupInfoId& id);
62 #endif
63 
64  void terminateStartupNotification();
65 
66  KProcess *process;
67  QString m_executable; // can be a full path
68  KStartupInfoId id;
69  int m_pid;
70 
71  Q_DISABLE_COPY(KProcessRunner)
72 };
73 
77 class KRun::KRunPrivate
78 {
79 public:
80  KRunPrivate(KRun *parent);
81 
82  void init (const KUrl& url, QWidget* window, mode_t mode,
83  bool isLocalFile, bool showProgressInfo, const QByteArray& asn);
84 
85  // This helper method makes debugging easier: a single breakpoint for all
86  // the code paths that start the timer - at least from KRun itself.
87  // TODO: add public method startTimer() and deprecate timer() accessor,
88  // starting is the only valid use of the timer in subclasses (BrowserRun, KHTMLRun and KonqRun)
89  void startTimer();
90 
91 #ifdef Q_WS_WIN
92  static bool displayNativeOpenWithDialog( const KUrl::List& lst, QWidget* window, bool tempFiles,
93  const QString& suggestedFileName, const QByteArray& asn );
94 #endif
95  bool runExecutable(const QString& _exec);
96 
97  KRun *q;
98  bool m_showingDialog;
99  bool m_runExecutables;
100 
101  QString m_preferredService;
102  QString m_externalBrowser;
103  QString m_localPath;
104  QString m_suggestedFileName;
105  QPointer <QWidget> m_window;
106  QByteArray m_asn;
107  KUrl m_strURL;
108  bool m_bFault;
109  bool m_bAutoDelete;
110  bool m_bProgressInfo;
111  bool m_bFinished;
112  KIO::Job * m_job;
113  QTimer m_timer;
114 
119  bool m_bScanFile;
120  bool m_bIsDirectory;
121 
126  bool m_bInit;
127 
128  bool m_bIsLocalFile;
129  mode_t m_mode;
130 };
131 
132 #endif // KRUN_P_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jun 1 2013 22:01:50 by doxygen 1.8.3.1 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.10.4 API Reference

Skip menu "kdelibs-4.10.4 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