tools/qtestlib/chart/database.h
changeset 30 5dc02b23752f
parent 18 2f34d5167611
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
    41 #ifndef DATABASE_H
    41 #ifndef DATABASE_H
    42 #define DATABASE_H
    42 #define DATABASE_H
    43 
    43 
    44 #include <QtCore>
    44 #include <QtCore>
    45 #include <QtSql>
    45 #include <QtSql>
       
    46 #include <QtCore/qglobal.h>
       
    47 
       
    48 QT_BEGIN_NAMESPACE
    46 
    49 
    47 extern QString resultsTable;
    50 extern QString resultsTable;
    48 QSqlDatabase openDataBase(const QString &databaseFile = "database");
    51 QSqlDatabase openDataBase(const QString &databaseFile = "database");
    49 QSqlDatabase createDataBase(const QString &databaseFile = "database");
    52 QSqlDatabase createDataBase(const QString &databaseFile = "database");
    50 
    53 
    54 
    57 
    55 void execQuery(QSqlQuery query, bool warnOnFail = true);
    58 void execQuery(QSqlQuery query, bool warnOnFail = true);
    56 void execQuery(const QString &spec, bool warnOnFail = true);
    59 void execQuery(const QString &spec, bool warnOnFail = true);
    57 void printDataBase();
    60 void printDataBase();
    58 void displayTable(const QString &table);
    61 void displayTable(const QString &table);
       
    62 
    59 
    63 
    60 class TempTable
    64 class TempTable
    61 {
    65 {
    62 public:
    66 public:
    63     TempTable(const QString &spec);
    67     TempTable(const QString &spec);
    93     void addResult(const QString &series , const QString &index, const QString &result, const QString &iterations = QLatin1String("1"));
    97     void addResult(const QString &series , const QString &index, const QString &result, const QString &iterations = QLatin1String("1"));
    94 
    98 
    95     QSqlDatabase db;
    99     QSqlDatabase db;
    96 };
   100 };
    97 
   101 
       
   102 QT_END_NAMESPACE
    98 
   103 
    99 #endif
   104 #endif
       
   105