Next steps on Android port

This commit is contained in:
doitux
2012-05-06 14:02:00 +00:00
parent d0eb4c34dd
commit 7cf2203f33
6 changed files with 13 additions and 14 deletions
+1 -5
View File
@@ -125,17 +125,13 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
mkdir(dataDir.c_str(), MODUS);
mkdir(cacheDir.c_str(), MODUS);
}
#ifdef ANDROID
// TODO temporarily use sdcard for data files.
dataDir = "/sdcard/pokerth/data/";
#endif
#endif
ostringstream tempIntToString;
tempIntToString << configRev;
configList.push_back(ConfigInfo("ConfigRevision", CONFIG_TYPE_INT, tempIntToString.str()));
#ifdef ANDROID
configList.push_back(ConfigInfo("AppDataDir", CONFIG_TYPE_STRING, "/sdcard/pokerth/data/"));
configList.push_back(ConfigInfo("AppDataDir", CONFIG_TYPE_STRING, ":/android/android-data/"));
#else
configList.push_back(ConfigInfo("AppDataDir", CONFIG_TYPE_STRING, myQtToolsInterface->getDataPathStdString(myArgv0)));
#endif
+3 -3
View File
@@ -76,7 +76,7 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
setupUi(this);
#ifdef ANDROID
this->setAttribute(Qt::WA_LockLandscapeOrientation);
// this->setAttribute(Qt::WA_LockLandscapeOrientation);
this->showFullScreen();
#endif
@@ -4239,8 +4239,8 @@ void gameTableImpl::restoreGameTableGeometry()
{
#ifdef ANDROID
this->showFullScreen();
refreshGameTableStyle();
this->showFullScreen();
// refreshGameTableStyle();
// this->showFullScreen();
#else
if(myConfig->readConfigInt("GameTableFullScreenSave")) {
#ifndef GUI_800x480
+2
View File
@@ -419,5 +419,7 @@
<file>android-data/gfx/gui/misc/welcomepokerth_old.png</file>
<file>android-data/gfx/gui/misc/welcomepokerth.png</file>
<file>android-data/gfx/gui/misc/windowicon.png</file>
<file>android-data/fonts/DejaVuSans-Bold.ttf</file>
<file>android-data/fonts/n019003l.pfb</file>
</qresource>
</RCC>
@@ -530,7 +530,9 @@ void settingsDialogImpl::exec(bool in_game)
calledIngame = in_game;
prepareDialog();
QDialog::exec();
#ifdef ANDROID
this->showFullScreen();
#endif
}
void settingsDialogImpl::isAccepted()
+3 -2
View File
@@ -74,12 +74,13 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
this->setStatusBar(0);
#ifdef GUI_800x480
this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { color: #F0F0F0; }");
#ifdef ANDROID
this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { font-size:30px; 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;}");
this->setAttribute(Qt::WA_LockLandscapeOrientation);
// this->setAttribute(Qt::WA_LockLandscapeOrientation);
this->showFullScreen();
#else
this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { color: #F0F0F0; }");
centralwidget->setStyleSheet(".QWidget { background-image: url(\""+myAppDataPath+"gfx/gui/misc/startwindowbg_800x480.png\"); background-position: bottom center; background-origin: content; background-repeat: no-repeat;}");
#endif
pushButtonStart_Local_Game->setStyleSheet("QPushButton { text-align:left; font-weight:bold; padding-left: 3px; padding-bottom: 3px; padding-top: 3px; padding-right: 3px; background-color: #4B4B4B; color: #F0F0F0; font-size:20px; border-width: 0px;}");
+1 -3
View File
@@ -112,9 +112,7 @@ int main( int argc, char **argv )
#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) }");
#ifdef ANDROID
a.setAttribute(Qt::WA_LockLandscapeOrientation);
#else
#ifndef ANDROID
QPixmap *pixmap = new QPixmap(myAppDataPath + "gfx/gui/misc/welcomepokerth.png");
StartSplash splash(*pixmap);
if(!myConfig->readConfigInt("DisableSplashScreenOnStartup")) {