Skip to content

Commit 3c2ebed

Browse files
vkconfig: Add diagnostics search
1 parent 131c5ff commit 3c2ebed

27 files changed

+288
-5
lines changed

vkconfig_core/configurator.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,14 @@ bool Configurator::Load() {
883883

884884
this->use_system_tray = json_object.value("use_system_tray").toBool();
885885

886+
if (json_object.value("show_diagnostic_search") != QJsonValue::Undefined) {
887+
this->show_diagnostic_search = json_object.value("show_diagnostic_search").toBool();
888+
}
889+
890+
if (json_object.value("diagnostic_search_text") != QJsonValue::Undefined) {
891+
this->diagnostic_search_text = json_object.value("diagnostic_search_text").toString().toStdString();
892+
}
893+
886894
if (json_object.value("VULKAN_HOME") != QJsonValue::Undefined) {
887895
::SetHomePath(json_object.value("VULKAN_HOME").toString().toStdString());
888896
}
@@ -939,6 +947,8 @@ bool Configurator::Save() const {
939947
json_object.insert("use_notify_releases", this->use_notify_releases);
940948
json_object.insert("latest_sdk_version", this->latest_sdk_version.str().c_str());
941949
json_object.insert("last_vkconfig_version", Version::VKCONFIG.str().c_str());
950+
json_object.insert("show_diagnostic_search", this->show_diagnostic_search);
951+
json_object.insert("diagnostic_search_text", this->diagnostic_search_text.c_str());
942952
json_object.insert("VULKAN_HOME", ::Path(Path::HOME).RelativePath().c_str());
943953
json_object.insert("VULKAN_DOWNLOAD", ::Path(Path::DOWNLOAD).RelativePath().c_str());
944954
json_interface_object.insert(GetToken(TAB_PREFERENCES), json_object);
@@ -1004,6 +1014,10 @@ bool Configurator::GetUseNotifyReleases() const { return this->use_notify_releas
10041014

10051015
void Configurator::SetUseNotifyReleases(bool enabled) { this->use_notify_releases = enabled; }
10061016

1017+
bool Configurator::GetShowDiagnosticSearch() const { return show_diagnostic_search; }
1018+
1019+
void Configurator::SetShowDiagnosticSearch(bool enabled) { this->show_diagnostic_search = enabled; }
1020+
10071021
bool Configurator::ShouldNotify() const {
10081022
return this->latest_sdk_version < this->online_sdk_version && this->online_sdk_version != Version::NONE &&
10091023
!(Version::VKCONFIG > this->last_vkconfig_version);

vkconfig_core/configurator.h

+5
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ class Configurator {
113113
bool GetUseNotifyReleases() const;
114114
void SetUseNotifyReleases(bool enabled);
115115

116+
bool GetShowDiagnosticSearch() const;
117+
void SetShowDiagnosticSearch(bool enabled);
118+
116119
bool ShouldNotify() const;
117120

118121
bool HasActiveSettings() const;
@@ -149,12 +152,14 @@ class Configurator {
149152
Version latest_sdk_version = Version::NONE;
150153
Version online_sdk_version = Version::NONE;
151154
Version last_vkconfig_version = Version::NONE;
155+
std::string diagnostic_search_text;
152156

153157
private:
154158
int hide_message_boxes_flags = 0;
155159
bool use_system_tray = false;
156160
bool use_layer_dev_mode = false;
157161
bool use_notify_releases = true;
162+
bool show_diagnostic_search = false;
158163
ExecutableScope executable_scope = EXECUTABLE_ANY;
159164
std::string selected_global_configuration = "Validation";
160165
};

vkconfig_gui/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[Vulkan SDK 1.4.3XX.0](https://github.com/LunarG/VulkanTools/tree/main)
33

44
### Features:
5-
5+
- Add search in diagnostic tab
66

77
### Improvements:
88

vkconfig_gui/mainwindow.ui

+123-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>1200</width>
9+
<width>1024</width>
1010
<height>640</height>
1111
</rect>
1212
</property>
@@ -85,7 +85,7 @@
8585
<enum>QTabWidget::TabShape::Rounded</enum>
8686
</property>
8787
<property name="currentIndex">
88-
<number>5</number>
88+
<number>3</number>
8989
</property>
9090
<widget class="QWidget" name="tab_configurations">
9191
<attribute name="title">
@@ -1588,6 +1588,127 @@
15881588
<property name="bottomMargin">
15891589
<number>5</number>
15901590
</property>
1591+
<item>
1592+
<layout class="QHBoxLayout" name="diagnostic_search_layout">
1593+
<property name="spacing">
1594+
<number>0</number>
1595+
</property>
1596+
<property name="topMargin">
1597+
<number>0</number>
1598+
</property>
1599+
<property name="bottomMargin">
1600+
<number>0</number>
1601+
</property>
1602+
<item>
1603+
<widget class="QLineEdit" name="diagnostic_search_edit"/>
1604+
</item>
1605+
<item>
1606+
<widget class="QPushButton" name="diagnostic_search_next">
1607+
<property name="maximumSize">
1608+
<size>
1609+
<width>32</width>
1610+
<height>16777215</height>
1611+
</size>
1612+
</property>
1613+
<property name="toolTip">
1614+
<string>Find Next (F3)</string>
1615+
</property>
1616+
<property name="text">
1617+
<string/>
1618+
</property>
1619+
<property name="shortcut">
1620+
<string>F3</string>
1621+
</property>
1622+
</widget>
1623+
</item>
1624+
<item>
1625+
<widget class="QPushButton" name="diagnostic_search_prev">
1626+
<property name="maximumSize">
1627+
<size>
1628+
<width>32</width>
1629+
<height>16777215</height>
1630+
</size>
1631+
</property>
1632+
<property name="toolTip">
1633+
<string>Find Previous (Shift+F3)</string>
1634+
</property>
1635+
<property name="text">
1636+
<string/>
1637+
</property>
1638+
<property name="shortcut">
1639+
<string>Shift+F3</string>
1640+
</property>
1641+
</widget>
1642+
</item>
1643+
<item>
1644+
<widget class="QPushButton" name="diagnostic_search_case">
1645+
<property name="maximumSize">
1646+
<size>
1647+
<width>32</width>
1648+
<height>16777215</height>
1649+
</size>
1650+
</property>
1651+
<property name="text">
1652+
<string/>
1653+
</property>
1654+
<property name="checkable">
1655+
<bool>true</bool>
1656+
</property>
1657+
</widget>
1658+
</item>
1659+
<item>
1660+
<widget class="QPushButton" name="diagnostic_search_whole">
1661+
<property name="maximumSize">
1662+
<size>
1663+
<width>32</width>
1664+
<height>16777215</height>
1665+
</size>
1666+
</property>
1667+
<property name="text">
1668+
<string/>
1669+
</property>
1670+
<property name="checkable">
1671+
<bool>true</bool>
1672+
</property>
1673+
</widget>
1674+
</item>
1675+
<item>
1676+
<widget class="QPushButton" name="diagnostic_search_regex">
1677+
<property name="maximumSize">
1678+
<size>
1679+
<width>32</width>
1680+
<height>16777215</height>
1681+
</size>
1682+
</property>
1683+
<property name="text">
1684+
<string/>
1685+
</property>
1686+
<property name="checkable">
1687+
<bool>true</bool>
1688+
</property>
1689+
<property name="checked">
1690+
<bool>false</bool>
1691+
</property>
1692+
</widget>
1693+
</item>
1694+
<item>
1695+
<widget class="QPushButton" name="diagnostic_search_hide">
1696+
<property name="maximumSize">
1697+
<size>
1698+
<width>32</width>
1699+
<height>16777215</height>
1700+
</size>
1701+
</property>
1702+
<property name="toolTip">
1703+
<string>Hide search field</string>
1704+
</property>
1705+
<property name="text">
1706+
<string/>
1707+
</property>
1708+
</widget>
1709+
</item>
1710+
</layout>
1711+
</item>
15911712
<item>
15921713
<widget class="QTextEdit" name="diagnostic_status_text">
15931714
<property name="font">
657 Bytes
Loading
947 Bytes
Loading
800 Bytes
Loading
824 Bytes
Loading
1.57 KB
Loading
669 Bytes
Loading
1.47 KB
Loading
588 Bytes
Loading
756 Bytes
Loading
608 Bytes
Loading
621 Bytes
Loading
1.17 KB
Loading
548 Bytes
Loading
Loading

vkconfig_gui/resources.qrc

+16
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010

1111
<file>resourcefiles/dark/clear.png</file>
1212
<file>resourcefiles/dark/drag.png</file>
13+
<file>resourcefiles/dark/next.png</file>
14+
<file>resourcefiles/dark/prev.png</file>
15+
<file>resourcefiles/dark/down.png</file>
16+
<file>resourcefiles/dark/exit.png</file>
17+
18+
<file>resourcefiles/dark/search_case.png</file>
19+
<file>resourcefiles/dark/search_whole.png</file>
20+
<file>resourcefiles/dark/search_regex.png</file>
1321

1422
<file>resourcefiles/dark/file_export.png</file>
1523
<file>resourcefiles/dark/file_search.png</file>
@@ -38,6 +46,14 @@
3846

3947
<file>resourcefiles/light/clear.png</file>
4048
<file>resourcefiles/light/drag.png</file>
49+
<file>resourcefiles/light/next.png</file>
50+
<file>resourcefiles/light/prev.png</file>
51+
<file>resourcefiles/light/down.png</file>
52+
<file>resourcefiles/light/exit.png</file>
53+
54+
<file>resourcefiles/light/search_case.png</file>
55+
<file>resourcefiles/light/search_whole.png</file>
56+
<file>resourcefiles/light/search_regex.png</file>
4157

4258
<file>resourcefiles/light/file_export.png</file>
4359
<file>resourcefiles/light/file_search.png</file>

vkconfig_gui/source/arrow.pdn

20.7 KB
Binary file not shown.
Loading
18.2 KB
Loading
24.5 KB
Loading

vkconfig_gui/style.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ QIcon Get(Icon icon) {
3838
static const char* ICONS[] = {
3939
"clear.png", // ICON_CLEAR
4040
"drag.png", // ICON_DRAG
41+
"next.png", // ICON_NEXT
42+
"prev.png", // ICON_PREV
43+
"down.png", // ICON_MODE
44+
"exit.png", // ICON_EXIT
45+
"search_case.png", // ICON_SEARCH_CASE
46+
"search_whole.png", // ICON_SEARCH_WHOLE
47+
"search_regex.png", // ICON_SEARCH_REGEX
4148
"file_append.png", // ICON_FILE_APPEND,
4249
"file_export.png", // ICON_FILE_EXPORT,
4350
"file_remove.png", // ICON_FILE_REMOVE,

vkconfig_gui/style.h

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ bool isDarkMode();
2727
enum Icon {
2828
ICON_CLEAR = 0,
2929
ICON_DRAG,
30+
ICON_NEXT,
31+
ICON_PREV,
32+
ICON_MODE,
33+
ICON_EXIT,
34+
ICON_SEARCH_CASE,
35+
ICON_SEARCH_WHOLE,
36+
ICON_SEARCH_REGEX,
3037
ICON_FILE_APPEND,
3138
ICON_FILE_EXPORT,
3239
ICON_FILE_REMOVE,

0 commit comments

Comments
 (0)