MCPcopy Create free account
hub / github.com/KDAB/KDChart / alignmentFromScreeName

Method alignmentFromScreeName

examples/DataValueTexts/mainwindow.cpp:325–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325const Qt::Alignment MainWindow::alignmentFromScreeName(const QString &name) const
326{
327 if (name == "Center")
328 return Qt::AlignCenter;
329 if (name == "BottomLeft")
330 return Qt::AlignLeft | Qt::AlignBottom;
331 if (name == "Bottom")
332 return Qt::AlignHCenter | Qt::AlignBottom;
333 if (name == "BottomRight")
334 return Qt::AlignRight | Qt::AlignBottom;
335 if (name == "Right")
336 return Qt::AlignRight | Qt::AlignVCenter;
337 if (name == "TopRight")
338 return Qt::AlignRight | Qt::AlignTop;
339 if (name == "Top")
340 return Qt::AlignHCenter | Qt::AlignTop;
341 if (name == "TopLeft")
342 return Qt::AlignLeft | Qt::AlignTop;
343 if (name == "Left")
344 return Qt::AlignLeft | Qt::AlignVCenter;
345 return Qt::AlignCenter;
346}
347
348const QString MainWindow::alignmentToScreenName(const Qt::Alignment &align) const
349{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected