next steps on Android port
This commit is contained in:
@@ -320,8 +320,8 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
|||||||
if (tmpStr) tempAppDataPath = tmpStr;
|
if (tmpStr) tempAppDataPath = tmpStr;
|
||||||
//if appdatapath changes directly update it here not in UpdateConfig()
|
//if appdatapath changes directly update it here not in UpdateConfig()
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
if(tempAppDataPath != "/sdcard/pokerth/data/") {
|
if(tempAppDataPath != ":/android/android-data/") {
|
||||||
confAppDataPath->SetAttribute("value", "/sdcard/pokerth/data/");
|
confAppDataPath->SetAttribute("value", ":/android/android-data/");
|
||||||
#else
|
#else
|
||||||
if(tempAppDataPath != myQtToolsInterface->getDataPathStdString(myArgv0)) {
|
if(tempAppDataPath != myQtToolsInterface->getDataPathStdString(myArgv0)) {
|
||||||
confAppDataPath->SetAttribute("value", myQtToolsInterface->stringToUtf8(myQtToolsInterface->getDataPathStdString(myArgv0)));
|
confAppDataPath->SetAttribute("value", myQtToolsInterface->stringToUtf8(myQtToolsInterface->getDataPathStdString(myArgv0)));
|
||||||
|
|||||||
@@ -75,11 +75,6 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
|
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
#ifdef ANDROID
|
|
||||||
// this->setAttribute(Qt::WA_LockLandscapeOrientation);
|
|
||||||
this->showFullScreen();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//Sound
|
//Sound
|
||||||
mySDLPlayer = new SDLPlayer(myConfig);
|
mySDLPlayer = new SDLPlayer(myConfig);
|
||||||
mySoundEventHandler = new SoundEvents(myConfig);
|
mySoundEventHandler = new SoundEvents(myConfig);
|
||||||
@@ -4239,8 +4234,6 @@ void gameTableImpl::restoreGameTableGeometry()
|
|||||||
{
|
{
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
this->showFullScreen();
|
this->showFullScreen();
|
||||||
// refreshGameTableStyle();
|
|
||||||
// this->showFullScreen();
|
|
||||||
#else
|
#else
|
||||||
if(myConfig->readConfigInt("GameTableFullScreenSave")) {
|
if(myConfig->readConfigInt("GameTableFullScreenSave")) {
|
||||||
#ifndef GUI_800x480
|
#ifndef GUI_800x480
|
||||||
|
|||||||
@@ -125,7 +125,6 @@ void MyCardsPixmapLabel::startFlipCards(int speed, const QPixmap &frontPix, cons
|
|||||||
if(speed > 8 && speed <= 10) {
|
if(speed > 8 && speed <= 10) {
|
||||||
flipCardsScaleIntervall = 0.5;
|
flipCardsScaleIntervall = 0.5;
|
||||||
}
|
}
|
||||||
//
|
|
||||||
|
|
||||||
if(speed != 11) {
|
if(speed != 11) {
|
||||||
flipCardsAction1 = TRUE;
|
flipCardsAction1 = TRUE;
|
||||||
@@ -158,7 +157,6 @@ void MyCardsPixmapLabel::nextFlipCardsFrame()
|
|||||||
} else {
|
} else {
|
||||||
//dann front vergrößern
|
//dann front vergrößern
|
||||||
if (frameFlipCardsAction2Size < 0.9 ) {
|
if (frameFlipCardsAction2Size < 0.9 ) {
|
||||||
|
|
||||||
frameFlipCardsAction2Size += flipCardsScaleIntervall;
|
frameFlipCardsAction2Size += flipCardsScaleIntervall;
|
||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -75,9 +75,8 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
|
|||||||
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { font-size:30px; color: #F0F0F0; }");
|
this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { font-size:20px; color: #F0F0F0; }");
|
||||||
centralwidget->setStyleSheet(".QWidget { background-image: url(:/android/android-data/gfx/gui/misc/startwindowbg_800x480.png); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
centralwidget->setStyleSheet(".QWidget { background-image: url(:/android/android-data/gfx/gui/misc/startwindowbg_800x480.png); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
|
||||||
// this->setAttribute(Qt::WA_LockLandscapeOrientation);
|
|
||||||
this->showFullScreen();
|
this->showFullScreen();
|
||||||
#else
|
#else
|
||||||
this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { color: #F0F0F0; }");
|
this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { color: #F0F0F0; }");
|
||||||
|
|||||||
+6
-4
@@ -112,14 +112,16 @@ int main( int argc, char **argv )
|
|||||||
#endif
|
#endif
|
||||||
a.setStyleSheet(font1String + " QDialogButtonBox, QMessageBox { dialogbuttonbox-buttons-have-icons: 1; dialog-ok-icon: url(:/gfx/dialog_ok_apply.png); dialog-cancel-icon: url(:/gfx/dialog_close.png); dialog-close-icon: url(:/gfx/dialog_close.png); dialog-yes-icon: url(:/gfx/dialog_ok_apply.png); dialog-no-icon: url(:/gfx/dialog_close.png) }");
|
a.setStyleSheet(font1String + " QDialogButtonBox, QMessageBox { dialogbuttonbox-buttons-have-icons: 1; dialog-ok-icon: url(:/gfx/dialog_ok_apply.png); dialog-cancel-icon: url(:/gfx/dialog_close.png); dialog-close-icon: url(:/gfx/dialog_close.png); dialog-yes-icon: url(:/gfx/dialog_ok_apply.png); dialog-no-icon: url(:/gfx/dialog_close.png) }");
|
||||||
|
|
||||||
#ifndef ANDROID
|
QPixmap pixmap(myAppDataPath + "gfx/gui/misc/welcomepokerth.png");
|
||||||
QPixmap *pixmap = new QPixmap(myAppDataPath + "gfx/gui/misc/welcomepokerth.png");
|
#ifdef ANDROID
|
||||||
StartSplash splash(*pixmap);
|
QDesktopWidget dw;
|
||||||
|
pixmap = pixmap.scaled(dw.screenGeometry().width(), dw.screenGeometry().height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||||
|
#endif
|
||||||
|
StartSplash splash(pixmap);
|
||||||
if(!myConfig->readConfigInt("DisableSplashScreenOnStartup")) {
|
if(!myConfig->readConfigInt("DisableSplashScreenOnStartup")) {
|
||||||
splash.show();
|
splash.show();
|
||||||
splash.showMessage(QString("Version %1").arg(POKERTH_BETA_RELEASE_STRING), 0x0042, QColor(240,240,240));
|
splash.showMessage(QString("Version %1").arg(POKERTH_BETA_RELEASE_STRING), 0x0042, QColor(240,240,240));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//Set translations
|
//Set translations
|
||||||
QTranslator qtTranslator;
|
QTranslator qtTranslator;
|
||||||
|
|||||||
Reference in New Issue
Block a user