File: vncviewfactory.cpp

package info (click to toggle)
krdc 4%3A22.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,240 kB
  • sloc: cpp: 6,392; xml: 135; makefile: 8; sh: 5
file content (61 lines) | stat: -rw-r--r-- 1,412 bytes parent folder | download
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
/*
    SPDX-FileCopyrightText: 2008 Urs Wolfer <uwolfer@kde.org>

    SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "vncviewfactory.h"

#include <KPluginFactory>

K_PLUGIN_CLASS_WITH_JSON(VncViewFactory, "krdc_vnc.json")

VncViewFactory::VncViewFactory(QObject *parent, const QVariantList &args)
        : RemoteViewFactory(parent)
{
    Q_UNUSED(args);

    KLocalizedString::setApplicationDomain("krdc");
}

VncViewFactory::~VncViewFactory()
{
}

bool VncViewFactory::supportsUrl(const QUrl &url) const
{
    return (url.scheme().compare(QLatin1String("vnc"), Qt::CaseInsensitive) == 0);
}

RemoteView *VncViewFactory::createView(QWidget *parent, const QUrl &url, KConfigGroup configGroup)
{
    return new VncView(parent, url, configGroup);
}

HostPreferences *VncViewFactory::createHostPreferences(KConfigGroup configGroup, QWidget *parent)
{
    return new VncHostPreferences(configGroup, parent);
}

QString VncViewFactory::scheme() const
{
    return QLatin1String("vnc");
}

QString VncViewFactory::connectActionText() const
{
    return i18n("New VNC Connection...");
}

QString VncViewFactory::connectButtonText() const
{
    return i18n("Connect to a VNC Remote Desktop");
}

QString VncViewFactory::connectToolTipText() const
{
    return i18n("<html>Enter the address here.<br />"
                "<i>Example: vncserver:1 (host:port / screen)</i></html>");
}

#include "vncviewfactory.moc"