Changeset View
Changeset View
Standalone View
Standalone View
src/dialogs/profilesdialog.cpp
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Line(s) | 156 | { | |||
---|---|---|---|---|---|
179 | ui->bedTempSB->setEnabled(ui->heatedBedCK->isChecked()); | 179 | ui->bedTempSB->setEnabled(ui->heatedBedCK->isChecked()); | ||
180 | ui->bedTempSB->setValue(m_settings.value(QStringLiteral("maximumTemperatureBed"), QStringLiteral("0")).toInt()); | 180 | ui->bedTempSB->setValue(m_settings.value(QStringLiteral("maximumTemperatureBed"), QStringLiteral("0")).toInt()); | ||
181 | 181 | | |||
182 | //HOTEND | 182 | //HOTEND | ||
183 | ui->extruderTempSB->setValue(m_settings.value(QStringLiteral("maximumTemperatureExtruder"), QStringLiteral("0")).toInt()); | 183 | ui->extruderTempSB->setValue(m_settings.value(QStringLiteral("maximumTemperatureExtruder"), QStringLiteral("0")).toInt()); | ||
184 | //Baud | 184 | //Baud | ||
185 | ui->baudCB->setCurrentText(m_settings.value(QStringLiteral("bps"), QStringLiteral("115200")).toString()); | 185 | ui->baudCB->setCurrentText(m_settings.value(QStringLiteral("bps"), QStringLiteral("115200")).toString()); | ||
186 | ui->firmwareCB->setCurrentText(m_settings.value(QStringLiteral("firmware"), QStringLiteral("Auto-Detect")).toString()); | 186 | ui->firmwareCB->setCurrentText(m_settings.value(QStringLiteral("firmware"), QStringLiteral("Auto-Detect")).toString()); | ||
187 | ui->postPauseLE->setText(m_settings.value(QStringLiteral("postPause"), QStringLiteral("")).toString()); | 187 | ui->postPauseLE->setText(m_settings.value(QStringLiteral("postPause"), QString()).toString()); | ||
188 | m_settings.endGroup(); | 188 | m_settings.endGroup(); | ||
189 | m_settings.endGroup(); | 189 | m_settings.endGroup(); | ||
190 | setModified(false); | 190 | setModified(false); | ||
191 | 191 | | |||
192 | } | 192 | } | ||
193 | 193 | | |||
194 | void ProfilesDialog::updateCBProfiles() | 194 | void ProfilesDialog::updateCBProfiles() | ||
195 | { | 195 | { | ||
Show All 18 Lines | 207 | { | |||
214 | m_settings.endGroup(); | 214 | m_settings.endGroup(); | ||
215 | updateCBProfiles(); | 215 | updateCBProfiles(); | ||
216 | } | 216 | } | ||
217 | 217 | | |||
218 | QStringList ProfilesDialog::detectFWPlugins() | 218 | QStringList ProfilesDialog::detectFWPlugins() | ||
219 | { | 219 | { | ||
220 | QStringList firmwares; | 220 | QStringList firmwares; | ||
221 | QStringList paths = AtCoreDirectories::pluginDir; | 221 | QStringList paths = AtCoreDirectories::pluginDir; | ||
222 | //Add our runtime paths | 222 | //Add our runtime paths | ||
223 | paths.prepend(qApp->applicationDirPath() + QStringLiteral("/../Plugins/AtCore")); | 223 | const QString &path(qApp->applicationDirPath()); | ||
patrickelectric: get with reference | |||||
224 | paths.prepend(qApp->applicationDirPath() + QStringLiteral("/AtCore")); | 224 | paths.prepend(path + QStringLiteral("/../Plugins/AtCore")); | ||
225 | paths.prepend(qApp->applicationDirPath() + QStringLiteral("/plugins")); | 225 | paths.prepend(path + QStringLiteral("/AtCore")); | ||
226 | for (const QString &path : paths) { | 226 | paths.prepend(path + QStringLiteral("/plugins")); | ||
227 | for (const QString &path : qAsConst(paths)) { | ||||
227 | firmwares = firmwaresInPath(path); | 228 | firmwares = firmwaresInPath(path); | ||
228 | if (!firmwares.isEmpty()) { | 229 | if (!firmwares.isEmpty()) { | ||
229 | //use path where plugins were detected. | 230 | //use path where plugins were detected. | ||
230 | break; | 231 | break; | ||
231 | } | 232 | } | ||
232 | } | 233 | } | ||
233 | return firmwares; | 234 | return firmwares; | ||
234 | } | 235 | } | ||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |
get with reference