Commit f1fe80f4 authored by Martin Klapetek's avatar Martin Klapetek

[lib] Add transientParent() wrapper around the transientParent property

parent b8f1fd7a
......@@ -35,6 +35,7 @@ target_link_libraries (kaccounts
KF5::CoreAddons
${ACCOUNTSQT_LIBRARIES}
Qt5::Xml
Qt5::Gui
PRIVATE
${SIGNONQT_LIBRARIES}
)
......
......@@ -21,6 +21,9 @@
#include "kaccountsuiplugin.h"
#include <QWindow>
#include <QVariant>
KAccountsUiPlugin::KAccountsUiPlugin(QObject *parent)
: QObject(parent)
{
......@@ -30,4 +33,9 @@ KAccountsUiPlugin::~KAccountsUiPlugin()
{
}
QWindow* KAccountsUiPlugin::transientParent() const
{
return property("transientParent").value<QWindow*>();
}
#include "moc_kaccountsuiplugin.cpp"
......@@ -26,6 +26,8 @@
#include <QObject>
class QWindow;
class KACCOUNTS_EXPORT KAccountsUiPlugin : public QObject
{
Q_OBJECT
......@@ -46,10 +48,12 @@ public:
* Sets the selected Accounts-SSO provider to the plugin
*/
virtual void setProviderName(const QString &providerName) = 0;
/**
* Called when the dialog for creating new account should show
*/
virtual void showNewAccountDialog() = 0;
/**
* Called when an existing account should be configured
* @param accountId The ID of the account that should be configured
......@@ -63,6 +67,8 @@ public:
*/
virtual QStringList supportedServicesForConfig() const = 0;
QWindow* transientParent() const;
Q_SIGNALS:
/**
* Sometimes the plugins might take time to initialize the UI
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment