mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 02:40:20 +08:00
wip: tmp: add: added ConnectionWidget
This commit is contained in:
parent
93e613df29
commit
3fceacd6ea
21
src/ui/widgets/ConnectionWidget.cpp
Normal file
21
src/ui/widgets/ConnectionWidget.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "formwidget.h"
|
||||
#include "QMessageBox"
|
||||
#include "ui_formwidget.h"
|
||||
|
||||
Formwidget::Formwidget(int id, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::Formwidget)
|
||||
{
|
||||
_id = id;
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
Formwidget::~Formwidget()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void Formwidget::on_pushButton_clicked()
|
||||
{
|
||||
QMessageBox::information(this, "d", QString::number(_id));
|
||||
}
|
27
src/ui/widgets/ConnectionWidget.hpp
Normal file
27
src/ui/widgets/ConnectionWidget.hpp
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef FORMWIDGET_H
|
||||
#define FORMWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class Formwidget;
|
||||
}
|
||||
|
||||
class Formwidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Formwidget(int id, QWidget *parent = nullptr);
|
||||
~Formwidget();
|
||||
|
||||
private slots:
|
||||
void on_pushButton_clicked();
|
||||
|
||||
private:
|
||||
int _id;
|
||||
Ui::Formwidget *ui;
|
||||
};
|
||||
|
||||
#endif // FORMWIDGET_H
|
71
src/ui/widgets/ConnectionWidget.ui
Normal file
71
src/ui/widgets/ConnectionWidget.ui
Normal file
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Formwidget</class>
|
||||
<widget class="QWidget" name="Formwidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>474</width>
|
||||
<height>83</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" columnstretch="1,0">
|
||||
<item row="0" column="0" rowspan="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Connection Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Latency</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="text">
|
||||
<string>Ping</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in New Issue
Block a user