Skip to content

Commit 3420b80

Browse files
vkconfig: Add diagnostics search
1 parent aad9239 commit 3420b80

27 files changed

+288
-5
lines changed

vkconfig_core/configurator.cpp

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

901901
this->use_system_tray = json_object.value("use_system_tray").toBool();
902902

903+
if (json_object.value("show_diagnostic_search") != QJsonValue::Undefined) {
904+
this->show_diagnostic_search = json_object.value("show_diagnostic_search").toBool();
905+
}
906+
907+
if (json_object.value("diagnostic_search_text") != QJsonValue::Undefined) {
908+
this->diagnostic_search_text = json_object.value("diagnostic_search_text").toString().toStdString();
909+
}
910+
903911
if (json_object.value("VULKAN_HOME") != QJsonValue::Undefined) {
904912
::SetHomePath(json_object.value("VULKAN_HOME").toString().toStdString());
905913
}
@@ -962,6 +970,8 @@ bool Configurator::Save() const {
962970
json_object.insert("use_notify_releases", this->use_notify_releases);
963971
json_object.insert("latest_sdk_version", this->latest_sdk_version.str().c_str());
964972
json_object.insert("last_vkconfig_version", Version::VKCONFIG.str().c_str());
973+
json_object.insert("show_diagnostic_search", this->show_diagnostic_search);
974+
json_object.insert("diagnostic_search_text", this->diagnostic_search_text.c_str());
965975
json_object.insert("VULKAN_HOME", ::Path(Path::HOME).RelativePath().c_str());
966976
json_object.insert("VULKAN_DOWNLOAD", ::Path(Path::DOWNLOAD).RelativePath().c_str());
967977
json_interface_object.insert(GetToken(TAB_PREFERENCES), json_object);
@@ -1027,6 +1037,10 @@ bool Configurator::GetUseNotifyReleases() const { return this->use_notify_releas
10271037

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

1040+
bool Configurator::GetShowDiagnosticSearch() const { return show_diagnostic_search; }
1041+
1042+
void Configurator::SetShowDiagnosticSearch(bool enabled) { this->show_diagnostic_search = enabled; }
1043+
10301044
bool Configurator::ShouldNotify() const {
10311045
return this->latest_sdk_version < this->online_sdk_version && this->online_sdk_version != Version::NONE &&
10321046
!(Version::VKCONFIG > this->last_vkconfig_version) && (Version::VKHEADER < this->online_sdk_version);

vkconfig_core/configurator.h

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

117+
bool GetShowDiagnosticSearch() const;
118+
void SetShowDiagnosticSearch(bool enabled);
119+
117120
bool ShouldNotify() const;
118121

119122
bool HasActiveSettings() const;
@@ -152,12 +155,14 @@ class Configurator {
152155
Version last_vkconfig_version = Version::NONE;
153156
QByteArray window_geometry;
154157
QByteArray window_state;
158+
std::string diagnostic_search_text;
155159

156160
private:
157161
int hide_message_boxes_flags = 0;
158162
bool use_system_tray = false;
159163
bool use_layer_dev_mode = false;
160164
bool use_notify_releases = true;
165+
bool show_diagnostic_search = false;
161166
ExecutableScope executable_scope = EXECUTABLE_ANY;
162167
std::string selected_global_configuration = "Validation";
163168
};

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">
@@ -1601,6 +1601,127 @@
16011601
<property name="bottomMargin">
16021602
<number>5</number>
16031603
</property>
1604+
<item>
1605+
<layout class="QHBoxLayout" name="diagnostic_search_layout">
1606+
<property name="spacing">
1607+
<number>0</number>
1608+
</property>
1609+
<property name="topMargin">
1610+
<number>0</number>
1611+
</property>
1612+
<property name="bottomMargin">
1613+
<number>0</number>
1614+
</property>
1615+
<item>
1616+
<widget class="QLineEdit" name="diagnostic_search_edit"/>
1617+
</item>
1618+
<item>
1619+
<widget class="QPushButton" name="diagnostic_search_next">
1620+
<property name="maximumSize">
1621+
<size>
1622+
<width>32</width>
1623+
<height>16777215</height>
1624+
</size>
1625+
</property>
1626+
<property name="toolTip">
1627+
<string>Find Next (F3)</string>
1628+
</property>
1629+
<property name="text">
1630+
<string/>
1631+
</property>
1632+
<property name="shortcut">
1633+
<string>F3</string>
1634+
</property>
1635+
</widget>
1636+
</item>
1637+
<item>
1638+
<widget class="QPushButton" name="diagnostic_search_prev">
1639+
<property name="maximumSize">
1640+
<size>
1641+
<width>32</width>
1642+
<height>16777215</height>
1643+
</size>
1644+
</property>
1645+
<property name="toolTip">
1646+
<string>Find Previous (Shift+F3)</string>
1647+
</property>
1648+
<property name="text">
1649+
<string/>
1650+
</property>
1651+
<property name="shortcut">
1652+
<string>Shift+F3</string>
1653+
</property>
1654+
</widget>
1655+
</item>
1656+
<item>
1657+
<widget class="QPushButton" name="diagnostic_search_case">
1658+
<property name="maximumSize">
1659+
<size>
1660+
<width>32</width>
1661+
<height>16777215</height>
1662+
</size>
1663+
</property>
1664+
<property name="text">
1665+
<string/>
1666+
</property>
1667+
<property name="checkable">
1668+
<bool>true</bool>
1669+
</property>
1670+
</widget>
1671+
</item>
1672+
<item>
1673+
<widget class="QPushButton" name="diagnostic_search_whole">
1674+
<property name="maximumSize">
1675+
<size>
1676+
<width>32</width>
1677+
<height>16777215</height>
1678+
</size>
1679+
</property>
1680+
<property name="text">
1681+
<string/>
1682+
</property>
1683+
<property name="checkable">
1684+
<bool>true</bool>
1685+
</property>
1686+
</widget>
1687+
</item>
1688+
<item>
1689+
<widget class="QPushButton" name="diagnostic_search_regex">
1690+
<property name="maximumSize">
1691+
<size>
1692+
<width>32</width>
1693+
<height>16777215</height>
1694+
</size>
1695+
</property>
1696+
<property name="text">
1697+
<string/>
1698+
</property>
1699+
<property name="checkable">
1700+
<bool>true</bool>
1701+
</property>
1702+
<property name="checked">
1703+
<bool>false</bool>
1704+
</property>
1705+
</widget>
1706+
</item>
1707+
<item>
1708+
<widget class="QPushButton" name="diagnostic_search_hide">
1709+
<property name="maximumSize">
1710+
<size>
1711+
<width>32</width>
1712+
<height>16777215</height>
1713+
</size>
1714+
</property>
1715+
<property name="toolTip">
1716+
<string>Hide search field</string>
1717+
</property>
1718+
<property name="text">
1719+
<string/>
1720+
</property>
1721+
</widget>
1722+
</item>
1723+
</layout>
1724+
</item>
16041725
<item>
16051726
<widget class="QTextEdit" name="diagnostic_status_text">
16061727
<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
@@ -36,6 +36,13 @@ QIcon Get(Icon icon) {
3636
static const char* ICONS[] = {
3737
"clear.png", // ICON_CLEAR
3838
"drag.png", // ICON_DRAG
39+
"next.png", // ICON_NEXT
40+
"prev.png", // ICON_PREV
41+
"down.png", // ICON_MODE
42+
"exit.png", // ICON_EXIT
43+
"search_case.png", // ICON_SEARCH_CASE
44+
"search_whole.png", // ICON_SEARCH_WHOLE
45+
"search_regex.png", // ICON_SEARCH_REGEX
3946
"file_append.png", // ICON_FILE_APPEND,
4047
"file_export.png", // ICON_FILE_EXPORT,
4148
"file_remove.png", // ICON_FILE_REMOVE,

vkconfig_gui/style.h

+7
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
enum Icon {
2626
ICON_CLEAR = 0,
2727
ICON_DRAG,
28+
ICON_NEXT,
29+
ICON_PREV,
30+
ICON_MODE,
31+
ICON_EXIT,
32+
ICON_SEARCH_CASE,
33+
ICON_SEARCH_WHOLE,
34+
ICON_SEARCH_REGEX,
2835
ICON_FILE_APPEND,
2936
ICON_FILE_EXPORT,
3037
ICON_FILE_REMOVE,

0 commit comments

Comments
 (0)