MCPcopy Create free account
hub / github.com/KDE/labplot / SettingsDatasetsPage

Method SettingsDatasetsPage

src/frontend/SettingsDatasetsPage.cpp:22–45  ·  view source on GitHub ↗

* \brief Page for the 'General' settings of the Labplot settings dialog. */

Source from the content-addressed store, hash-verified

20 * \brief Page for the 'General' settings of the Labplot settings dialog.
21 */
22SettingsDatasetsPage::SettingsDatasetsPage(QWidget* parent)
23 : SettingsPage(parent) {
24 ui.setupUi(this);
25
26 ui.bClearCache->setIcon(QIcon::fromTheme(QLatin1String("edit-clear")));
27 ui.bClearCache->setToolTip(i18n("Clear downloaded files"));
28 ui.bClearCache->setEnabled(false);
29
30 ui.lKaggleUrl->setText(QStringLiteral("(<a href=\"https://www.kaggle.com/docs/api\">") + i18n("How to Use Kaggle") + QStringLiteral("</a>)"));
31 ui.lKaggleUrl->setTextFormat(Qt::RichText);
32 ui.lKaggleUrl->setTextInteractionFlags(Qt::TextBrowserInteraction);
33 ui.lKaggleUrl->setOpenExternalLinks(true);
34
35 connect(ui.bClearCache, &QPushButton::clicked, this, &SettingsDatasetsPage::clearCache);
36 connect(ui.leKagglePath, &QLineEdit::textChanged, [&] {
37 m_changed = true;
38 const QString& kagglePath = ui.leKagglePath->text();
39 bool invalid = (!kagglePath.isEmpty() && !QFile::exists(kagglePath));
40 GuiTools::highlight(ui.leKagglePath, invalid);
41 Q_EMIT settingsChanged();
42 });
43
44 loadSettings();
45}
46
47QList<Settings::Type> SettingsDatasetsPage::applySettings() {
48 QList<Settings::Type> changes;

Callers

nothing calls this directly

Calls 6

setToolTipMethod · 0.80
setIconMethod · 0.45
setEnabledMethod · 0.45
setTextMethod · 0.45
textMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected