(BB10) Rename 'rom' references to 'Content'

This commit is contained in:
twinaphex 2014-05-17 15:58:20 +02:00
parent ff4a0913be
commit 951c37cfa1
3 changed files with 31 additions and 33 deletions

View File

@ -8,14 +8,12 @@ Page {
ActionBar.placement: ActionBarPlacement.OnBar
imageSource: "asset:///images/open.png"
onTriggered: {
if(RetroArch.rom == "" || RetroArch.core == "")
if(RetroArch.content == "" || RetroArch.core == "")
{
//Do something to focus on select rom box
//Do something to focus on select content box
}
else
{
RetroArch.startEmulator();
}
RetroArch.start();
}
}
]
@ -66,7 +64,7 @@ Page {
//I like the look as a textbox
DropDown
{
id: romName
id: contentName
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
preferredWidth: 600
@ -74,7 +72,7 @@ Page {
title: if(picker.selectedFile)
picker.selectedFile
else
"Rom Selection"
"Content Selection"
}
ImageButton {
@ -93,15 +91,15 @@ Page {
property string selectedFile
title: "Rom Selector"
filter: { RetroArch.romExtensions.split("|") }
title: "Content Selector"
filter: { RetroArch.contentExtensions.split("|") }
type: FileType.Other
directories: ["/accounts/1000/shared/documents/roms"]
directories: ["/accounts/1000/shared/documents/content"]
onFileSelected: {
RetroArch.rom = selectedFiles[0];
selectedFile = RetroArch.rom.substr(RetroArch.rom.lastIndexOf('/')+1);
picker.directories = [RetroArch.rom.substr(0, RetroArch.rom.lastIndexOf('/'))];
RetroArch.content = selectedFiles[0];
selectedFile = RetroArch.content.substr(RetroArch.content.lastIndexOf('/')+1);
picker.directories = [RetroArch.content.substr(0, RetroArch.content.lastIndexOf('/'))];
}
}
]

View File

@ -188,14 +188,14 @@ exit:
/*
* Properties
*/
QString RetroArch::getRom()
QString RetroArch::getContent()
{
return rom;
return content;
}
void RetroArch::setRom(QString rom)
void RetroArch::setContent(QString content)
{
this->rom = rom;
this->content = content;
}
QString RetroArch::getCore()
@ -208,9 +208,9 @@ void RetroArch::setCore(QString core)
this->core = core;
}
QString RetroArch::getRomExtensions()
QString RetroArch::getContentExtensions()
{
return romExtensions;
return contentExtensions;
}
/*
@ -233,12 +233,12 @@ void RetroArch::onCoreSelected(QVariant value)
core.append(core_info_list->list[coreSelectedIndex].path);
emit coreChanged(core);
romExtensions = QString("*.%1").arg(core_info_list->list[coreSelectedIndex].supported_extensions);
romExtensions.replace("|", "|*.");
emit romExtensionsChanged(romExtensions);
contentExtensions = QString("*.%1").arg(core_info_list->list[coreSelectedIndex].supported_extensions);
contentExtensions.replace("|", "|*.");
emit contentExtensionsChanged(contentExtensions);
qDebug() << "Core Selected: " << core;
qDebug() << "Supported Extensions: " << romExtensions;
qDebug() << "Supported Extensions: " << contentExtensions;
}
/*
@ -315,7 +315,7 @@ void RetroArch::initRASettings()
HardwareInfo *hwInfo;
strlcpy(g_settings.libretro,(char *)core.toAscii().constData(), sizeof(g_settings.libretro));
strlcpy(g_extern.fullpath, (char *)rom.toAscii().constData(), sizeof(g_extern.fullpath));
strlcpy(g_extern.fullpath, (char *)content.toAscii().constData(), sizeof(g_extern.fullpath));
hwInfo = new HardwareInfo();

View File

@ -25,9 +25,9 @@ class RetroArch: public QThread
{
Q_OBJECT
Q_PROPERTY(QString rom READ getRom WRITE setRom NOTIFY romChanged)
Q_PROPERTY(QString content READ getContent WRITE setContent NOTIFY contentChanged)
Q_PROPERTY(QString core READ getCore WRITE setCore NOTIFY coreChanged)
Q_PROPERTY(QString romExtensions READ getRomExtensions NOTIFY romExtensionsChanged)
Q_PROPERTY(QString contentExtensions READ getContentExtensions NOTIFY contentExtensionsChanged)
public:
RetroArch();
@ -39,9 +39,9 @@ public:
void populateCores(core_info_list_t * info);
signals:
void romChanged(QString);
void contentChanged(QString);
void coreChanged(QString);
void romExtensionsChanged(QString);
void contentExtensionsChanged(QString);
public slots:
void aboutToQuit();
@ -55,16 +55,16 @@ private:
*/
void run();
QString rom;
QString getRom();
void setRom(QString rom);
QString content;
QString getContent();
void setContent(QString content);
QString core;
QString getCore();
void setCore(QString core);
QString romExtensions;
QString getRomExtensions();
QString contentExtensions;
QString getContentExtensions();
void initRASettings();