--- a/QTfrontend/main.cpp.in Fri Jan 12 15:23:16 2007 +0000
+++ b/QTfrontend/main.cpp.in Fri Jan 12 16:04:45 2007 +0000
@@ -22,12 +22,14 @@
#include <QMessageBox>
#include <QFileInfo>
#include <QDateTime>
+#include <QTextStream>
#include "hwform.h"
#include "hwconsts.h"
QDir * bindir;
QDir * cfgdir;
QDir * datadir;
+QStringList * Themes;
bool checkForDir(const QString & dir)
{
@@ -80,6 +82,20 @@
return 1;
}
+ Themes = new QStringList();
+ QFile themesfile(datadir->absolutePath() + "/Themes/themes.cfg");
+ if (themesfile.open(QIODevice::ReadOnly)) {
+ QTextStream stream(&themesfile);
+ QString str;
+ while (!stream.atEnd())
+ {
+ Themes->append(stream.readLine());
+ }
+ themesfile.close();
+ } else {
+ QMessageBox::critical(0, "Error", "Cannot access themes.cfg", "OK");
+ }
+
HWForm *Form = new HWForm();
Form->show();
return app.exec();