style improve
This commit is contained in:
@@ -7,11 +7,7 @@
|
||||
ImageSwitch::ImageSwitch(QWidget* parent) : QWidget(parent)
|
||||
{
|
||||
isChecked = false;
|
||||
buttonStyle = ButtonStyle_2;
|
||||
|
||||
imgOffFile = ":/image/imageswitch/btncheckoff2.png";
|
||||
imgOnFile = ":/image/imageswitch/btncheckon2.png";
|
||||
imgFile = imgOffFile;
|
||||
setButtonStyle(ButtonStyle_1);
|
||||
}
|
||||
|
||||
void ImageSwitch::mousePressEvent(QMouseEvent*)
|
||||
@@ -19,7 +15,7 @@ void ImageSwitch::mousePressEvent(QMouseEvent*)
|
||||
imgFile = isChecked ? imgOffFile : imgOnFile;
|
||||
isChecked = !isChecked;
|
||||
this->update();
|
||||
emit clicked();
|
||||
emit clicked();
|
||||
}
|
||||
|
||||
void ImageSwitch::paintEvent(QPaintEvent*)
|
||||
@@ -48,12 +44,12 @@ ImageSwitch::ButtonStyle ImageSwitch::getButtonStyle() const
|
||||
|
||||
QSize ImageSwitch::sizeHint() const
|
||||
{
|
||||
return QSize(87, 28);
|
||||
return QSize(220, 64);
|
||||
}
|
||||
|
||||
QSize ImageSwitch::minimumSizeHint() const
|
||||
{
|
||||
return QSize(87, 28);
|
||||
return sizeHint();
|
||||
}
|
||||
|
||||
void ImageSwitch::setChecked(bool isChecked)
|
||||
@@ -73,17 +69,17 @@ void ImageSwitch::setButtonStyle(const ImageSwitch::ButtonStyle& buttonStyle)
|
||||
if (buttonStyle == ButtonStyle_1) {
|
||||
imgOffFile = ":/icons/imageswitch/btncheckoff1.png";
|
||||
imgOnFile = ":/icons/imageswitch/btncheckon1.png";
|
||||
this->resize(87, 28);
|
||||
this->resize(sizeHint());
|
||||
}
|
||||
else if (buttonStyle == ButtonStyle_2) {
|
||||
imgOffFile = ":/icons/imageswitch/btncheckoff2.png";
|
||||
imgOnFile = ":/icons/imageswitch/btncheckon2.png";
|
||||
this->resize(87, 28);
|
||||
this->resize(sizeHint());
|
||||
}
|
||||
else if (buttonStyle == ButtonStyle_3) {
|
||||
imgOffFile = ":/icons/imageswitch/btncheckoff3.png";
|
||||
imgOnFile = ":/icons/imageswitch/btncheckon3.png";
|
||||
this->resize(96, 38);
|
||||
this->resize(sizeHint());
|
||||
}
|
||||
|
||||
imgFile = isChecked ? imgOnFile : imgOffFile;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 9.4 KiB |
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>863</width>
|
||||
<height>678</height>
|
||||
<width>819</width>
|
||||
<height>662</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -20,18 +20,19 @@
|
||||
<string>Network Settings</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QTabWidget::pane {
|
||||
<string notr="true">
|
||||
QTabWidget::pane {
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
QTabBar::tab {
|
||||
font-size:30px;
|
||||
height:50px;
|
||||
width:150px;
|
||||
font-size:25px;
|
||||
height:40px;
|
||||
width:120px;
|
||||
background:#4d4d4d;
|
||||
border: 0px;
|
||||
border-top-left-radius: 20%;
|
||||
border-top-right-radius: 20%;
|
||||
border-top-left-radius: 0%;
|
||||
border-top-right-radius: 0%;
|
||||
border-bottom-left-radius:0%;
|
||||
border-bottom-right-radius:0%;
|
||||
padding: 2px;
|
||||
@@ -45,13 +46,23 @@ background: #505050;}</string>
|
||||
<item>
|
||||
<widget class="QWidget" name="formWidget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="title">
|
||||
<property name="text">
|
||||
<string>Network Setting</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>2</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@@ -420,25 +431,28 @@ background: #505050;}</string>
|
||||
<attribute name="title">
|
||||
<string>Result</string>
|
||||
</attribute>
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>20</y>
|
||||
<width>781</width>
|
||||
<height>541</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="output">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget_3" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="output">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -1 +1 @@
|
||||
*{background-color:#3c3c3c; color:white;margin:0;font-size:16px;}
|
||||
*{background-color:#3c3c3c; color:white;margin:0;font-size:16px;}
|
||||
@@ -600,6 +600,10 @@ parameters
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Network Setting</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>systemSettingForm</name>
|
||||
|
||||
@@ -600,6 +600,10 @@ parameters
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Network Setting</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>systemSettingForm</name>
|
||||
|
||||
Binary file not shown.
@@ -680,76 +680,81 @@ parameters
|
||||
<context>
|
||||
<name>networkCfgDialog</name>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="361"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="383"/>
|
||||
<source>Network Settings</source>
|
||||
<translation>网络配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="371"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="394"/>
|
||||
<source>Address</source>
|
||||
<translation>IP配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="362"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="385"/>
|
||||
<location filename="../network/networkcfgdialog.cpp" line="34"/>
|
||||
<source>IP Address</source>
|
||||
<translation>IP地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="363"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="384"/>
|
||||
<source>Network Setting</source>
|
||||
<translation type="unfinished">网络配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="386"/>
|
||||
<source>Dynamic Address</source>
|
||||
<translation>动态地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="364"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="387"/>
|
||||
<source>Dev</source>
|
||||
<translation>设备</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="366"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="389"/>
|
||||
<source>Subnet Mask</source>
|
||||
<translation>子网掩码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="367"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="390"/>
|
||||
<source>Additional Address</source>
|
||||
<translation>额外地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="368"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="375"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="391"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="398"/>
|
||||
<source>Add</source>
|
||||
<translation>新增</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="369"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="376"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="392"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="399"/>
|
||||
<source>Edit</source>
|
||||
<translation>编辑</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="370"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="377"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="393"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="400"/>
|
||||
<source>Delete</source>
|
||||
<translation>删除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="378"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="401"/>
|
||||
<source>Routing</source>
|
||||
<translation>路由配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="373"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="396"/>
|
||||
<source>Default IPv4 Gateway</source>
|
||||
<translation>默认网关</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="374"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="397"/>
|
||||
<source>Routing Table</source>
|
||||
<translation>路由表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="379"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="402"/>
|
||||
<source>Result</source>
|
||||
<translation>结果</translation>
|
||||
</message>
|
||||
|
||||
@@ -680,76 +680,81 @@ parameters
|
||||
<context>
|
||||
<name>networkCfgDialog</name>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="361"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="383"/>
|
||||
<source>Network Settings</source>
|
||||
<translation>网络配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="371"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="394"/>
|
||||
<source>Address</source>
|
||||
<translation>IP配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="362"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="385"/>
|
||||
<location filename="../network/networkcfgdialog.cpp" line="34"/>
|
||||
<source>IP Address</source>
|
||||
<translation>IP地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="363"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="384"/>
|
||||
<source>Network Setting</source>
|
||||
<translation type="unfinished">网络配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="386"/>
|
||||
<source>Dynamic Address</source>
|
||||
<translation>动态地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="364"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="387"/>
|
||||
<source>Dev</source>
|
||||
<translation>设备</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="366"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="389"/>
|
||||
<source>Subnet Mask</source>
|
||||
<translation>子网掩码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="367"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="390"/>
|
||||
<source>Additional Address</source>
|
||||
<translation>额外地址</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="368"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="375"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="391"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="398"/>
|
||||
<source>Add</source>
|
||||
<translation>新增</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="369"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="376"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="392"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="399"/>
|
||||
<source>Edit</source>
|
||||
<translation>编辑</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="370"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="377"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="393"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="400"/>
|
||||
<source>Delete</source>
|
||||
<translation>删除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="378"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="401"/>
|
||||
<source>Routing</source>
|
||||
<translation>路由配置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="373"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="396"/>
|
||||
<source>Default IPv4 Gateway</source>
|
||||
<translation>默认网关</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="374"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="397"/>
|
||||
<source>Routing Table</source>
|
||||
<translation>路由表</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="379"/>
|
||||
<location filename="../../out/build/x64-Debug/ui_networkcfgdialog.h" line="402"/>
|
||||
<source>Result</source>
|
||||
<translation>结果</translation>
|
||||
</message>
|
||||
|
||||
Reference in New Issue
Block a user