File: kshellcmdexecutor.h

package info (click to toggle)
konqueror 4%3A25.04.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 61,780 kB
  • sloc: cpp: 59,015; python: 943; xml: 683; javascript: 186; sh: 165; makefile: 10
file content (39 lines) | stat: -rw-r--r-- 849 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*  This file is part of the KDE project
    SPDX-FileCopyrightText: 2000 Alexander Neundorf <neundorf@kde.org>

    SPDX-License-Identifier: LGPL-2.0-or-later
*/

#ifndef KSHELLCMDEXECUTOR_H
#define KSHELLCMDEXECUTOR_H

#include <QTextEdit>

namespace KDESu
{
class PtyProcess;
}
class QSocketNotifier;

class KShellCommandExecutor: public QTextEdit
{
    Q_OBJECT
public:
    explicit KShellCommandExecutor(const QString &command, QWidget *parent = nullptr);
    ~KShellCommandExecutor() override;
    int exec();
Q_SIGNALS:
    void finished();
public Q_SLOTS:
    void slotFinished();
protected:
    KDESu::PtyProcess *m_shellProcess;
    QString m_command;
    QSocketNotifier *m_readNotifier;
    QSocketNotifier *m_writeNotifier;
protected Q_SLOTS:
    void readDataFromShell();
    void writeDataToShell();
};

#endif // KSHELLCMDEXECUTOR_H