| 242 | } |
| 243 | |
| 244 | void TemplateHandler::updateTextPosition(QAction* action) { |
| 245 | auto style = static_cast<Qt::ToolButtonStyle>(action->data().toInt()); |
| 246 | |
| 247 | // save the current style |
| 248 | KConfig config; |
| 249 | KConfigGroup group = config.group(QLatin1String("TemplateHandler")); |
| 250 | group.writeEntry(QLatin1String("TextPosition"), static_cast<int>(style)); |
| 251 | |
| 252 | // update all available template handlers |
| 253 | for (auto* handler : templateHandlers) |
| 254 | handler->setToolButtonStyle(style); |
| 255 | } |
| 256 | |
| 257 | void TemplateHandler::setToolButtonStyle(Qt::ToolButtonStyle style) { |
| 258 | m_tbLoad->setToolButtonStyle(style); |
nothing calls this directly
no test coverage detected