PosturePerfection
|
All code related to the graphical user interface for PosturePerfection. More...
Data Structures | |
class | Button |
Subclass of QPushButton that allows having a title and subtitle within the button. More... | |
class | Label |
Subclass of QLabel that allows having a title and subtitle within the label. More... | |
class | MainWindow |
Allows for navigation around the application from the main page by letting the user navigate to the data page, settings page and fullscreen page from the main window. More... | |
Functions | |
void | setPointSizeAndResize (QFont *font, QString *text, float pointSize, QRectF rect) |
Calls setPointSize() for the given font. More... | |
QRectF | fullRect (int width, int height, size_t padding) |
QRectF | halfRectTop (int width, int height, size_t padding) |
QRectF | halfRectBot (int width, int height, size_t padding) |
All code related to the graphical user interface for PosturePerfection.
QRectF GUI::fullRect | ( | int | width, |
int | height, | ||
size_t | padding | ||
) |
QRectF GUI::halfRectBot | ( | int | width, |
int | height, | ||
size_t | padding | ||
) |
QRectF GUI::halfRectTop | ( | int | width, |
int | height, | ||
size_t | padding | ||
) |
void GUI::setPointSizeAndResize | ( | QFont * | font, |
QString * | text, | ||
float | pointSize, | ||
QRectF | rect | ||
) |
Calls setPointSize()
for the given font.
This function also ensures the text fits within the given bounds and performs resizing as needed. The function works for lines with newline characters in that it resizes to fit the longest line in the text string.
font | QFont |
text | QString& text that will be written with the current font |
pointSize | int desired point size |
boxWidth | int width of the container as returned by Widget.width() |
padding | size_t Desired padding (in pixels) around the text |