mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-18 17:42:36 -05:00
Theme Editor: Enabled loading project files from the project panel
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26732 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1cc95c541b
commit
fc94a92ad1
6 changed files with 65 additions and 20 deletions
|
|
@ -22,8 +22,11 @@
|
|||
#include "projectfiles.h"
|
||||
|
||||
ProjectFiles::ProjectFiles(QHash<QString, QString>& settings,
|
||||
ProjectNode* parent): parentLink(parent)
|
||||
ProjectModel* model, ProjectNode* parent)
|
||||
: parentLink(parent)
|
||||
{
|
||||
base = settings.value("themebase");
|
||||
|
||||
QList<QString> keys;
|
||||
keys.append("wps");
|
||||
keys.append("rwps");
|
||||
|
|
@ -38,7 +41,7 @@ ProjectFiles::ProjectFiles(QHash<QString, QString>& settings,
|
|||
if(file != "" && file != "-")
|
||||
{
|
||||
file.replace("/.rockbox/", "");
|
||||
children.append(new ProjectFile(file, this));
|
||||
children.append(new ProjectFile(file, model, this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -94,10 +97,11 @@ void ProjectFiles::activated()
|
|||
}
|
||||
|
||||
/* Project File functions */
|
||||
ProjectFile::ProjectFile(QString file, ProjectNode* parent) :
|
||||
parentLink(parent), file(file)
|
||||
ProjectFile::ProjectFile(QString file, ProjectModel* model,
|
||||
ProjectNode* parent)
|
||||
:parentLink(parent), file(file)
|
||||
{
|
||||
|
||||
this->model = model;
|
||||
}
|
||||
|
||||
ProjectFile::~ProjectFile()
|
||||
|
|
@ -123,5 +127,7 @@ Qt::ItemFlags ProjectFile::flags(int column) const
|
|||
|
||||
void ProjectFile::activated()
|
||||
{
|
||||
QString base = dynamic_cast<ProjectFiles*>(parentLink)->getBase();
|
||||
model->loadFile(base + "/" + file);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue