chore: remove unused AddClientDialog

This commit is contained in:
sithlord48 2025-10-27 18:59:10 -04:00 committed by Nick Bolton
parent 7b0d74aace
commit 1e0bd5822a
6 changed files with 0 additions and 308 deletions

View file

@ -69,9 +69,6 @@ add_library(${target} STATIC
dialogs/ActionDialog.cpp
dialogs/ActionDialog.h
dialogs/ActionDialog.ui
dialogs/AddClientDialog.cpp
dialogs/AddClientDialog.h
dialogs/AddClientDialog.ui
dialogs/FingerprintDialog.cpp
dialogs/FingerprintDialog.h
dialogs/HotkeyDialog.cpp

View file

@ -10,7 +10,6 @@
#include "Hotkey.h"
#include "common/Settings.h"
#include "dialogs/AddClientDialog.h"
#include <QAbstractButton>
#include <QMessageBox>

View file

@ -1,94 +0,0 @@
/*
* Deskflow -- mouse and keyboard sharing utility
* SPDX-FileCopyrightText: (C) 2014 - 2016 Symless Ltd.
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
*/
#include "AddClientDialog.h"
#include "ui_AddClientDialog.h"
#include <QLabel>
#include <QPushButton>
AddClientDialog::AddClientDialog(const QString &clientName, QWidget *parent)
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
ui{std::make_unique<Ui::AddClientDialog>()}
{
ui->setupUi(this);
ui->m_pLabelHead->setText(
"A client wants to connect. "
"Please choose a location for " +
clientName + "."
);
QIcon icon(":res/icons/64x64/video-display.png");
QSize IconSize(32, 32);
m_pButtonLeft = new QPushButton(this);
m_pButtonLeft->setIcon(icon);
m_pButtonLeft->setIconSize(IconSize);
ui->gridLayout->addWidget(m_pButtonLeft, 2, 0, 1, 1, Qt::AlignCenter);
connect(m_pButtonLeft, &QPushButton::clicked, this, &AddClientDialog::handleButtonLeft);
m_pButtonUp = new QPushButton(this);
m_pButtonUp->setIcon(icon);
m_pButtonUp->setIconSize(IconSize);
ui->gridLayout->addWidget(m_pButtonUp, 1, 1, 1, 1, Qt::AlignCenter);
connect(m_pButtonUp, &QPushButton::clicked, this, &AddClientDialog::handleButtonUp);
m_pButtonRight = new QPushButton(this);
m_pButtonRight->setIcon(icon);
m_pButtonRight->setIconSize(IconSize);
ui->gridLayout->addWidget(m_pButtonRight, 2, 2, 1, 1, Qt::AlignCenter);
connect(m_pButtonRight, &QPushButton::clicked, this, &AddClientDialog::handleButtonRight);
m_pButtonDown = new QPushButton(this);
m_pButtonDown->setIcon(icon);
m_pButtonDown->setIconSize(IconSize);
ui->gridLayout->addWidget(m_pButtonDown, 3, 1, 1, 1, Qt::AlignCenter);
connect(m_pButtonDown, &QPushButton::clicked, this, &AddClientDialog::handleButtonDown);
m_pLabelCenter = new QLabel(this);
m_pLabelCenter->setPixmap(QPixmap(":res/icons/64x64/video-display.png"));
ui->gridLayout->addWidget(m_pLabelCenter, 2, 1, 1, 1, Qt::AlignCenter);
#if defined(Q_OS_MAC)
ui->m_pDialogButtonBox->setLayoutDirection(Qt::RightToLeft);
#endif
const auto *advanced = ui->m_pDialogButtonBox->addButton(QStringLiteral("Advanced"), QDialogButtonBox::HelpRole);
connect(advanced, &QPushButton::clicked, this, &AddClientDialog::handleButtonAdvanced);
}
AddClientDialog::~AddClientDialog() = default;
void AddClientDialog::handleButtonLeft()
{
m_AddResult = AddAction::AddClientLeft;
close();
}
void AddClientDialog::handleButtonUp()
{
m_AddResult = AddAction::AddClientUp;
close();
}
void AddClientDialog::handleButtonRight()
{
m_AddResult = AddAction::AddClientRight;
close();
}
void AddClientDialog::handleButtonDown()
{
m_AddResult = AddAction::AddClientDown;
close();
}
void AddClientDialog::handleButtonAdvanced()
{
m_AddResult = AddAction::AddClientOther;
close();
}

View file

@ -1,55 +0,0 @@
/*
* Deskflow -- mouse and keyboard sharing utility
* SPDX-FileCopyrightText: (C) 2014 - 2016 Symless Ltd.
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
*/
#pragma once
#include <QDialog>
class QPushButton;
class QLabel;
namespace Ui {
class AddClientDialog;
}
enum class AddAction
{
AddClientRight,
AddClientLeft,
AddClientUp,
AddClientDown,
AddClientOther,
AddClientIgnore
};
class AddClientDialog : public QDialog
{
Q_OBJECT
public:
explicit AddClientDialog(const QString &clientName, QWidget *parent = nullptr);
~AddClientDialog() override;
AddAction addResult() const
{
return m_AddResult;
}
private Q_SLOTS:
void handleButtonLeft();
void handleButtonUp();
void handleButtonRight();
void handleButtonDown();
void handleButtonAdvanced();
private:
std::unique_ptr<Ui::AddClientDialog> ui;
QPushButton *m_pButtonLeft;
QPushButton *m_pButtonUp;
QPushButton *m_pButtonRight;
QPushButton *m_pButtonDown;
QLabel *m_pLabelCenter;
AddAction m_AddResult = AddAction::AddClientIgnore;
};

View file

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AddClientDialog</class>
<widget class="QDialog" name="AddClientDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>350</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QWidget" name="gridLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>381</width>
<height>301</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLabel" name="m_pLabelHead">
<property name="text">
<string notr="true">TextLabel</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<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>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>320</y>
<width>381</width>
<height>31</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="m_pCheckBoxIgnoreClient">
<property name="text">
<string>Ignore auto connect clients</string>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="m_pDialogButtonBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ignore</set>
</property>
<property name="centerButtons">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>m_pDialogButtonBox</sender>
<signal>accepted()</signal>
<receiver>AddClientDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>m_pDialogButtonBox</sender>
<signal>rejected()</signal>
<receiver>AddClientDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View file

@ -139,17 +139,6 @@ p, li { white-space: pre-wrap; }
<translation type="unfinished">Cambiar a </translation>
</message>
</context>
<context>
<name>AddClientDialog</name>
<message>
<source>Dialog</source>
<translation type="unfinished">Diálogo</translation>
</message>
<message>
<source>Ignore auto connect clients</source>
<translation type="unfinished">Ignorar clientes que se conectan automáticamente</translation>
</message>
</context>
<context>
<name>FingerprintDialog</name>
<message>