/[qspeakers]/branches/qtcharts/speakerdb.h
ViewVC logotype

Contents of /branches/qtcharts/speakerdb.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 285 - (show annotations)
Sat Nov 7 16:27:00 2020 UTC (7 months, 1 week ago) by ben
File MIME type: text/plain
File size: 2021 byte(s)
Adjust combobox size
1 #ifndef SPEAKERDB_H
2 #define SPEAKERDB_H
3
4 #include <QDomDocument>
5 #include <QDateTime>
6 #include <QString>
7 #include <QList>
8 #include <QFile>
9
10 #include "speaker.h"
11 #include "config.h"
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(int *maxchars = nullptr);
22 static QList<QString> getModelsByVendor(const QString& vendor, int* maxchars = nullptr);
23
24 static QList<Speaker> getByVendor(const QString& vendor);
25 static QList<Speaker> getByFs(double min, double max);
26 static QList<Speaker> getByDia(double min, double max);
27 static QList<Speaker> getByZ(double min, double max);
28 static QList<Speaker> getBySd(double min, double max);
29 static QList<Speaker> getByVas(double min, double max);
30 static QList<Speaker> getByQts(double min, double max);
31 static QList<Speaker> getByQes(double min, double max);
32 static QList<Speaker> getByQms(double min, double max);
33 static QList<Speaker> getByRe(double min, double max);
34 static QList<Speaker> getByXmax(double min, double max);
35 static QList<Speaker> getBySpl(double min, double max);
36 static QList<Speaker> getByPe(double min, double max);
37 static QList<Speaker> getByBL(double min, double max);
38 static QList<Speaker> getByVc(int min, int max);
39
40 static QList<Speaker> getByValue(QString var, double min, double max);
41
42 static bool merge(QFile& with);
43 static QDateTime lastModified(void);
44 static QDateTime pkgInstalled(void);
45 static QString pkgPath(void);
46
47 private:
48 static QString getPath(void);
49 static QDomDocument getDoc(void);
50 static QString getPkgDbPath(void);
51
52 #define DB_FILENAME "qspeakers_db.xml"
53 #define PKG_DB DATADIR "/qspeakers/" DB_FILENAME
54 };
55
56 #endif // SPEAKERDB_H

  ViewVC Help
Powered by ViewVC 1.1.26