| 214 | using TranslatedToolButton = Translated<QToolButton>; |
| 215 | |
| 216 | class TranslatedToolbar |
| 217 | { |
| 218 | public: |
| 219 | TranslatedToolbar(){} |
| 220 | TranslatedToolbar(QWidget *parent) |
| 221 | { |
| 222 | m_contained = new QToolBar(parent); |
| 223 | } |
| 224 | void setWindowTitleId(const char * title) |
| 225 | { |
| 226 | m_title = title; |
| 227 | } |
| 228 | operator QToolBar*() |
| 229 | { |
| 230 | return m_contained; |
| 231 | } |
| 232 | QToolBar * operator->() |
| 233 | { |
| 234 | return m_contained; |
| 235 | } |
| 236 | void retranslate() |
| 237 | { |
| 238 | if(m_title) |
| 239 | { |
| 240 | m_contained->setWindowTitle(QApplication::translate("MainWindow", m_title)); |
| 241 | } |
| 242 | } |
| 243 | private: |
| 244 | QToolBar * m_contained = nullptr; |
| 245 | const char * m_title = nullptr; |
| 246 | }; |
| 247 | |
| 248 | class MainWindow::Ui |
| 249 | { |
no outgoing calls
no test coverage detected