Skip to content

Commit 52ae85d

Browse files
committed
Added some "What's This" information
Added some texts to the "What's This" information of some buttons or other widgets that lacked them. This will help the user to discover the provided features. Specifically, help is added for the filter fields and the remote dock. See discussions in issues #1311 and #1312.
1 parent e43ed17 commit 52ae85d

File tree

4 files changed

+72
-2
lines changed

4 files changed

+72
-2
lines changed

src/EditDialog.ui

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
<height>0</height>
3838
</size>
3939
</property>
40+
<property name="whatsThis">
41+
<string>This is the list of supported modes for the cell editor. Choose a mode for viewing or editing the data of the current cell.</string>
42+
</property>
4043
<item>
4144
<property name="text">
4245
<string>Text</string>
@@ -258,6 +261,9 @@ Errors are indicated with a red squiggle underline.</string>
258261
<property name="toolTip">
259262
<string>Apply data to cell [Ctrl+Return]</string>
260263
</property>
264+
<property name="whatsThis">
265+
<string>This button saves the changes performed in the cell editor to the database cell.</string>
266+
</property>
261267
<property name="text">
262268
<string>Apply</string>
263269
</property>

src/FilterLineEdit.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ FilterLineEdit::FilterLineEdit(QWidget* parent, QList<FilterLineEdit*>* filters,
2020
connect(this, SIGNAL(textChanged(QString)), delaySignalTimer, SLOT(start()));
2121
connect(delaySignalTimer, SIGNAL(timeout()), this, SLOT(delayedSignalTimerTriggered()));
2222

23+
setWhatsThis(tr("These input fields allow you to perform quick filters in the currently selected table.\n"
24+
"By default, the rows containing the input text are filtered out.\n"
25+
"The following operators are also supported:\n"
26+
"%\tWildcard\n"
27+
">\tGreater than\n"
28+
"<\tLess than\n"
29+
">=\tEqual to or greater\n"
30+
"<=\tEqual to or less\n"
31+
"=\tEqual to: exact match\n"
32+
"<>\tUnequal: exact inverse match\n"
33+
"x~y\tRange: values between x and y"));
34+
2335
// Immediately emit the delayed filter value changed signal if the user presses the enter or the return key or
2436
// the line edit widget loses focus
2537
connect(this, SIGNAL(editingFinished()), this, SLOT(delayedSignalTimerTriggered()));

src/MainWindow.ui

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ You can drag SQL sentences from an object row and drop them into other applicati
154154
<property name="toolTip">
155155
<string>Clear all filters</string>
156156
</property>
157+
<property name="whatsThis">
158+
<string>This button clears all the filters set in the header input fields for the currently browsed table.</string>
159+
</property>
157160
<property name="text">
158161
<string/>
159162
</property>
@@ -168,6 +171,9 @@ You can drag SQL sentences from an object row and drop them into other applicati
168171
<property name="toolTip">
169172
<string>Save the current filter, sort column and display formats as a view</string>
170173
</property>
174+
<property name="whatsThis">
175+
<string>This button saves the current setting of the browsed table (filters, display formats and order column) as an SQL view that you can later browse or use in SQL statements.</string>
176+
</property>
171177
<property name="text">
172178
<string>...</string>
173179
</property>
@@ -209,7 +215,7 @@ You can drag SQL sentences from an object row and drop them into other applicati
209215
<string>Delete the current record</string>
210216
</property>
211217
<property name="whatsThis">
212-
<string>This button deletes the record currently selected in the database</string>
218+
<string>This button deletes the record or records currently selected in the table</string>
213219
</property>
214220
<property name="text">
215221
<string>Delete Record</string>
@@ -1060,6 +1066,9 @@ You can drag SQL sentences from an object row and drop them into other applicati
10601066
<height>30</height>
10611067
</size>
10621068
</property>
1069+
<property name="whatsThis">
1070+
<string>This button clears the contents of the SQL logs</string>
1071+
</property>
10631072
<property name="text">
10641073
<string>&amp;Clear</string>
10651074
</property>
@@ -1069,6 +1078,9 @@ You can drag SQL sentences from an object row and drop them into other applicati
10691078
</item>
10701079
<item>
10711080
<widget class="QStackedWidget" name="stackLog">
1081+
<property name="whatsThis">
1082+
<string>This panel lets you examine a log of all SQL commands issued by the application or by yourself</string>
1083+
</property>
10721084
<property name="currentIndex">
10731085
<number>0</number>
10741086
</property>
@@ -1268,6 +1280,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
12681280
<property name="statusTip">
12691281
<string>Close the current database file</string>
12701282
</property>
1283+
<property name="whatsThis">
1284+
<string>This button closes the connection to the currently open database file</string>
1285+
</property>
12711286
<property name="shortcut">
12721287
<string>Ctrl+W</string>
12731288
</property>
@@ -1563,6 +1578,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
15631578
<property name="text">
15641579
<string>Open &amp;tab</string>
15651580
</property>
1581+
<property name="whatsThis">
1582+
<string>This button opens a new tab for the SQL editor</string>
1583+
</property>
15661584
<property name="shortcut">
15671585
<string>Ctrl+T</string>
15681586
</property>
@@ -1578,6 +1596,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
15781596
<property name="toolTip">
15791597
<string>Execute SQL [F5, Ctrl+Return, Ctrl+R]</string>
15801598
</property>
1599+
<property name="whatsThis">
1600+
<string>This button executes all the SQL statements of the current editor tab</string>
1601+
</property>
15811602
</action>
15821603
<action name="actionSqlOpenFile">
15831604
<property name="icon">
@@ -1587,6 +1608,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
15871608
<property name="text">
15881609
<string>Open SQL file</string>
15891610
</property>
1611+
<property name="whatsThis">
1612+
<string>This button opens a file containing SQL statements and loads it in a new editor tab</string>
1613+
</property>
15901614
</action>
15911615
<action name="actionSqlSaveFile">
15921616
<property name="icon">
@@ -1623,6 +1647,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
16231647
<property name="toolTip">
16241648
<string>Execute current line [Shift+F5]</string>
16251649
</property>
1650+
<property name="whatsThis">
1651+
<string>This button executes the SQL statement present in the current editor line</string>
1652+
</property>
16261653
<property name="shortcut">
16271654
<string>Shift+F5</string>
16281655
</property>
@@ -1688,6 +1715,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
16881715
<property name="statusTip">
16891716
<string>Save the current session to a file</string>
16901717
</property>
1718+
<property name="whatsThis">
1719+
<string>This button lets you save all the settings associated to the open DB to a DB4S project file</string>
1720+
</property>
16911721
<property name="menuRole">
16921722
<enum>QAction::NoRole</enum>
16931723
</property>
@@ -1706,6 +1736,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
17061736
<property name="statusTip">
17071737
<string>Load a working session from a file</string>
17081738
</property>
1739+
<property name="whatsThis">
1740+
<string>This button lets you open a DB4S project file</string>
1741+
</property>
17091742
<property name="menuRole">
17101743
<enum>QAction::NoRole</enum>
17111744
</property>
@@ -1727,6 +1760,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
17271760
<property name="statusTip">
17281761
<string>Add another database file to the current database connection</string>
17291762
</property>
1763+
<property name="whatsThis">
1764+
<string>This button lets you add another database file to the current database connection</string>
1765+
</property>
17301766
<property name="menuRole">
17311767
<enum>QAction::NoRole</enum>
17321768
</property>
@@ -1766,6 +1802,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
17661802
<property name="toolTip">
17671803
<string>Save SQL file</string>
17681804
</property>
1805+
<property name="whatsThis">
1806+
<string>This button opens a saves the content of the current SQL editor tab to a file</string>
1807+
</property>
17691808
</action>
17701809
<action name="actionEditBrowseTable">
17711810
<property name="icon">
@@ -1897,6 +1936,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
18971936
<property name="toolTip">
18981937
<string>Save the results view</string>
18991938
</property>
1939+
<property name="whatsThis">
1940+
<string>This button lets you save the results of the last executed query</string>
1941+
</property>
19001942
</action>
19011943
<action name="actionSqlFind">
19021944
<property name="checkable">
@@ -1912,6 +1954,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
19121954
<property name="toolTip">
19131955
<string>Find text in SQL editor [Ctrl+F]</string>
19141956
</property>
1957+
<property name="whatsThis">
1958+
<string>This button opens the search bar of the editor</string>
1959+
</property>
19151960
<property name="shortcut">
19161961
<string>Ctrl+F</string>
19171962
</property>
@@ -1930,6 +1975,9 @@ You can drag SQL sentences from the Schema column and drop them into the SQL edi
19301975
<property name="toolTip">
19311976
<string>Find or replace text in SQL editor [Ctrl+H]</string>
19321977
</property>
1978+
<property name="whatsThis">
1979+
<string>This button opens the find/replace dialog for the current editor tab</string>
1980+
</property>
19331981
</action>
19341982
<action name="actionSqlResultsExportCsv">
19351983
<property name="text">

src/RemoteDock.ui

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@
7474
</layout>
7575
</item>
7676
<item>
77-
<widget class="QTreeView" name="treeStructure"/>
77+
<widget class="QTreeView" name="treeStructure">
78+
<property name="whatsThis">
79+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;In this pane, remote databases from dbhub.io website can be added to DB4S. First you need an identity:&lt;/p&gt;&lt;ol style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Login to the dbhub.io website (use your GitHub credentials or whatever you want)&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Click the button to create a DB4S certificate (that's your identity). That'll give you a certificate file (save it to your local disk).&lt;/li&gt;&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Go to the Remote tab in DB4S Preferences. Click the button to add a new certificate to DB4S and choose the just downloaded certificate file.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Now the Remote panel shows your identity and you can add remote databases.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
80+
</property>
81+
</widget>
7882
</item>
7983
</layout>
8084
</widget>

0 commit comments

Comments
 (0)