Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Configurable orientation mask
  • Loading branch information
elros34 committed Aug 23, 2018
1 parent 5d2464c commit 1094e47
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions main.cpp
Expand Up @@ -99,11 +99,15 @@ int main(int argc, char *argv[])

QScreen* sc = app.primaryScreen();
if(sc){
sc->setOrientationUpdateMask(Qt::PrimaryOrientation
| Qt::LandscapeOrientation
| Qt::PortraitOrientation
| Qt::InvertedLandscapeOrientation
| Qt::InvertedPortraitOrientation);
QFlags<Qt::ScreenOrientation> mask = Qt::PrimaryOrientation
| Qt::PortraitOrientation
| Qt::LandscapeOrientation
| Qt::InvertedPortraitOrientation
| Qt::InvertedLandscapeOrientation;
if (settings->contains("ui/orientationMask")) {
mask &= settings->value("ui/orientationMask").toInt();
}
sc->setOrientationUpdateMask(mask);
}

qmlRegisterType<TextRender>("FingerTerm", 1, 0, "TextRender");
Expand Down

0 comments on commit 1094e47

Please sign in to comment.