mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-19 18:30:34 +08:00
add: added toggle visibility of chart and log box in MainWindow
This commit is contained in:
parent
557f027f74
commit
a2a95dfb5b
@ -1 +1 @@
|
|||||||
4540
|
4560
|
||||||
|
@ -910,3 +910,18 @@ void MainWindow::on_connectionListWidget_itemSelectionChanged()
|
|||||||
connectionListWidget->setFocus();
|
connectionListWidget->setFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_chartVisibilityBtn_clicked()
|
||||||
|
{
|
||||||
|
speedChartHolderWidget->setVisible(!speedChartWidget->isVisible());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_logVisibilityBtn_clicked()
|
||||||
|
{
|
||||||
|
masterLogBrowser->setVisible(!masterLogBrowser->isVisible());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_clearChartBtn_clicked()
|
||||||
|
{
|
||||||
|
speedChartWidget->Clear();
|
||||||
|
}
|
||||||
|
@ -99,6 +99,12 @@ class MainWindow
|
|||||||
|
|
||||||
void on_connectionListWidget_itemSelectionChanged();
|
void on_connectionListWidget_itemSelectionChanged();
|
||||||
|
|
||||||
|
void on_chartVisibilityBtn_clicked();
|
||||||
|
|
||||||
|
void on_logVisibilityBtn_clicked();
|
||||||
|
|
||||||
|
void on_clearChartBtn_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QHash<GroupId, shared_ptr<QTreeWidgetItem>> groupNodes;
|
QHash<GroupId, shared_ptr<QTreeWidgetItem>> groupNodes;
|
||||||
QHash<ConnectionId, shared_ptr<QTreeWidgetItem>> connectionNodes;
|
QHash<ConnectionId, shared_ptr<QTreeWidgetItem>> connectionNodes;
|
||||||
|
@ -19,6 +19,9 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Qv2ray</string>
|
<string>Qv2ray</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Click to toggle show/hide</string>
|
||||||
|
</property>
|
||||||
<widget class="QWidget" name="centralWidget">
|
<widget class="QWidget" name="centralWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
@ -137,7 +140,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Import connection</string>
|
<string>Import Connection</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Add</string>
|
<string>Add</string>
|
||||||
@ -167,6 +170,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QToolButton" name="sortBtn">
|
<widget class="QToolButton" name="sortBtn">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Sort</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
@ -240,9 +246,9 @@
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>-19</y>
|
<y>-194</y>
|
||||||
<width>480</width>
|
<width>480</width>
|
||||||
<height>743</height>
|
<height>752</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
@ -279,33 +285,53 @@
|
|||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_9">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="chartVisibilityBtn">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>13</pointsize>
|
<pointsize>13</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Click to toggle show/hide</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">Text-align:left;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string> Speed Graph</string>
|
<string> Speed Graph</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="flat">
|
||||||
</item>
|
<bool>true</bool>
|
||||||
<item>
|
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QToolButton" name="clearChartBtn">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Clear chart data</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../resources.qrc">
|
||||||
|
<normaloff>:/assets/icons/ui_light/delete.png</normaloff>:/assets/icons/ui_light/delete.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="speedChartHolderWidget" native="true">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
@ -313,9 +339,6 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="speedChart">
|
<layout class="QGridLayout" name="speedChart">
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -329,36 +352,50 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="1,0">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_10">
|
<widget class="QPushButton" name="logVisibilityBtn">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>13</pointsize>
|
<pointsize>13</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">Text-align:left;</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string> Log</string>
|
<string> Log</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="clearlogButton">
|
<widget class="QToolButton" name="clearlogButton">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Clear log</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Clear Log</string>
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../../resources.qrc">
|
||||||
|
<normaloff>:/assets/icons/ui_light/delete.png</normaloff>:/assets/icons/ui_light/delete.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="orientation">
|
<property name="leftMargin">
|
||||||
<enum>Qt::Horizontal</enum>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<item row="0" column="0">
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QTextBrowser" name="masterLogBrowser">
|
<widget class="QTextBrowser" name="masterLogBrowser">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@ -377,6 +414,24 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@ -384,10 +439,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>4</number>
|
<number>2</number>
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="connetionStatusLabel">
|
<widget class="QLabel" name="connetionStatusLabel">
|
||||||
@ -451,6 +503,9 @@
|
|||||||
<pointsize>8</pointsize>
|
<pointsize>8</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Upload/Download speed</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>0.00 B/s
|
<string>0.00 B/s
|
||||||
0.00 B/s</string>
|
0.00 B/s</string>
|
||||||
@ -505,6 +560,9 @@
|
|||||||
<pointsize>8</pointsize>
|
<pointsize>8</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Upload/Download Data</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>0.00 B
|
<string>0.00 B
|
||||||
0.00 B</string>
|
0.00 B</string>
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
Loading…
Reference in New Issue
Block a user