Skip to content

Commit fe017e0

Browse files
committed
Plugins::FreeRDP: modify settings dialog
1 parent 3b2818d commit fe017e0

9 files changed

Lines changed: 55 additions & 48 deletions

File tree

Plugins/FreeRDP/Client/DlgSetFreeRDP.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ CDlgSetFreeRDP::~CDlgSetFreeRDP()
235235
}
236236

237237
// [Check validity and accept]
238-
void CDlgSetFreeRDP::on_pbOk_clicked()
238+
void CDlgSetFreeRDP::accept()
239239
{
240240
int nRet = 0;
241241

@@ -367,15 +367,10 @@ void CDlgSetFreeRDP::on_pbOk_clicked()
367367
performanceFlags |= PERF_ENABLE_DESKTOP_COMPOSITION;
368368
m_pSettings->SetPerformanceFlags(performanceFlags);
369369

370-
accept();
370+
QDialog::accept();
371371
}
372372
// [Check validity and accept]
373373

374-
void CDlgSetFreeRDP::on_pbCancel_clicked()
375-
{
376-
reject();
377-
}
378-
379374
void CDlgSetFreeRDP::on_rbLocalScreen_clicked(bool checked)
380375
{
381376
if(!checked) return;

Plugins/FreeRDP/Client/DlgSetFreeRDP.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class CDlgSetFreeRDP : public QDialog
2525
explicit CDlgSetFreeRDP(CParameterFreeRDP* pSettings, QWidget *parent = nullptr);
2626
~CDlgSetFreeRDP();
2727

28-
private slots:
29-
void on_pbOk_clicked();
28+
public Q_SLOTS:
29+
// QDialog interface
30+
virtual void accept() override;
3031
void on_pbCancel_clicked();
3132
void on_rbLocalScreen_clicked(bool checked);
3233

Plugins/FreeRDP/Client/DlgSetFreeRDP.ui

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -615,35 +615,14 @@
615615
</widget>
616616
</item>
617617
<item row="1" column="0">
618-
<layout class="QHBoxLayout" name="horizontalLayout_4">
619-
<item>
620-
<spacer name="horizontalSpacer">
621-
<property name="orientation">
622-
<enum>Qt::Orientation::Horizontal</enum>
623-
</property>
624-
<property name="sizeHint" stdset="0">
625-
<size>
626-
<width>20</width>
627-
<height>20</height>
628-
</size>
629-
</property>
630-
</spacer>
631-
</item>
632-
<item>
633-
<widget class="QPushButton" name="pbOk">
634-
<property name="text">
635-
<string>OK(&amp;O)</string>
636-
</property>
637-
</widget>
638-
</item>
639-
<item>
640-
<widget class="QPushButton" name="pbCancel">
641-
<property name="text">
642-
<string>Cancel(&amp;C)</string>
643-
</property>
644-
</widget>
645-
</item>
646-
</layout>
618+
<widget class="QDialogButtonBox" name="buttonBox">
619+
<property name="orientation">
620+
<enum>Qt::Orientation::Horizontal</enum>
621+
</property>
622+
<property name="standardButtons">
623+
<set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set>
624+
</property>
625+
</widget>
647626
</item>
648627
</layout>
649628
</widget>
@@ -668,5 +647,38 @@
668647
<tabstop>tabWidget</tabstop>
669648
</tabstops>
670649
<resources/>
671-
<connections/>
650+
<connections>
651+
<connection>
652+
<sender>buttonBox</sender>
653+
<signal>accepted()</signal>
654+
<receiver>CDlgSetFreeRDP</receiver>
655+
<slot>accept()</slot>
656+
<hints>
657+
<hint type="sourcelabel">
658+
<x>248</x>
659+
<y>254</y>
660+
</hint>
661+
<hint type="destinationlabel">
662+
<x>157</x>
663+
<y>274</y>
664+
</hint>
665+
</hints>
666+
</connection>
667+
<connection>
668+
<sender>buttonBox</sender>
669+
<signal>rejected()</signal>
670+
<receiver>CDlgSetFreeRDP</receiver>
671+
<slot>reject()</slot>
672+
<hints>
673+
<hint type="sourcelabel">
674+
<x>316</x>
675+
<y>260</y>
676+
</hint>
677+
<hint type="destinationlabel">
678+
<x>286</x>
679+
<y>274</y>
680+
</hint>
681+
</hints>
682+
</connection>
683+
</connections>
672684
</ui>

Plugins/FreeRDP/Client/ParameterFreeRDP.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#ifndef CPARAMETERFREERDP_H
2-
#define CPARAMETERFREERDP_H
1+
// Author: Kang Lin <kl222@126.com>
2+
3+
#pragma once
34

45
#include "ParameterDesktop.h"
56
#include "ParameterProxy.h"
@@ -131,5 +132,3 @@ class CParameterFreeRDP : public CParameterDesktop
131132
UINT32 m_ConnectType;
132133
UINT32 m_PerformanceFlags;
133134
};
134-
135-
#endif // CPARAMETERFREERDP_H

Plugins/LibVNCServer/Client/DlgSettingsLibVnc.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>600</width>
10-
<height>400</height>
10+
<height>450</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">

Plugins/Template/Desktop/DlgSettingsTemplateDesktop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class CDlgSettingsTemplateDesktop : public QDialog
1515

1616
public:
1717
explicit CDlgSettingsTemplateDesktop(CParameterTemplateDesktop* pPara,
18-
QWidget *parent = nullptr);
18+
QWidget *parent = nullptr);
1919
virtual ~CDlgSettingsTemplateDesktop();
2020

2121
// QDialog interface

Plugins/Template/Desktop/ParameterTemplateDesktop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class CParameterTemplateDesktop : public CParameterDesktop
88
Q_OBJECT
99
public:
1010
explicit CParameterTemplateDesktop(CParameterOperate *parent = nullptr,
11-
const QString& szPrefix = QString());
11+
const QString& szPrefix = QString());
1212

1313
// CParameter interface
1414
protected:

Plugins/Template/QtEvent/ParameterTemplateQtEvent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class CParameterTemplateQtEvent : public CParameterOperate
88
Q_OBJECT
99
public:
1010
explicit CParameterTemplateQtEvent(QObject *parent = nullptr,
11-
const QString& szPrefix = QString());
11+
const QString& szPrefix = QString());
1212

1313
// CParameter interface
1414
protected:

Plugins/Template/Server/ParameterTemplateServer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class CParameterTemplateServer : public CParameterServer
88
Q_OBJECT
99
public:
1010
explicit CParameterTemplateServer(QObject *parent = nullptr,
11-
const QString& szPrefix = QString());
11+
const QString& szPrefix = QString());
1212

1313
protected:
1414
virtual int OnLoad(QSettings &set) override;

0 commit comments

Comments
 (0)