add: added MainWindow items folding

This commit is contained in:
Qv2ray-dev 2020-03-03 22:39:20 +08:00
parent 9d05be94b6
commit 86193ee0b7
3 changed files with 100 additions and 68 deletions

View File

@ -1 +1 @@
4390 4395

View File

@ -389,6 +389,10 @@ namespace Qv2ray::core::handlers
} }
CONFIGROOT root = GetConnectionRoot(connections[id].groupId, id); CONFIGROOT root = GetConnectionRoot(connections[id].groupId, id);
if (IsComplexConfig(root))
{
return tr("Complex config");
}
QStringList protocols; QStringList protocols;
QStringList streamProtocols; QStringList streamProtocols;
auto outbound = root["outbounds"].toArray().first().toObject(); auto outbound = root["outbounds"].toArray().first().toObject();
@ -648,10 +652,10 @@ namespace Qv2ray::core::handlers
LOG(MODULE_CORE_HANDLER, "Removing: " + conn.toString()) LOG(MODULE_CORE_HANDLER, "Removing: " + conn.toString())
DeleteConnection(conn); DeleteConnection(conn);
} }
// Update the time // Update the time
groups[id].lastUpdated = system_clock::to_time_t(system_clock::now()); groups[id].lastUpdated = system_clock::to_time_t(system_clock::now());
return hasErrorOccured; return hasErrorOccured;
} }

View File

@ -242,7 +242,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>480</width> <width>480</width>
<height>768</height> <height>551</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
@ -285,18 +285,6 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="label_9">
<property name="font">
<font>
<pointsize>13</pointsize>
</font>
</property>
<property name="text">
<string>Speed Graph</string>
</property>
</widget>
</item>
<item> <item>
<widget class="Line" name="line"> <widget class="Line" name="line">
<property name="orientation"> <property name="orientation">
@ -305,39 +293,104 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QWidget" name="widget" native="true"> <widget class="QToolBox" name="toolBox">
<property name="minimumSize">
<size>
<width>0</width>
<height>200</height>
</size>
</property>
<layout class="QGridLayout" name="speedChart">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="label_10">
<property name="font"> <property name="font">
<font> <font>
<pointsize>13</pointsize> <pointsize>13</pointsize>
</font> </font>
</property> </property>
<property name="text"> <property name="currentIndex">
<string>Log</string> <number>1</number>
</property> </property>
<widget class="QWidget" name="page">
<property name="geometry">
<rect>
<x>0</x>
<y>-9</y>
<width>450</width>
<height>218</height>
</rect>
</property>
<attribute name="label">
<string>Speed Graph</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QWidget" name="widget" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>200</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<layout class="QGridLayout" name="speedChart">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2">
<property name="geometry">
<rect>
<x>0</x>
<y>-45</y>
<width>450</width>
<height>254</height>
</rect>
</property>
<attribute name="label">
<string>Log</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QTextBrowser" name="masterLogBrowser">
<property name="minimumSize">
<size>
<width>0</width>
<height>200</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clearlogButton">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>Clear Log</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item> <item>
@ -347,31 +400,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QTextBrowser" name="masterLogBrowser">
<property name="minimumSize">
<size>
<width>0</width>
<height>200</height>
</size>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
</font>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clearlogButton">
<property name="text">
<string>Clear Log</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>