Changeset View
Changeset View
Standalone View
Standalone View
documentation/qthelp/qthelpconfig.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 91 | if (!checkQtHelpFile()) | |||
---|---|---|---|---|---|
92 | return; | 92 | return; | ||
93 | 93 | | |||
94 | QDialog::accept(); | 94 | QDialog::accept(); | ||
95 | } | 95 | } | ||
96 | 96 | | |||
97 | QtHelpConfig::QtHelpConfig(QtHelpPlugin* plugin, QWidget *parent) | 97 | QtHelpConfig::QtHelpConfig(QtHelpPlugin* plugin, QWidget *parent) | ||
98 | : KDevelop::ConfigPage(plugin, nullptr, parent) | 98 | : KDevelop::ConfigPage(plugin, nullptr, parent) | ||
99 | { | 99 | { | ||
100 | QVBoxLayout * l = new QVBoxLayout( this ); | | |||
101 | | ||||
102 | QWidget* w = new QWidget; | | |||
103 | m_configWidget = new Ui::QtHelpConfigUI; | 100 | m_configWidget = new Ui::QtHelpConfigUI; | ||
104 | m_configWidget->setupUi( w ); | 101 | m_configWidget->setupUi(this); | ||
105 | m_configWidget->addButton->setIcon(QIcon::fromTheme("list-add")); | 102 | m_configWidget->addButton->setIcon(QIcon::fromTheme("list-add")); | ||
106 | connect(m_configWidget->addButton, &QPushButton::clicked, this, &QtHelpConfig::add); | 103 | connect(m_configWidget->addButton, &QPushButton::clicked, this, &QtHelpConfig::add); | ||
107 | 104 | | |||
108 | // Table | 105 | // Table | ||
109 | m_configWidget->qchTable->setColumnHidden(IconColumn, true); | 106 | m_configWidget->qchTable->setColumnHidden(IconColumn, true); | ||
110 | m_configWidget->qchTable->setColumnHidden(GhnsColumn, true); | 107 | m_configWidget->qchTable->setColumnHidden(GhnsColumn, true); | ||
111 | m_configWidget->qchTable->model()->setHeaderData(ConfigColumn, Qt::Horizontal, QVariant()); | 108 | m_configWidget->qchTable->model()->setHeaderData(ConfigColumn, Qt::Horizontal, QVariant()); | ||
112 | m_configWidget->qchTable->header()->setSectionsMovable(false); | 109 | m_configWidget->qchTable->header()->setSectionsMovable(false); | ||
Show All 16 Lines | |||||
129 | m_configWidget->messageAvailabilityQtDocs->setCloseButtonVisible(false); | 126 | m_configWidget->messageAvailabilityQtDocs->setCloseButtonVisible(false); | ||
130 | if(plugin->isQtHelpAvailable()) { | 127 | if(plugin->isQtHelpAvailable()) { | ||
131 | m_configWidget->messageAvailabilityQtDocs->setVisible(false); | 128 | m_configWidget->messageAvailabilityQtDocs->setVisible(false); | ||
132 | } else { | 129 | } else { | ||
133 | m_configWidget->messageAvailabilityQtDocs->setText( | 130 | m_configWidget->messageAvailabilityQtDocs->setText( | ||
134 | i18n("The command \"qmake -query\" could not provide a path to a QtHelp file (QCH).")); | 131 | i18n("The command \"qmake -query\" could not provide a path to a QtHelp file (QCH).")); | ||
135 | m_configWidget->loadQtDocsCheckBox->setVisible(false); | 132 | m_configWidget->loadQtDocsCheckBox->setVisible(false); | ||
136 | } | 133 | } | ||
137 | l->addWidget(w); | | |||
138 | reset(); | 134 | reset(); | ||
139 | } | 135 | } | ||
140 | 136 | | |||
141 | QtHelpConfig::~QtHelpConfig() | 137 | QtHelpConfig::~QtHelpConfig() | ||
142 | { | 138 | { | ||
143 | delete m_configWidget; | 139 | delete m_configWidget; | ||
144 | } | 140 | } | ||
145 | 141 | | |||
▲ Show 20 Lines • Show All 211 Lines • Show Last 20 Lines |