wip: tmp: add: added ConnectionWidget

This commit is contained in:
Qv2ray-dev 2020-02-14 18:50:07 +08:00
parent 93e613df29
commit 3fceacd6ea
3 changed files with 119 additions and 0 deletions

View 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));
}

View 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

View 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>