MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / TranslatedToolbar

Class TranslatedToolbar

launcher/ui/MainWindow.cpp:216–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214using TranslatedToolButton = Translated<QToolButton>;
215
216class 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
248class MainWindow::Ui
249{

Callers 3

createMainToolbarMethod · 0.85
createNewsToolbarMethod · 0.85
createInstanceToolbarMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected