next steps on Android port

This commit is contained in:
doitux
2012-05-06 20:57:04 +00:00
parent 7cf2203f33
commit a24b07c82c
6 changed files with 14 additions and 22 deletions
+2 -2
View File
@@ -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)));
-7
View File
@@ -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
+1 -1
View File
@@ -346,7 +346,7 @@ public slots:
void sendShowMyCardsSignal(); void sendShowMyCardsSignal();
void closeMessageBoxes(); void closeMessageBoxes();
void hide(); void hide();
void soundEvent_blindsWereSet(int); void soundEvent_blindsWereSet(int);
void enableCallCheckPushButton(); void enableCallCheckPushButton();
+2 -4
View File
@@ -124,8 +124,7 @@ 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,9 +157,8 @@ 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 {
flipCardsAction2 = FALSE; flipCardsAction2 = FALSE;
flipCardsTimer->stop(); flipCardsTimer->stop();
+1 -2
View File
@@ -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; }");
+8 -6
View File
@@ -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;
if(!myConfig->readConfigInt("DisableSplashScreenOnStartup")) { pixmap = pixmap.scaled(dw.screenGeometry().width(), dw.screenGeometry().height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
splash.show(); #endif
StartSplash splash(pixmap);
if(!myConfig->readConfigInt("DisableSplashScreenOnStartup")) {
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;