mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 07:16:11 -05:00
added friend server control UI
This commit is contained in:
parent
5bfa77a0fe
commit
3f6503dfc3
41
retroshare-gui/src/gui/FriendServerControl.cpp
Normal file
41
retroshare-gui/src/gui/FriendServerControl.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
/*******************************************************************************
|
||||
* gui/FriendServer.cpp *
|
||||
* *
|
||||
* Copyright (c) 2021 Retroshare Team <retroshare.project@gmail.com> *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Affero General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Affero General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Affero General Public License *
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#include "FriendServerControl.h"
|
||||
//#include <retroshare/rsfriendserver.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
/** Constructor */
|
||||
FriendServerControl::FriendServerControl(QWidget *parent)
|
||||
{
|
||||
/* Invoke the Qt Designer generated object setup routine */
|
||||
setupUi(this);
|
||||
|
||||
// /* Hide Settings frame */
|
||||
// connect( ui.maxFriendLevelSB, SIGNAL(valueChanged(int)), this, SLOT(setMaxFriendLevel(int)));
|
||||
// connect( ui.edgeLengthSB, SIGNAL(valueChanged(int)), this, SLOT(setEdgeLength(int)));
|
||||
// connect( ui.freezeCheckBox, SIGNAL(toggled(bool)), this, SLOT(setFreezeState(bool)));
|
||||
// connect( ui.nameBox, SIGNAL(textChanged(QString)), this, SLOT(setNameSearch(QString)));
|
||||
}
|
||||
|
||||
FriendServerControl::~FriendServerControl()
|
||||
{
|
||||
}
|
34
retroshare-gui/src/gui/FriendServerControl.h
Normal file
34
retroshare-gui/src/gui/FriendServerControl.h
Normal file
@ -0,0 +1,34 @@
|
||||
/*******************************************************************************
|
||||
* gui/NetworkView.h *
|
||||
* *
|
||||
* Copyright (c) 2008 Robert Fernie <retroshare.project@gmail.com> *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Affero General Public License as *
|
||||
* published by the Free Software Foundation, either version 3 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Affero General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Affero General Public License *
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
*******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QGraphicsScene>
|
||||
|
||||
#include "ui_FriendServerControl.h"
|
||||
|
||||
class FriendServerControl : public QWidget, public Ui::FriendServerControl
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FriendServerControl(QWidget *parent = 0);
|
||||
virtual ~FriendServerControl();
|
||||
};
|
103
retroshare-gui/src/gui/FriendServerControl.ui
Normal file
103
retroshare-gui/src/gui/FriendServerControl.ui
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FriendServerControl</class>
|
||||
<widget class="QWidget" name="FriendServerControl">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>620</width>
|
||||
<height>499</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="torServerOnOff_CB">
|
||||
<property name="text">
|
||||
<string>On/Off</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Friends to request: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="torServerFriendsToRequest_SB">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Server onion address:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="torServerAddress_LE">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="torServerStatus_LB">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>380</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -44,6 +44,7 @@
|
||||
#include "NetworkView.h"
|
||||
#include "NetworkDialog.h"
|
||||
#include "gui/common/NewFriendList.h"
|
||||
#include "gui/FriendServerControl.h"
|
||||
#include "gui/Identity/IdDialog.h"
|
||||
/* Images for Newsfeed icons */
|
||||
//#define IMAGE_NEWSFEED ""
|
||||
@ -90,6 +91,7 @@ FriendsDialog::FriendsDialog(QWidget *parent) : MainPage(parent)
|
||||
ui.tabWidget->setTabPosition(QTabWidget::North);
|
||||
ui.tabWidget->addTab(networkView = new NetworkView(),QIcon(IMAGE_NETWORK2), tr("Network graph"));
|
||||
ui.tabWidget->addTab(networkDialog = new NetworkDialog(),QIcon(IMAGE_PEERS), tr("Keyring"));
|
||||
ui.tabWidget->addTab(friendServerControl = new FriendServerControl(),QIcon(IMAGE_PEERS), tr("Friend Server"));
|
||||
|
||||
ui.tabWidget->hideCloseButton(0);
|
||||
ui.tabWidget->hideCloseButton(1);
|
||||
|
@ -30,6 +30,7 @@ class NetworkDialog;
|
||||
class NetworkView;
|
||||
class IdDialog;
|
||||
class CirclesDialog;
|
||||
class FriendServerControl;
|
||||
|
||||
class FriendsDialog : public MainPage
|
||||
{
|
||||
@ -64,7 +65,8 @@ public:
|
||||
|
||||
NetworkDialog *networkDialog ;
|
||||
NetworkView *networkView ;
|
||||
|
||||
FriendServerControl *friendServerControl ;
|
||||
|
||||
IdDialog *idDialog;
|
||||
|
||||
private slots:
|
||||
|
@ -424,6 +424,7 @@ HEADERS += rshare.h \
|
||||
gui/AboutDialog.h \
|
||||
gui/AboutWidget.h \
|
||||
gui/NetworkView.h \
|
||||
gui/FriendServerControl.h \
|
||||
gui/FriendsDialog.h \
|
||||
gui/ServicePermissionDialog.h \
|
||||
gui/RemoteDirModel.h \
|
||||
@ -689,6 +690,7 @@ FORMS += gui/StartDialog.ui \
|
||||
gui/FileTransfer/BannedFilesDialog.ui \
|
||||
gui/MainWindow.ui \
|
||||
gui/NetworkView.ui \
|
||||
gui/FriendServerControl.ui \
|
||||
gui/FriendsDialog.ui \
|
||||
gui/ShareManager.ui \
|
||||
# gui/ShareDialog.ui \
|
||||
@ -809,6 +811,7 @@ SOURCES += main.cpp \
|
||||
gui/mainpagestack.cpp \
|
||||
gui/MainWindow.cpp \
|
||||
gui/NetworkView.cpp \
|
||||
gui/FriendServerControl.cpp \
|
||||
gui/FriendsDialog.cpp \
|
||||
gui/ServicePermissionDialog.cpp \
|
||||
gui/RemoteDirModel.cpp \
|
||||
|
Loading…
x
Reference in New Issue
Block a user