Rabbit Remote Control 0.1.0-bate14
Loading...
Searching...
No Matches
CRecentDatabase Class Reference

The CRecentDatabase class. More...

#include <RecentDatabase.h>

Inheritance diagram for CRecentDatabase:
Collaboration diagram for CRecentDatabase:

Classes

struct  RecentItem

Public Member Functions

 CRecentDatabase (QObject *parent=nullptr)
int AddRecent (const RecentItem &item)
bool DeleteRecent (int id)
bool UpdateRecent (const RecentItem &item)
QList< RecentItemGetRecents (int limit=-1, int offset=0)
bool HasFileContents (const RecentItem &item)
Public Member Functions inherited from CDatabase
 CDatabase (QObject *parent=nullptr)
QSqlDatabase GetDatabase () const
virtual bool IsOpen () const
void CloseDatabase ()
 Close database.
const CParameterDatabaseGetParameter () const
const QString GetError () const
bool SetDatabase (const CDatabase *db)
 Share an existing database.
bool SetDatabase (const QSqlDatabase db, const CParameterDatabase *pPara)
 Share an existing database.
bool OpenDatabase (const CParameterDatabase *pPara=nullptr, const QString &szConnectName=QString())
 Open a new database.
bool OpenMySqlDatabase (const CParameterDatabase *pPara, const QString &szConnectName=QString())
bool OpenODBCDatabase (const CParameterDatabase *pPara, const QString &szConnectName=QString())
bool OpenSQLiteDatabase (const CParameterDatabase *pPara, const QString &szConnectionName=QString())
bool OpenSQLiteDatabase (const QString &szFile, const QString &szConnectionName=QString())
virtual bool ExportToJsonFile (const QString &szFile)
virtual bool ImportFromJsonFile (const QString &szFile)

Private Member Functions

bool OnInitializeDatabase () override
 Initialize database.
virtual bool OnInitializeSqliteDatabase () override
virtual bool OnInitializeMySqlDatabase () override
virtual bool ExportToJson (QJsonObject &obj) override
virtual bool ImportFromJson (const QJsonObject &obj) override
bool UpdateRecent (const QString &szFile, const QString &szName, const QString &szDescription)

Private Attributes

CDatabaseIcon m_IconDB
CDatabaseFile m_FileDB

Additional Inherited Members

Signals inherited from CDatabase
void sigChanged ()
Protected Member Functions inherited from CDatabase
void SetError (const QString &szErr=QString())
Protected Attributes inherited from CDatabase
QString m_szConnectName
QString m_MinVersion
const CParameterDatabasem_pPara

Detailed Description

The CRecentDatabase class.

Definition at line 15 of file RecentDatabase.h.

Constructor & Destructor Documentation

◆ CRecentDatabase()

CRecentDatabase::CRecentDatabase ( QObject * parent = nullptr)
explicit

Definition at line 31 of file RecentDatabase.cpp.

◆ ~CRecentDatabase()

CRecentDatabase::~CRecentDatabase ( )
virtual

Definition at line 37 of file RecentDatabase.cpp.

Member Function Documentation

◆ AddRecent()

int CRecentDatabase::AddRecent ( const RecentItem & item)

Definition at line 151 of file RecentDatabase.cpp.

◆ DeleteRecent()

bool CRecentDatabase::DeleteRecent ( int id)

Definition at line 233 of file RecentDatabase.cpp.

◆ ExportToJson()

bool CRecentDatabase::ExportToJson ( QJsonObject & obj)
overrideprivatevirtual

Reimplemented from CDatabase.

Definition at line 298 of file RecentDatabase.cpp.

◆ GetRecents()

QList< CRecentDatabase::RecentItem > CRecentDatabase::GetRecents ( int limit = -1,
int offset = 0 )

Definition at line 249 of file RecentDatabase.cpp.

◆ HasFileContents()

bool CRecentDatabase::HasFileContents ( const RecentItem & item)

Definition at line 293 of file RecentDatabase.cpp.

◆ ImportFromJson()

bool CRecentDatabase::ImportFromJson ( const QJsonObject & obj)
overrideprivatevirtual

Reimplemented from CDatabase.

Definition at line 327 of file RecentDatabase.cpp.

◆ OnInitializeDatabase()

bool CRecentDatabase::OnInitializeDatabase ( )
overrideprivatevirtual

Initialize database.

Returns

Reimplemented from CDatabase.

Definition at line 42 of file RecentDatabase.cpp.

◆ OnInitializeMySqlDatabase()

bool CRecentDatabase::OnInitializeMySqlDatabase ( )
overrideprivatevirtual

Reimplemented from CDatabase.

Definition at line 106 of file RecentDatabase.cpp.

◆ OnInitializeSqliteDatabase()

bool CRecentDatabase::OnInitializeSqliteDatabase ( )
overrideprivatevirtual

Reimplemented from CDatabase.

Definition at line 55 of file RecentDatabase.cpp.

◆ UpdateRecent() [1/2]

bool CRecentDatabase::UpdateRecent ( const QString & szFile,
const QString & szName,
const QString & szDescription )
private

Definition at line 208 of file RecentDatabase.cpp.

◆ UpdateRecent() [2/2]

bool CRecentDatabase::UpdateRecent ( const RecentItem & item)

Definition at line 203 of file RecentDatabase.cpp.

Member Data Documentation

◆ m_FileDB

CDatabaseFile CRecentDatabase::m_FileDB
private

Definition at line 57 of file RecentDatabase.h.

◆ m_IconDB

CDatabaseIcon CRecentDatabase::m_IconDB
private

Definition at line 56 of file RecentDatabase.h.


The documentation for this class was generated from the following files: