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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
/*
SPDX-FileCopyrightText: 2008 Urs Wolfer <uwolfer@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "testviewfactory.h"
#include <KLocalizedString>
K_PLUGIN_CLASS_WITH_JSON(TestViewFactory, "krdc_test.json")
TestViewFactory::TestViewFactory(QObject *parent, const QVariantList &args)
: RemoteViewFactory(parent)
{
Q_UNUSED(args);
KLocalizedString::setApplicationDomain("krdc");
}
TestViewFactory::~TestViewFactory()
{
}
bool TestViewFactory::supportsUrl(const QUrl &url) const
{
return (url.scheme().compare(QLatin1String("test"), Qt::CaseInsensitive) == 0);
}
RemoteView *TestViewFactory::createView(QWidget *parent, const QUrl &url, KConfigGroup configGroup)
{
return new TestView(parent, url, configGroup);
}
HostPreferences *TestViewFactory::createHostPreferences(KConfigGroup configGroup, QWidget *parent)
{
Q_UNUSED(configGroup);
Q_UNUSED(parent);
return nullptr;
}
QString TestViewFactory::scheme() const
{
return QLatin1String("test");
}
QString TestViewFactory::connectActionText() const
{
return QLatin1String("New Test Connection..."); // no i18n required, just internal test plugin!
}
QString TestViewFactory::connectButtonText() const
{
return QLatin1String("KRDC Test Connection"); // no i18n required, just internal test plugin!
}
QString TestViewFactory::connectToolTipText() const
{
return QLatin1String("<html>Enter the address here. Port is optional.<br />"
"<i>Example: testserver (host)</i></html>"); // no i18n required, just internal test plugin!
}
#include "testviewfactory.moc"
|