Changeset View
Changeset View
Standalone View
Standalone View
src/util/externalcommand.h
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Line(s) | 72 | public: | |||
---|---|---|---|---|---|
118 | static void setParentWidget(QWidget *p) { | 118 | static void setParentWidget(QWidget *p) { | ||
119 | parent = p; | 119 | parent = p; | ||
120 | } | 120 | } | ||
121 | 121 | | |||
122 | Q_SIGNALS: | 122 | Q_SIGNALS: | ||
123 | void progress(int); | 123 | void progress(int); | ||
124 | void reportSignal(const QVariantMap&); | 124 | void reportSignal(const QVariantMap&); | ||
125 | 125 | | |||
126 | // remove above signals | ||||
127 | void newData(); | ||||
128 | | ||||
126 | public Q_SLOTS: | 129 | public Q_SLOTS: | ||
127 | void emitProgress(KJob*, unsigned long percent) { emit progress(percent); } | 130 | void emitProgress(KJob*, unsigned long percent) { emit progress(percent); } | ||
128 | void emitReport(const QVariantMap& report) { emit reportSignal(report); } | 131 | void emitReport(const QVariantMap& report) { emit reportSignal(report); } | ||
129 | 132 | | |||
133 | void emitNewData(int percent); | ||||
134 | void emitNewData(QString& message); | ||||
135 | | ||||
130 | private: | 136 | private: | ||
131 | void setExitCode(int i); | 137 | void setExitCode(int i); | ||
132 | // void onReadOutput(); | 138 | // void onReadOutput(); | ||
133 | 139 | | |||
134 | private: | 140 | private: | ||
135 | std::unique_ptr<ExternalCommandPrivate> d; | 141 | std::unique_ptr<ExternalCommandPrivate> d; | ||
136 | 142 | | |||
137 | // Use Polkit Authorization backend for authorizing actions | 143 | // Use Polkit Authorization backend for authorizing actions | ||
138 | static Auth::PolkitQt1Backend *m_authJob; | 144 | static Auth::PolkitQt1Backend *m_authJob; | ||
139 | static bool helperStarted; | 145 | static bool helperStarted; | ||
140 | static QWidget *parent; | 146 | static QWidget *parent; | ||
141 | }; | 147 | }; | ||
142 | 148 | | |||
143 | #endif // KPMCORE_EXTERNALCOMMAND_H | 149 | #endif // KPMCORE_EXTERNALCOMMAND_H |