File indexing completed on 2024-04-21 04:58:37
0001 /* 0002 SPDX-FileCopyrightText: 2008 Urs Wolfer <uwolfer@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "vncviewfactory.h" 0008 0009 #include <KPluginFactory> 0010 0011 K_PLUGIN_CLASS_WITH_JSON(VncViewFactory, "krdc_vnc.json") 0012 0013 VncViewFactory::VncViewFactory(QObject *parent, const QVariantList &args) 0014 : RemoteViewFactory(parent) 0015 { 0016 Q_UNUSED(args); 0017 0018 KLocalizedString::setApplicationDomain("krdc"); 0019 } 0020 0021 VncViewFactory::~VncViewFactory() 0022 { 0023 } 0024 0025 bool VncViewFactory::supportsUrl(const QUrl &url) const 0026 { 0027 return (url.scheme().compare(QLatin1String("vnc"), Qt::CaseInsensitive) == 0); 0028 } 0029 0030 RemoteView *VncViewFactory::createView(QWidget *parent, const QUrl &url, KConfigGroup configGroup) 0031 { 0032 return new VncView(parent, url, configGroup); 0033 } 0034 0035 HostPreferences *VncViewFactory::createHostPreferences(KConfigGroup configGroup, QWidget *parent) 0036 { 0037 return new VncHostPreferences(configGroup, parent); 0038 } 0039 0040 QString VncViewFactory::scheme() const 0041 { 0042 return QLatin1String("vnc"); 0043 } 0044 0045 QString VncViewFactory::connectActionText() const 0046 { 0047 return i18n("New VNC Connection..."); 0048 } 0049 0050 QString VncViewFactory::connectButtonText() const 0051 { 0052 return i18n("Connect to a VNC Remote Desktop"); 0053 } 0054 0055 QString VncViewFactory::connectToolTipText() const 0056 { 0057 return i18n( 0058 "<html>Enter the address here.<br />" 0059 "<i>Example: vncserver:1 (host:port / screen)</i></html>"); 0060 } 0061 0062 #include "vncviewfactory.moc"