25
25
#include <config.h>
29
28
#include <qwidget.h>
31
29
#include <qstring.h>
32
30
#include <qtextcodec.h>
33
31
#include <kprocess.h>
32
#include <kpassworddialog.h>
33
#include <knewpassworddialog.h>
37
37
* KdeSudo is the base class of the project
39
* It inherits KPasswordDialog and overrrides the
42
* @author Robert Gruber <rgruber@users.sourceforge.net>
46
class KdeSudo : public KPasswordDialog
42
/* buffer is used when reading from the KProcess child */
45
class KdeSudo : QObject {
53
KdeSudo(QWidget* parent=0, const char *name=0, const QString& icon=QString(), const QString& generic=QString(), bool withIgnoreButton=false);
48
KdeSudo( const QString& icon = QString(),
49
const QString& generic = QString()
59
54
enum ResultCodes { AsUser = 10 };
61
public slots: // Public slots
63
* This slot gets exectuted if sudo creates some output
65
void receivedOut(KProcess*proc, char*buffer, int buflen);
67
* This slot gets exectuted when sudo exits
69
void procExited(KProcess *proc);
71
* This slot overrides the slot from KPasswordDialog
72
* @see KPasswordDialog
76
QString validArg(QString arg);
78
private: // Private attributes
88
QString iceauthorityFile;
92
void unblockSigChild();
59
* This slot gets executed if sudo creates some output
60
* -- well, in theory it should. Even though the code
61
* seems to be doing what the API says, it doesn't
62
* yet do what we need.
67
* This slot gets exectuted when sudo exits
72
* This slot overrides the slot from KPasswordDialog
73
* @see KPasswordDialog
75
void pushPassword(const QString&);
77
QString validArg(QString arg);
80
void error(const QString&);
83
// bool newDcop; // deprecated
90
QString iceauthorityFile;
91
KDESu::KDESuPrivate::KCookie* m_pCookie;
93
void unblockSigChild();
95
KPasswordDialog* m_dialog;