25 template<
typename T>
void save(
const QList<T>& list) {
26 QListIterator<T> iterator(list);
27 while (iterator.hasNext()) {
28 save(iterator.next());
32 void setDatabaseName(
const QString& x) Q_DECL_OVERRIDE { m_databasename = x; }
33 void setHostname(
const QString& x) Q_DECL_OVERRIDE { m_hostname = x; }
34 void setPort(
int x) Q_DECL_OVERRIDE { m_port = x; }
35 void setUserName(
const QString& x) Q_DECL_OVERRIDE { m_username = x; }
36 void setPassword(
const QString& x) Q_DECL_OVERRIDE { m_password = x; }
38 void changePassword(
const QString& login,
const QString& oldpassword,
const QString& newpassword) Q_DECL_OVERRIDE;
39 QList<Dbt::Users> authenticate(
const QString& login,
const QString& password) Q_DECL_OVERRIDE;
40 QList<Dbt::Users> users(
int id) Q_DECL_OVERRIDE;
41 QList<Dbt::Categories> categories(
const QString&
id) Q_DECL_OVERRIDE;
42 QList<Dbt::Categories> categoriesToRoot(
const QString&
id) Q_DECL_OVERRIDE;
43 QList<Dbt::Categories> subcategories(
const QString&
id) Q_DECL_OVERRIDE;
44 QList<Dbt::Categories> siblingcategories(
const QString&
id) Q_DECL_OVERRIDE;
45 QList<Dbt::UsersCategories> usersCategories(
int id,
int user,
const QString& category) Q_DECL_OVERRIDE;
46 QList<Dbt::CategoriesOverview> categoriesOverview(
const QStringList& statuses) Q_DECL_OVERRIDE;
47 QList<Dbt::StatusOrder> statusOrder(
const QString&
id) Q_DECL_OVERRIDE;
48 QList<Dbt::Statuses> statuses(
const QString&
id) Q_DECL_OVERRIDE;
49 QList<Dbt::Statuses> statuses(
const QString&,
const QString&) Q_DECL_OVERRIDE;
50 QList<Dbt::StatusTemplates> statusTemplates(
int id) Q_DECL_OVERRIDE;
52 QList<Dbt::Tickets> tickets(
bool all) Q_DECL_OVERRIDE;
53 QList<Dbt::Tickets> tickets(
int ticket,
bool all) Q_DECL_OVERRIDE;
54 QList<Dbt::Tickets> tickets(
const Dbt::Categories&,
bool all) Q_DECL_OVERRIDE;
55 QList<Dbt::TicketsVw> ticketsVw(
bool all) Q_DECL_OVERRIDE;
56 QList<Dbt::TicketsVw> ticketsVw(
int ticket,
bool all) Q_DECL_OVERRIDE;
57 QList<Dbt::TicketsVw> ticketsVw(
const Dbt::Categories&,
bool all) Q_DECL_OVERRIDE;
59 QList<Dbt::TicketStatus> ticketStatus(
int id) Q_DECL_OVERRIDE;
60 QList<Dbt::TicketStatus> ticketStatus(
int ticket,
bool all) Q_DECL_OVERRIDE;
61 QList<Dbt::TicketStatus> ticketStatus(
bool all) Q_DECL_OVERRIDE;
63 QList<Dbt::TicketValues> ticketValues(
int id) Q_DECL_OVERRIDE;
64 QList<Dbt::TicketValues> ticketValues(
int ticket,
bool all) Q_DECL_OVERRIDE;
65 QList<Dbt::TicketValues> ticketValues(
bool all) Q_DECL_OVERRIDE;
67 QList<Dbt::TicketFiles> ticketFiles(
int id) Q_DECL_OVERRIDE;
68 QList<Dbt::TicketFiles> ticketFiles(
int ticket,
bool all) Q_DECL_OVERRIDE;
69 QList<Dbt::TicketFiles> ticketFiles(
bool all) Q_DECL_OVERRIDE;
71 QList<Dbt::TicketTimesheets> ticketTimesheets(
int id) Q_DECL_OVERRIDE;
72 QList<Dbt::TicketTimesheets> ticketTimesheets(
int ticket,
bool all) Q_DECL_OVERRIDE;
73 QList<Dbt::TicketTimesheets> ticketTimesheets(
bool all) Q_DECL_OVERRIDE;
74 QList<Dbt::TicketTimesheets> runningTimesheets(
int ticket) Q_DECL_OVERRIDE;
75 QList<Dbt::TicketTimesheets> startTimesheet(
int ticket) Q_DECL_OVERRIDE;
76 QList<Dbt::TicketTimesheets> stopTimesheet(
int ticket) Q_DECL_OVERRIDE;
77 QList<Dbt::TicketTimesheets> toggleTimesheet(
int ticket) Q_DECL_OVERRIDE;
79 QList<Dbt::ClientSettings> clientSettings() Q_DECL_OVERRIDE;
80 QList<Dbt::Overview> overview(
const QString& category,
const QStringList& statuses) Q_DECL_OVERRIDE;
81 QList<Dbt::Overview> overview(
const QString& overviewId) Q_DECL_OVERRIDE;
82 QList<Dbt::OverviewList> overviewList() Q_DECL_OVERRIDE;
96 bool open() Q_DECL_OVERRIDE;
97 bool close() Q_DECL_OVERRIDE;
98 void begin() Q_DECL_OVERRIDE;
99 void commit() Q_DECL_OVERRIDE;
102 void createTemporaryTableCategories();
103 void createTemporaryTableTickets(
int ticket,
bool all);
104 static QString parentCategoryKey(
const QVariant& type,
const QVariant& system,
const QVariant& category,
int parent_type);
105 static QString categoryKey(
const QVariant& type,
const QVariant& system,
const QVariant& category,
int parent_type);
106 static QByteArray fileContent(
const QString& filename);
107 static QString suffixFromType(
const QString& type);
108 QVariant currval(
const QString& sequence);
111 bool m_temporaryTableTicketsCreated;
112 QString m_databasename;