Next steps on Android port
This commit is contained in:
@@ -125,17 +125,13 @@ ConfigFile::ConfigFile(char *argv0, bool readonly) : noWriteAccess(readonly)
|
|||||||
mkdir(dataDir.c_str(), MODUS);
|
mkdir(dataDir.c_str(), MODUS);
|
||||||
mkdir(cacheDir.c_str(), MODUS);
|
mkdir(cacheDir.c_str(), MODUS);
|
||||||
}
|
}
|
||||||
#ifdef ANDROID
|
|
||||||
// TODO temporarily use sdcard for data files.
|
|
||||||
dataDir = "/sdcard/pokerth/data/";
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ostringstream tempIntToString;
|
ostringstream tempIntToString;
|
||||||
tempIntToString << configRev;
|
tempIntToString << configRev;
|
||||||
configList.push_back(ConfigInfo("ConfigRevision", CONFIG_TYPE_INT, tempIntToString.str()));
|
configList.push_back(ConfigInfo("ConfigRevision", CONFIG_TYPE_INT, tempIntToString.str()));
|
||||||
#ifdef ANDROID
|
#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
|
#else
|
||||||
configList.push_back(ConfigInfo("AppDataDir", CONFIG_TYPE_STRING, myQtToolsInterface->getDataPathStdString(myArgv0)));
|
configList.push_back(ConfigInfo("AppDataDir", CONFIG_TYPE_STRING, myQtToolsInterface->getDataPathStdString(myArgv0)));
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
setupUi(this);
|
setupUi(this);
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
this->setAttribute(Qt::WA_LockLandscapeOrientation);
|
// this->setAttribute(Qt::WA_LockLandscapeOrientation);
|
||||||
this->showFullScreen();
|
this->showFullScreen();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -4239,8 +4239,8 @@ void gameTableImpl::restoreGameTableGeometry()
|
|||||||
{
|
{
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
this->showFullScreen();
|
this->showFullScreen();
|
||||||
refreshGameTableStyle();
|
// refreshGameTableStyle();
|
||||||
this->showFullScreen();
|
// this->showFullScreen();
|
||||||
#else
|
#else
|
||||||
if(myConfig->readConfigInt("GameTableFullScreenSave")) {
|
if(myConfig->readConfigInt("GameTableFullScreenSave")) {
|
||||||
#ifndef GUI_800x480
|
#ifndef GUI_800x480
|
||||||
|
|||||||
@@ -419,5 +419,7 @@
|
|||||||
<file>android-data/gfx/gui/misc/welcomepokerth_old.png</file>
|
<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/welcomepokerth.png</file>
|
||||||
<file>android-data/gfx/gui/misc/windowicon.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>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -530,7 +530,9 @@ void settingsDialogImpl::exec(bool in_game)
|
|||||||
calledIngame = in_game;
|
calledIngame = in_game;
|
||||||
prepareDialog();
|
prepareDialog();
|
||||||
QDialog::exec();
|
QDialog::exec();
|
||||||
|
#ifdef ANDROID
|
||||||
|
this->showFullScreen();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void settingsDialogImpl::isAccepted()
|
void settingsDialogImpl::isAccepted()
|
||||||
|
|||||||
@@ -74,12 +74,13 @@ startWindowImpl::startWindowImpl(ConfigFile *c, Log *l)
|
|||||||
this->setStatusBar(0);
|
this->setStatusBar(0);
|
||||||
|
|
||||||
#ifdef GUI_800x480
|
#ifdef GUI_800x480
|
||||||
this->menubar->setStyleSheet("QMenuBar { background-color: #4B4B4B; font-size:20px; border-width: 0px;} QMenuBar::item { color: #F0F0F0; }");
|
|
||||||
#ifdef ANDROID
|
#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;}");
|
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();
|
this->showFullScreen();
|
||||||
#else
|
#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;}");
|
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
|
#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;}");
|
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
@@ -112,9 +112,7 @@ 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) }");
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifndef ANDROID
|
||||||
a.setAttribute(Qt::WA_LockLandscapeOrientation);
|
|
||||||
#else
|
|
||||||
QPixmap *pixmap = new QPixmap(myAppDataPath + "gfx/gui/misc/welcomepokerth.png");
|
QPixmap *pixmap = new QPixmap(myAppDataPath + "gfx/gui/misc/welcomepokerth.png");
|
||||||
StartSplash splash(*pixmap);
|
StartSplash splash(*pixmap);
|
||||||
if(!myConfig->readConfigInt("DisableSplashScreenOnStartup")) {
|
if(!myConfig->readConfigInt("DisableSplashScreenOnStartup")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user