62 std::tuple<std::deque<PrintedPage>,
int>
getPagesDesc(
int page_index,
int page_size)
const;
71 std::unique_ptr<QSqlQuery>
query;
SqliteDb(const SqliteDb &)=delete
SqliteDb()
定义 SqliteDb.cpp:22
SqliteDb & operator=(const SqliteDb &)=delete
void initDb()
定义 SqliteDb.cpp:50
void delConfig(int id) const
delete a config by id.
定义 SqliteDb.cpp:210
void updateConfig(const PrinterConfig &) const
update Config
定义 SqliteDb.cpp:185
SqliteDb(SqliteDb &&)=delete
std::unique_ptr< QSqlQuery > query
定义 SqliteDb.h:71
bool checkValid()
check tables is valid
定义 SqliteDb.cpp:82
void addConfig(PrinterConfig &) const
add a new config. config.id will be set to the database id
定义 SqliteDb.cpp:138
static SqliteDb & instance()
定义 SqliteDb.cpp:33
SqliteDb & operator=(SqliteDb &&)=delete
void updatePage(const PrintedPage &) const
update Page
定义 SqliteDb.cpp:317
void addPage(PrintedPage &) const
add new page page.id will be set to the database id
定义 SqliteDb.cpp:278
void createDb()
定义 SqliteDb.cpp:37
std::deque< PrinterConfig > getAllConfigs() const
get all configs.
定义 SqliteDb.cpp:248
QSqlDatabase db
定义 SqliteDb.h:70
PrinterConfig getConfigById(int id) const
Get the Config By Id object
定义 SqliteDb.cpp:217
std::tuple< std::deque< PrintedPage >, int > getPagesDesc(int page_index, int page_size) const
定义 SqliteDb.cpp:336