TrueType redering
This commit is contained in:
parent
862bc20776
commit
e66a3f1fa6
3 changed files with 84 additions and 6 deletions
42
Skin.cpp
42
Skin.cpp
|
@ -3,11 +3,12 @@
|
|||
|
||||
Skin::Skin (string m_skinname) : m_skinname (m_skinname)
|
||||
{
|
||||
m_path = QString ("./CleanAMP/");
|
||||
m_path = QString ("./Debian/");
|
||||
|
||||
m_items = new QHash<uint, QPixmap>;
|
||||
m_volume_bar = new QHash<uint, QPixmap>;
|
||||
m_balance = new QHash<uint, QPixmap>;
|
||||
m_pledit_txt = new QHash<QByteArray, QByteArray>;
|
||||
|
||||
BuildLetterMap();
|
||||
BuildButtons();
|
||||
|
@ -15,6 +16,7 @@ Skin::Skin (string m_skinname) : m_skinname (m_skinname)
|
|||
BuildSliders();
|
||||
BuildOther();
|
||||
BuildTitleBar();
|
||||
ParsePLEdit();
|
||||
}
|
||||
|
||||
|
||||
|
@ -22,6 +24,44 @@ Skin::~Skin ()
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
Skin::ParsePLEdit (void)
|
||||
{
|
||||
QDir dir;
|
||||
QString path;
|
||||
|
||||
dir.setPath (m_path);
|
||||
dir.setFilter (QDir::Files);
|
||||
|
||||
QFileInfoList list = dir.entryInfoList();
|
||||
for (int i = 0; i < list.size(); ++i) {
|
||||
QFileInfo fileInfo = list.at(i);
|
||||
if (fileInfo.fileName().toLower() == "pledit.txt") {
|
||||
path += fileInfo.filePath ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (path.isNull ()) {
|
||||
qDebug ("trasigt!");
|
||||
return;
|
||||
}
|
||||
|
||||
QFile file (path);
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
return;
|
||||
|
||||
while (!file.atEnd ()) {
|
||||
QByteArray line = file.readLine ();
|
||||
QList<QByteArray> l = line.split ('=');
|
||||
if (l.count () == 2) {
|
||||
m_pledit_txt->insert (l[0].toLower (), l[1].trimmed());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
QPixmap *Skin::GetPixmap (string file)
|
||||
{
|
||||
/* check for files in zip and check if file exists */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue