MCPcopy Create free account
hub / github.com/KDE/falkon / GM_Settings

Method GM_Settings

src/plugins/GreaseMonkey/settings/gm_settings.cpp:31–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#include <QInputDialog>
30
31GM_Settings::GM_Settings(GM_Manager* manager, QWidget* parent)
32 : QDialog(parent)
33 , ui(new Ui::GM_Settings)
34 , m_manager(manager)
35{
36 setAttribute(Qt::WA_DeleteOnClose);
37 ui->setupUi(this);
38 ui->iconLabel->setPixmap(QIcon(QSL(":gm/data/icon.svg")).pixmap(32));
39 ui->enable_gm->setChecked(m_manager->isEnabled());
40
41 connect(ui->listWidget, &QListWidget::itemDoubleClicked,
42 this, &GM_Settings::showItemInfo);
43 connect(ui->listWidget, &GM_SettingsListWidget::updateItemRequested,
44 this, &GM_Settings::updateItem);
45 connect(ui->listWidget, &GM_SettingsListWidget::removeItemRequested,
46 this, &GM_Settings::removeItem);
47 connect(ui->openDirectory, &QAbstractButton::clicked,
48 this, &GM_Settings::openScriptsDirectory);
49 connect(ui->newScript, &QAbstractButton::clicked,
50 this, &GM_Settings::newScript);
51 connect(ui->link, &ClickableLabel::clicked,
52 this, &GM_Settings::openUserJs);
53 connect(manager, &GM_Manager::scriptsChanged,
54 this, &GM_Settings::loadScripts);
55 connect(ui->enable_gm, &QAbstractButton::toggled, manager, &GM_Manager::setEnabled);
56 connect(manager, &GM_Manager::enabledChanged, ui->enable_gm, &QAbstractButton::setChecked);
57
58 loadScripts();
59}
60
61void GM_Settings::openUserJs()
62{

Callers

nothing calls this directly

Calls 4

setupUiMethod · 0.80
QIconClass · 0.50
pixmapMethod · 0.45
isEnabledMethod · 0.45

Tested by

no test coverage detected