myQtHelper->getDataPath() removed
This commit is contained in:
@@ -248,6 +248,23 @@ unix: !mac{
|
||||
message("Found libboost_thread")
|
||||
LIBS += -lboost_thread
|
||||
}
|
||||
|
||||
exists( /usr/lib/libboost_filesystem-mt.so ){
|
||||
message("Found libboost_filesystem-mt")
|
||||
LIBS += -lboost_filesystem-mt
|
||||
}
|
||||
exists( /usr/lib64/libboost_filesystem-mt.so ){
|
||||
message("Found libboost_filesystem-mt")
|
||||
LIBS += -lboost_filesystem-mt
|
||||
}
|
||||
exists( /usr/lib/libboost_filesystem.so ){
|
||||
message("Found libboost_filesystem")
|
||||
LIBS += -lboost_filesystem
|
||||
}
|
||||
exists( /usr/lib64/libboost_filesystem.so ){
|
||||
message("Found libboost_filesystem")
|
||||
LIBS += -lboost_filesystem
|
||||
}
|
||||
LIBPATH += lib
|
||||
LIBS += -lpokerth_lib
|
||||
LIBS += -lcrypto -lSDL_mixer
|
||||
|
||||
@@ -127,6 +127,23 @@ unix:!mac{
|
||||
message("Found libboost_thread")
|
||||
LIBS += -lboost_thread
|
||||
}
|
||||
|
||||
exists( /usr/lib/libboost_filesystem-mt.so ){
|
||||
message("Found libboost_filesystem-mt")
|
||||
LIBS += -lboost_filesystem-mt
|
||||
}
|
||||
exists( /usr/lib64/libboost_filesystem-mt.so ){
|
||||
message("Found libboost_filesystem-mt")
|
||||
LIBS += -lboost_filesystem-mt
|
||||
}
|
||||
exists( /usr/lib/libboost_filesystem.so ){
|
||||
message("Found libboost_filesystem")
|
||||
LIBS += -lboost_filesystem
|
||||
}
|
||||
exists( /usr/lib64/libboost_filesystem.so ){
|
||||
message("Found libboost_filesystem")
|
||||
LIBS += -lboost_filesystem
|
||||
}
|
||||
LIBPATH += lib
|
||||
LIBS += -lpokerth_lib
|
||||
LIBS += -lcrypto
|
||||
|
||||
@@ -2477,7 +2477,7 @@ void mainWindowImpl::breakButtonClicked() {
|
||||
|
||||
void mainWindowImpl::paintStartSplash() {
|
||||
|
||||
StartSplash *mySplash = new StartSplash(this);
|
||||
StartSplash *mySplash = new StartSplash(this, myConfig);
|
||||
|
||||
#ifdef __APPLE__
|
||||
int offset = 305;
|
||||
|
||||
@@ -19,16 +19,19 @@
|
||||
***************************************************************************/
|
||||
#include "startsplash.h"
|
||||
|
||||
StartSplash::StartSplash(mainWindowImpl *parent)
|
||||
: QSplashScreen(parent), myW(parent)
|
||||
#include "configfile.h"
|
||||
#include "mainwindowimpl.h"
|
||||
|
||||
StartSplash::StartSplash(mainWindowImpl *parent, ConfigFile *c)
|
||||
: QSplashScreen(parent), myW(parent), myConfig(c)
|
||||
{
|
||||
|
||||
myQtHelper = new QtHelper;
|
||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||
|
||||
QFontDatabase::addApplicationFont (myQtHelper->getDataPath() +"fonts/c059013l.pfb");
|
||||
QFontDatabase::addApplicationFont (myQtHelper->getDataPath() +"fonts/andybold.ttf");
|
||||
QFontDatabase::addApplicationFont (myAppDataPath +"fonts/c059013l.pfb");
|
||||
QFontDatabase::addApplicationFont (myAppDataPath +"fonts/andybold.ttf");
|
||||
|
||||
logo = myQtHelper->getDataPath()+"gfx/gui/misc/logoChip3D.png";
|
||||
logo = myAppDataPath+"gfx/gui/misc/logoChip3D.png";
|
||||
|
||||
|
||||
frameNo = 52;
|
||||
|
||||
@@ -12,17 +12,16 @@
|
||||
#ifndef STARTSPLASH_H
|
||||
#define STARTSPLASH_H
|
||||
|
||||
#include "mainwindowimpl.h"
|
||||
#include "qthelper.h"
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
class mainWindowImpl;
|
||||
class ConfigFile;
|
||||
class StartSplash : public QSplashScreen
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
StartSplash(mainWindowImpl *);
|
||||
StartSplash(mainWindowImpl *, ConfigFile*);
|
||||
|
||||
~StartSplash();
|
||||
|
||||
@@ -39,8 +38,9 @@ public slots:
|
||||
private:
|
||||
|
||||
mainWindowImpl *myW;
|
||||
QtHelper *myQtHelper;
|
||||
QPixmap logo;
|
||||
QString myAppDataPath;
|
||||
QPixmap logo;
|
||||
ConfigFile *myConfig;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ selectAvatarDialogImpl::selectAvatarDialogImpl(QWidget *parent, ConfigFile *c)
|
||||
|
||||
setupUi(this);
|
||||
|
||||
myQtHelper = new QtHelper;
|
||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||
|
||||
pushButton_OpenAvatarFile->setIcon(QIcon(QPixmap(myQtHelper->getDataPath()+"gfx/gui/misc/fileopen16.png")));
|
||||
pushButton_OpenAvatarFile->setIcon(QIcon(QPixmap(myAppDataPath+"gfx/gui/misc/fileopen16.png")));
|
||||
|
||||
// listWidget->setViewMode(QListView::IconMode);
|
||||
// listWidget->setIconSize(QSize(50,50));
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
|
||||
#include "qthelper.h"
|
||||
|
||||
class ConfigFile;
|
||||
class selectAvatarDialogImpl;
|
||||
|
||||
@@ -53,11 +51,11 @@ public slots:
|
||||
private:
|
||||
|
||||
ConfigFile* myConfig;
|
||||
QtHelper *myQtHelper;
|
||||
|
||||
bool settingsCorrect;
|
||||
QString externalAvatar;
|
||||
QString avatarDir;
|
||||
QString myAppDataPath;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -30,11 +30,11 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
|
||||
{
|
||||
|
||||
setupUi(this);
|
||||
|
||||
QtHelper *myQtHelper = new QtHelper;
|
||||
|
||||
pushButton_openFlipsidePicture->setIcon(QIcon(QPixmap(myQtHelper->getDataPath()+"gfx/gui/misc/fileopen16.png")));
|
||||
pushButton_openLogDir->setIcon(QIcon(QPixmap(myQtHelper->getDataPath()+"gfx/gui/misc/fileopen16.png")));
|
||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||
|
||||
pushButton_openFlipsidePicture->setIcon(QIcon(QPixmap(myAppDataPath+"gfx/gui/misc/fileopen16.png")));
|
||||
pushButton_openLogDir->setIcon(QIcon(QPixmap(myAppDataPath+"gfx/gui/misc/fileopen16.png")));
|
||||
|
||||
if (myConfig->readConfigInt("CLA_NoWriteAccess")) { groupBox_logOnOff->setDisabled(TRUE); }
|
||||
|
||||
|
||||
@@ -23,8 +23,6 @@
|
||||
#include "ui_settingsdialog.h"
|
||||
#include "selectavatardialogimpl.h"
|
||||
|
||||
#include "qthelper.h"
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
|
||||
@@ -68,6 +66,7 @@ private:
|
||||
|
||||
ConfigFile* myConfig;
|
||||
selectAvatarDialogImpl* mySelectAvatarDialogImpl;
|
||||
QString myAppDataPath;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ SDLPlayer::SDLPlayer(ConfigFile *c)
|
||||
SDL_Init(SDL_INIT_AUDIO);
|
||||
initAudio();
|
||||
|
||||
myQtHelper = new QtHelper;
|
||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ void SDLPlayer::playSound(string audioString, int playerID) {
|
||||
|
||||
if(audioEnabled && myConfig->readConfigInt("PlaySoundEffects")) {
|
||||
|
||||
QFile myFile(myQtHelper->getDataPath() + "sounds/default/" + QString::fromStdString(audioString)+".wav");
|
||||
QFile myFile(myAppDataPath + "sounds/default/" + QString::fromStdString(audioString)+".wav");
|
||||
|
||||
if(myFile.open(QIODevice::ReadOnly)) {
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#define SDLPLAYER_H
|
||||
|
||||
#include "configfile.h"
|
||||
#include "qthelper.h"
|
||||
|
||||
#if (defined _WIN32) || (defined __APPLE__)
|
||||
#include <SDL_mixer.h>
|
||||
@@ -53,7 +52,7 @@ private:
|
||||
bool audioEnabled;
|
||||
|
||||
ConfigFile *myConfig;
|
||||
QtHelper *myQtHelper;
|
||||
QString myAppDataPath;
|
||||
|
||||
};
|
||||
|
||||
|
||||
+5
-7
@@ -36,8 +36,6 @@
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
#include "qthelper.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
|
||||
@@ -68,7 +66,6 @@ int main( int argc, char **argv )
|
||||
{
|
||||
//create defaultconfig
|
||||
ConfigFile *myConfig = new ConfigFile(argc, argv);
|
||||
QtHelper *myQtHelper = new QtHelper;
|
||||
//ENABLE_LEAK_CHECK();
|
||||
|
||||
//_CrtSetBreakAlloc(49937);
|
||||
@@ -81,13 +78,14 @@ int main( int argc, char **argv )
|
||||
// set PlastiqueStyle even for mac-version to prevent artefacts on styled widgets
|
||||
a.setStyle(new QPlastiqueStyle);
|
||||
|
||||
QString myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||
//set QApplication default font
|
||||
#ifdef _WIN32
|
||||
QString font1String("font-family: \"Arial\";");
|
||||
|
||||
#else
|
||||
QFontDatabase::addApplicationFont (myQtHelper->getDataPath() +"fonts/n019003l.pfb");
|
||||
QFontDatabase::addApplicationFont (myQtHelper->getDataPath() +"fonts/VeraBd.ttf");
|
||||
QFontDatabase::addApplicationFont (myAppDataPath +"fonts/n019003l.pfb");
|
||||
QFontDatabase::addApplicationFont (myAppDataPath +"fonts/VeraBd.ttf");
|
||||
|
||||
QString font1String("font-family: \"Nimbus Sans L\";");
|
||||
#endif
|
||||
@@ -95,11 +93,11 @@ int main( int argc, char **argv )
|
||||
|
||||
//Set translations
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load(QString(myQtHelper->getDataPath() +"translations/qt_") + QString::fromStdString(myConfig->readConfigString("Language")));
|
||||
qtTranslator.load(QString(myAppDataPath +"translations/qt_") + QString::fromStdString(myConfig->readConfigString("Language")));
|
||||
a.installTranslator(&qtTranslator);
|
||||
|
||||
QTranslator translator;
|
||||
translator.load(QString(myQtHelper->getDataPath() +"translations/pokerth_") + QString::fromStdString(myConfig->readConfigString("Language")));
|
||||
translator.load(QString(myAppDataPath +"translations/pokerth_") + QString::fromStdString(myConfig->readConfigString("Language")));
|
||||
a.installTranslator(&translator);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user