/[qspeakers]/speakerdb.h
ViewVC logotype

Contents of /speakerdb.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 55 - (show annotations)
Sat Oct 18 04:02:02 2014 UTC (2 years, 8 months ago) by ben
File MIME type: text/plain
File size: 1428 byte(s)
use correct pkg path @ compile time
1 #ifndef SPEAKERDB_H
2 #define SPEAKERDB_H
3
4 #include <QString>
5 #include <QList>
6 #include <QFile>
7
8 #include "speaker.h"
9 #include "config.h"
10
11 #define PKG_DB DATADIR "/qspeakers/qspeakers_db.xml"
12
13 class SpeakerDb
14 {
15 public:
16 static bool exists(void);
17 static void insertOrReplace(const QString& vendor, const QString& name, const Speaker& speaker);
18 static void removeByVendorAndModel(const QString& vendor, const QString& model);
19 static Speaker getByVendorAndModel(const QString& vendor, const QString& model);
20
21 static QList<QString> getVendors(void);
22 static QList<QString> getModelsByVendor(const QString& vendor);
23
24 static QList<Speaker> getByVendor(const QString& vendor);
25 static QList<Speaker> getByFs(double min, double max);
26 static QList<Speaker> getBySd(double min, double max);
27 static QList<Speaker> getByVas(double min, double max);
28 static QList<Speaker> getByQts(double min, double max);
29 static QList<Speaker> getByRe(double min, double max);
30 static QList<Speaker> getByXmax(double min, double max);
31 static QList<Speaker> getByValue(QString var, double min, double max);
32
33 static bool merge(QFile& with);
34 static QDateTime lastModified(void);
35 static QDateTime pkgInstalled(void);
36 static QString pkgPath(void);
37
38 private:
39 static QString getPath(void);
40 static QDomDocument getDoc(void);
41
42 #define DB_FILENAME "qspeakers_db.xml"
43 };
44
45 #endif // SPEAKERDB_H

  ViewVC Help
Powered by ViewVC 1.1.26