myQtHelper->getDataPath() removed
This commit is contained in:
@@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user