Changeset View
Changeset View
Standalone View
Standalone View
tests/kmoretools/kmoretoolstest_interactive.cpp
Show All 28 Lines | |||||
29 | #include <QDialog> | 29 | #include <QDialog> | ||
30 | #include <QLabel> | 30 | #include <QLabel> | ||
31 | #include <QHBoxLayout> | 31 | #include <QHBoxLayout> | ||
32 | #include <QPushButton> | 32 | #include <QPushButton> | ||
33 | #include <QLineEdit> | 33 | #include <QLineEdit> | ||
34 | 34 | | |||
35 | #define _ QLatin1String | 35 | #define _ QLatin1String | ||
36 | 36 | | |||
37 | /** | ||||
38 | * Each test case starts a test GUI. | ||||
39 | * Run kmoretoolstest_interactive with the test case name as first parameter | ||||
40 | * (e.g. testDialogForGroupingNames) to run only this test GUI. | ||||
41 | */ | ||||
37 | class KMoreToolsTestInteractive : public QObject | 42 | class KMoreToolsTestInteractive : public QObject | ||
38 | { | 43 | { | ||
39 | Q_OBJECT | 44 | Q_OBJECT | ||
40 | 45 | | |||
41 | private Q_SLOTS: | 46 | private Q_SLOTS: | ||
42 | void init(); | 47 | void init(); | ||
43 | void cleanup(); | 48 | void cleanup(); | ||
44 | 49 | | |||
▲ Show 20 Lines • Show All 129 Lines • ▼ Show 20 Line(s) | 175 | { | |||
174 | labelInfo->setWordWrap(true); | 179 | labelInfo->setWordWrap(true); | ||
175 | auto selectButton = new QPushButton(_("Select grouping name..."), dlg); | 180 | auto selectButton = new QPushButton(_("Select grouping name..."), dlg); | ||
176 | auto labelLineEdit = new QLabel(_("URL 1 (file://..., http://...)"), dlg); | 181 | auto labelLineEdit = new QLabel(_("URL 1 (file://..., http://...)"), dlg); | ||
177 | auto urlLineEdit = new QLineEdit(dlg); | 182 | auto urlLineEdit = new QLineEdit(dlg); | ||
178 | urlLineEdit->setText(_("file:///etc/bash.bashrc")); | 183 | urlLineEdit->setText(_("file:///etc/bash.bashrc")); | ||
179 | auto menuButton = new QPushButton(_("<wait for selection>"), dlg); | 184 | auto menuButton = new QPushButton(_("<wait for selection>"), dlg); | ||
180 | 185 | | |||
181 | auto groupingNamesList = { | 186 | auto groupingNamesList = { | ||
182 | _("disk-usage"), _("disk-partitions"), | 187 | _("disk-usage"), | ||
188 | _("disk-partitions"), | ||||
183 | _("files-find"), | 189 | _("files-find"), | ||
184 | _("git-clients-for-folder"), _("git-clients-and-actions"), | 190 | _("font-tools"), | ||
185 | _("icon-browser"), _("screenshot-take"), | 191 | _("git-clients-for-folder"), | ||
186 | _("system-monitor-processes"), _("system-monitor-logs"), | 192 | _("git-clients-and-actions"), | ||
193 | _("icon-browser"), | ||||
194 | _("language-dictionary"), | ||||
195 | _("mouse-tools"), | ||||
196 | _("screenrecorder"), | ||||
197 | _("screenshot-take"), | ||||
198 | _("system-monitor-processes"), | ||||
199 | _("system-monitor-logs"), | ||||
187 | _("time-countdown") | 200 | _("time-countdown") | ||
188 | }; | 201 | }; | ||
189 | 202 | | |||
190 | KMoreToolsMenuFactory menuFactory(_("unittest-kmoretools/3")); | 203 | KMoreToolsMenuFactory menuFactory(_("unittest-kmoretools/3")); | ||
191 | 204 | | |||
192 | auto groupingNamesMenu = new QMenu(dlg); | 205 | auto groupingNamesMenu = new QMenu(dlg); | ||
193 | QMenu* moreToolsMenu = nullptr; | 206 | QMenu* moreToolsMenu = nullptr; | ||
194 | Q_FOREACH(auto groupingName, groupingNamesList) { | 207 | Q_FOREACH(auto groupingName, groupingNamesList) { | ||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |