File indexing completed on 2024-04-28 05:36:02
0001 /* 0002 SPDX-FileCopyrightText: 2005 Jean-Remy Falleri <jr.falleri@laposte.net> 0003 SPDX-FileCopyrightText: 2005-2007 Kevin Ottens <ervin@kde.org> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only 0006 */ 0007 0008 #pragma once 0009 0010 #include <kdedmodule.h> 0011 #include <qwindowdefs.h> 0012 0013 #include <QMap> 0014 0015 class DeviceActionsDialog; 0016 class KPasswordDialog; 0017 class QWidget; 0018 0019 class SolidUiServer : public KDEDModule 0020 { 0021 Q_OBJECT 0022 Q_CLASSINFO("D-Bus Interface", "org.kde.SolidUiServer") 0023 0024 public: 0025 SolidUiServer(QObject *parent, const QList<QVariant> &); 0026 ~SolidUiServer() override; 0027 0028 public Q_SLOTS: 0029 Q_SCRIPTABLE void showPassphraseDialog(const QString &udi, const QString &returnService, const QString &returnObject, uint wId, const QString &appId); 0030 0031 private Q_SLOTS: 0032 void onPassphraseDialogCompleted(const QString &pass, bool keep); 0033 void onPassphraseDialogRejected(); 0034 0035 private: 0036 void reparentDialog(QWidget *dialog, WId wId, const QString &appId, bool modal); 0037 0038 QMap<QString, KPasswordDialog *> m_idToPassphraseDialog; 0039 };