mirror of
https://invent.kde.org/network/krfb
synced 2024-07-06 01:48:36 +00:00
use KConfig XT
svn path=/trunk/KDE/kdenetwork/krfb/; revision=651410
This commit is contained in:
parent
cb1280f2b7
commit
67cac2140a
|
@ -23,16 +23,19 @@ set(krfb_SRCS
|
||||||
connectioncontroller.cpp
|
connectioncontroller.cpp
|
||||||
events.cpp
|
events.cpp
|
||||||
framebuffer.cpp
|
framebuffer.cpp
|
||||||
# rfbcontroller.cc
|
|
||||||
# xupdatescanner.cc
|
|
||||||
)
|
)
|
||||||
|
|
||||||
kde4_automoc(${krfb_SRCS})
|
kde4_automoc(${krfb_SRCS})
|
||||||
|
|
||||||
|
kde4_add_kcfg_files(krfb_SRCS krfbconfig.kcfgc)
|
||||||
|
|
||||||
kde4_add_ui_files(krfb_SRCS connectionwidget.ui
|
kde4_add_ui_files(krfb_SRCS connectionwidget.ui
|
||||||
manageinvitations.ui
|
manageinvitations.ui
|
||||||
personalinvitewidget.ui
|
personalinvitewidget.ui
|
||||||
invitewidget.ui)
|
invitewidget.ui
|
||||||
|
configtcp.ui
|
||||||
|
configsecurity.ui
|
||||||
|
)
|
||||||
|
|
||||||
kde4_add_executable(krfb ${krfb_SRCS})
|
kde4_add_executable(krfb ${krfb_SRCS})
|
||||||
|
|
||||||
|
|
139
configsecurity.ui
Normal file
139
configsecurity.ui
Normal file
|
@ -0,0 +1,139 @@
|
||||||
|
<ui version="4.0" >
|
||||||
|
<class>Security</class>
|
||||||
|
<widget class="QWidget" name="Security" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>507</width>
|
||||||
|
<height>201</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle" >
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="kcfg_allowUninvitedConnections" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Allow uninvited connections</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="kcfg_allowDesktopControl" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Allow remote connections to control your desktop</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="kcfg_askOnConnect" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Ask before accepting an uninvited connection</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text" >
|
||||||
|
<string>Uninvited connections password</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>kcfg_uninvitedConnectionPassword</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="KLineEdit" name="kcfg_uninvitedConnectionPassword" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>KLineEdit</class>
|
||||||
|
<extends>QLineEdit</extends>
|
||||||
|
<header>klineedit.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>kcfg_allowUninvitedConnections</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>kcfg_askOnConnect</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>22</x>
|
||||||
|
<y>24</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>29</x>
|
||||||
|
<y>80</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>kcfg_allowUninvitedConnections</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>kcfg_uninvitedConnectionPassword</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>98</x>
|
||||||
|
<y>21</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>192</x>
|
||||||
|
<y>137</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>kcfg_allowUninvitedConnections</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>label</receiver>
|
||||||
|
<slot>setEnabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>117</x>
|
||||||
|
<y>20</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>120</x>
|
||||||
|
<y>94</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
90
configtcp.ui
Normal file
90
configtcp.ui
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
<ui version="4.0" >
|
||||||
|
<class>TCP</class>
|
||||||
|
<widget class="QWidget" name="TCP" >
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>169</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle" >
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" >
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="kcfg_useDefaultPort" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Use default port</string>
|
||||||
|
</property>
|
||||||
|
<property name="checked" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Listening Port:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy" >
|
||||||
|
<cstring>kcfg_port</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="kcfg_port" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maximum" >
|
||||||
|
<number>65535</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>kcfg_useDefaultPort</tabstop>
|
||||||
|
<tabstop>kcfg_port</tabstop>
|
||||||
|
</tabstops>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>kcfg_useDefaultPort</sender>
|
||||||
|
<signal>toggled(bool)</signal>
|
||||||
|
<receiver>kcfg_port</receiver>
|
||||||
|
<slot>setDisabled(bool)</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel" >
|
||||||
|
<x>120</x>
|
||||||
|
<y>53</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel" >
|
||||||
|
<x>277</x>
|
||||||
|
<y>122</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
</ui>
|
|
@ -28,6 +28,7 @@
|
||||||
#include "events.h"
|
#include "events.h"
|
||||||
#include "krfbserver.h"
|
#include "krfbserver.h"
|
||||||
|
|
||||||
|
#include "krfbconfig.h"
|
||||||
|
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
|
@ -73,24 +74,19 @@ ConnectionController::~ConnectionController()
|
||||||
enum rfbNewClientAction ConnectionController::handleNewClient()
|
enum rfbNewClientAction ConnectionController::handleNewClient()
|
||||||
{
|
{
|
||||||
|
|
||||||
KSharedConfigPtr conf = KGlobal::config();
|
bool allowDesktopControl = KrfbConfig::allowDesktopControl();
|
||||||
KConfigGroup srvconf(conf, "Server");
|
bool askOnConnect = KrfbConfig::askOnConnect();
|
||||||
|
|
||||||
bool allowDesktopControl = srvconf.readEntry("allowDesktopControl",false);
|
|
||||||
bool askOnConnect = srvconf.readEntry("askOnConnect",true);
|
|
||||||
|
|
||||||
int socket = cl->sock;
|
int socket = cl->sock;
|
||||||
// cl->negotiationFinishedHook = negotiationFinishedHook; ???
|
// cl->negotiationFinishedHook = negotiationFinishedHook; ???
|
||||||
|
QString remoteIp;
|
||||||
#if 0
|
#if 0
|
||||||
// TODO: this drops the connection >.<
|
// TODO: this drops the connection >.<
|
||||||
QTcpSocket t;
|
QTcpSocket t;
|
||||||
t.setSocketDescriptor(socket); //, QAbstractSocket::ConnectedState, QIODevice::NotOpen);
|
t.setSocketDescriptor(socket); //, QAbstractSocket::ConnectedState, QIODevice::NotOpen);
|
||||||
host = t.peerAddress().toString();
|
remoteIp = t.peerAddress().toString();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QString remoteIp;
|
|
||||||
|
|
||||||
if (!askOnConnect && InvitationManager::self()->invitations().size() == 0) {
|
if (!askOnConnect && InvitationManager::self()->invitations().size() == 0) {
|
||||||
KNotification::event("NewConnectionAutoAccepted",
|
KNotification::event("NewConnectionAutoAccepted",
|
||||||
i18n("Accepted uninvited connection from %1",
|
i18n("Accepted uninvited connection from %1",
|
||||||
|
@ -121,11 +117,8 @@ enum rfbNewClientAction ConnectionController::handleNewClient()
|
||||||
|
|
||||||
bool ConnectionController::handleCheckPassword(rfbClientPtr cl, const char *response, int len)
|
bool ConnectionController::handleCheckPassword(rfbClientPtr cl, const char *response, int len)
|
||||||
{
|
{
|
||||||
KSharedConfigPtr conf = KGlobal::config();
|
bool allowUninvited = KrfbConfig::allowUninvitedConnections();
|
||||||
KConfigGroup srvconf(conf, "Server");
|
QString password = KrfbConfig::uninvitedConnectionPassword();
|
||||||
|
|
||||||
bool allowUninvited = srvconf.readEntry("allowUninvitedConnections",false);
|
|
||||||
QString password = srvconf.readEntry("uninvitedConnectionPassword",QString());
|
|
||||||
|
|
||||||
bool authd = false;
|
bool authd = false;
|
||||||
kDebug() << "about to start autentication" << endl;
|
kDebug() << "about to start autentication" << endl;
|
||||||
|
@ -138,7 +131,7 @@ bool ConnectionController::handleCheckPassword(rfbClientPtr cl, const char *resp
|
||||||
QList<Invitation> invlist = InvitationManager::self()->invitations();
|
QList<Invitation> invlist = InvitationManager::self()->invitations();
|
||||||
|
|
||||||
foreach(Invitation it, invlist) {
|
foreach(Invitation it, invlist) {
|
||||||
kDebug() << "checking password????!?!?!" << endl;
|
kDebug() << "checking password" << endl;
|
||||||
if (checkPassword(it.password(), cl->authChallenge, response, len) && it.isValid()) {
|
if (checkPassword(it.password(), cl->authChallenge, response, len) && it.isValid()) {
|
||||||
authd = true;
|
authd = true;
|
||||||
//configuration->removeInvitation(it);
|
//configuration->removeInvitation(it);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>521</width>
|
<width>521</width>
|
||||||
<height>328</height>
|
<height>318</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap" >
|
<property name="wordWrap" >
|
||||||
<bool>false</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
|
@ -175,38 +175,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1" >
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType" >
|
|
||||||
<enum>QSizePolicy::Minimum</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>84</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" >
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType" >
|
|
||||||
<enum>QSizePolicy::Minimum</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>80</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11" />
|
<layoutdefault spacing="6" margin="11" />
|
||||||
|
|
|
@ -20,6 +20,9 @@ const int UPDATE_TIME = 500;
|
||||||
FrameBuffer::FrameBuffer(WId id, QObject *parent)
|
FrameBuffer::FrameBuffer(WId id, QObject *parent)
|
||||||
: QObject(parent), win(id)
|
: QObject(parent), win(id)
|
||||||
{
|
{
|
||||||
|
//TODO: implement reference counting to avoid update the screen
|
||||||
|
// while no client is connected.
|
||||||
|
|
||||||
fbImage = QPixmap::grabWindow(win).toImage();
|
fbImage = QPixmap::grabWindow(win).toImage();
|
||||||
fb = new char[fbImage.numBytes()];
|
fb = new char[fbImage.numBytes()];
|
||||||
QTimer *t = new QTimer(this);
|
QTimer *t = new QTimer(this);
|
||||||
|
|
33
krfb.kcfg
Normal file
33
krfb.kcfg
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE kcfg SYSTEM
|
||||||
|
"http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
|
||||||
|
<kcfg>
|
||||||
|
<kcfgfile />
|
||||||
|
<group name="TCP">
|
||||||
|
<entry name="useDefaultPort" type="Bool">
|
||||||
|
<label>Use the default port for VNC (5900)</label>
|
||||||
|
<default>true</default>
|
||||||
|
</entry>
|
||||||
|
<entry name="port" type="Int">
|
||||||
|
<label>This is the port on wich krfb will listen.</label>
|
||||||
|
<default>5900</default>
|
||||||
|
</entry>
|
||||||
|
</group>
|
||||||
|
<group name="Security">
|
||||||
|
<entry name="allowDesktopControl" type="Bool">
|
||||||
|
<label>Allow remote connections to manage the desktop.</label>
|
||||||
|
<default>true</default>
|
||||||
|
</entry>
|
||||||
|
<entry name="askOnConnect" type="Bool">
|
||||||
|
<label>Ask before allowing a remote connection.</label>
|
||||||
|
<default>true</default>
|
||||||
|
</entry>
|
||||||
|
<entry name="allowUninvitedConnections" type="Bool">
|
||||||
|
<label>Allow connections without an invitation.</label>
|
||||||
|
<default>false</default>
|
||||||
|
</entry>
|
||||||
|
<entry name="uninvitedConnectionPassword" type="String">
|
||||||
|
<label>Password for uninvited connections.</label>
|
||||||
|
</entry>
|
||||||
|
</group>
|
||||||
|
</kcfg>
|
3
krfbconfig.kcfgc
Normal file
3
krfbconfig.kcfgc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
File=krfb.kcfg
|
||||||
|
ClassName=KrfbConfig
|
||||||
|
Singleton=true
|
|
@ -20,7 +20,6 @@
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
|
|
||||||
#include <KConfig>
|
|
||||||
#include <KGlobal>
|
#include <KGlobal>
|
||||||
#include <KUser>
|
#include <KUser>
|
||||||
#include <KLocale>
|
#include <KLocale>
|
||||||
|
@ -29,6 +28,7 @@
|
||||||
|
|
||||||
#include "connectioncontroller.h"
|
#include "connectioncontroller.h"
|
||||||
#include "framebuffer.h"
|
#include "framebuffer.h"
|
||||||
|
#include "krfbconfig.h"
|
||||||
|
|
||||||
|
|
||||||
static const char* cur=
|
static const char* cur=
|
||||||
|
@ -109,8 +109,6 @@ static void clipboardHook(char* str,int len, rfbClientPtr cl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const int DEFAULT_TCP_PORT = 5900;
|
|
||||||
|
|
||||||
static KStaticDeleter<KrfbServer> sd;
|
static KStaticDeleter<KrfbServer> sd;
|
||||||
KrfbServer * KrfbServer::_self = 0;
|
KrfbServer * KrfbServer::_self = 0;
|
||||||
KrfbServer * KrfbServer::self() {
|
KrfbServer * KrfbServer::self() {
|
||||||
|
@ -130,10 +128,7 @@ void KrfbServer::startListening()
|
||||||
{
|
{
|
||||||
rfbScreenInfoPtr screen;
|
rfbScreenInfoPtr screen;
|
||||||
|
|
||||||
KSharedConfigPtr conf = KGlobal::config();
|
int port = KrfbConfig::port();
|
||||||
KConfigGroup tcpConfig(conf, "TCP");
|
|
||||||
|
|
||||||
int port = tcpConfig.readEntry("port",DEFAULT_TCP_PORT);
|
|
||||||
|
|
||||||
int w = fb->width();
|
int w = fb->width();
|
||||||
int h = fb->height();
|
int h = fb->height();
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "personalinvitedialog.h"
|
#include "personalinvitedialog.h"
|
||||||
#include "invitationmanager.h"
|
#include "invitationmanager.h"
|
||||||
#include "invitation.h"
|
#include "invitation.h"
|
||||||
|
#include "krfbconfig.h"
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QToolTip>
|
#include <QToolTip>
|
||||||
|
@ -23,6 +24,27 @@
|
||||||
#include <KIconLoader>
|
#include <KIconLoader>
|
||||||
#include <KLocale>
|
#include <KLocale>
|
||||||
#include <KGlobal>
|
#include <KGlobal>
|
||||||
|
#include <KConfigDialog>
|
||||||
|
|
||||||
|
// settings dialog
|
||||||
|
#include "ui_configtcp.h"
|
||||||
|
#include "ui_configsecurity.h"
|
||||||
|
|
||||||
|
class TCP: public QWidget, public Ui::TCP {
|
||||||
|
public:
|
||||||
|
TCP(QWidget *parent=0) :QWidget(parent)
|
||||||
|
{
|
||||||
|
setupUi(this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class Security: public QWidget, public Ui::Security {
|
||||||
|
public:
|
||||||
|
Security(QWidget *parent=0) :QWidget(parent)
|
||||||
|
{
|
||||||
|
setupUi(this);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
ManageInvitationsDialog::ManageInvitationsDialog(QWidget *parent)
|
ManageInvitationsDialog::ManageInvitationsDialog(QWidget *parent)
|
||||||
|
@ -48,6 +70,7 @@ ManageInvitationsDialog::ManageInvitationsDialog(QWidget *parent)
|
||||||
SLOT( inviteByMail() ));
|
SLOT( inviteByMail() ));
|
||||||
connect( InvitationManager::self(), SIGNAL( invitationNumChanged( int )),
|
connect( InvitationManager::self(), SIGNAL( invitationNumChanged( int )),
|
||||||
SLOT( reloadInvitations() ));
|
SLOT( reloadInvitations() ));
|
||||||
|
connect( this, SIGNAL(user1Clicked()),SLOT(showConfiguration()));
|
||||||
|
|
||||||
reloadInvitations();
|
reloadInvitations();
|
||||||
}
|
}
|
||||||
|
@ -95,3 +118,15 @@ void ManageInvitationsDialog::reloadInvitations()
|
||||||
invitationWidget->resizeColumnToContents(0);
|
invitationWidget->resizeColumnToContents(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ManageInvitationsDialog::showConfiguration()
|
||||||
|
{
|
||||||
|
if(KConfigDialog::showDialog("settings"))
|
||||||
|
return;
|
||||||
|
|
||||||
|
KConfigDialog *dialog = new KConfigDialog(this, "settings", KrfbConfig::self());
|
||||||
|
dialog->addPage(new TCP, i18n("Network"), "network");
|
||||||
|
dialog->addPage(new Security, i18n("Security"), "encrypted");
|
||||||
|
|
||||||
|
dialog->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@ public Q_SLOTS:
|
||||||
void inviteManually();
|
void inviteManually();
|
||||||
void inviteByMail();
|
void inviteByMail();
|
||||||
void reloadInvitations();
|
void reloadInvitations();
|
||||||
|
void showConfiguration();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user