#include <datenbank.h>
Public Member Functions | |
| Datenbank (const QString &) | |
| ~Datenbank () | |
| QStringList | getTags (const QString &) const |
| void | writeTags (const QString &, const QStringList &) const |
| QStringList | findByTag (const QString &) const |
| QStringList | findByTagList (const QStringList &, const QStringList &=QStringList()) const |
| QStringList | getAllTags () const |
| QStringList | getAllImages () const |
Private Member Functions | |
| void | createDatabase () |
Private Attributes | |
| QSqlDatabase | m_db |
| Tagdatenbank. | |
Definition at line 28 of file datenbank.h.
| Datenbank::Datenbank | ( | const QString & | db_path | ) |
Constructor
| db_path | Pfad zur Datenbank |
Definition at line 37 of file datenbank.cpp.
References CONNECTION_NAME, createDatabase(), and m_db.

| Datenbank::~Datenbank | ( | ) |
| void Datenbank::createDatabase | ( | ) | [private] |
Datenbank nicht gefunden, also neu anlegen.
Definition at line 56 of file datenbank.cpp.
References m_db.
Referenced by Datenbank().

| QStringList Datenbank::getTags | ( | const QString & | bild | ) | const |
Alle zu einem Bild gehoerenden Tags heraussuchen.
| bild | Vollstaendiger Name des Bildes |
Definition at line 79 of file datenbank.cpp.
References m_db.
Referenced by MainWin::displayPicture().
| void Datenbank::writeTags | ( | const QString & | bild, | |
| const QStringList & | taglist | |||
| ) | const |
Schreibt die zum Bild gehoerigen Tags in die Datenbank
Eventuelle bereits vorhandene Tags, die jetzt nicht mehr in der Liste sind werden geloescht.
| bild | Vollstaendiger Name des Bildes | |
| taglist | Vollstaendige Liste der Tags. |
Definition at line 108 of file datenbank.cpp.
References m_db.
Referenced by MainWin::saveData().
| QStringList Datenbank::findByTag | ( | const QString & | tag | ) | const |
Sucht alle Bilder die mit einem Tag versehen sind.
| tag | Der Tag, nach dem gesucht wird. |
Definition at line 165 of file datenbank.cpp.
References m_db.
Referenced by Tagsuche::accept().

| QStringList Datenbank::findByTagList | ( | const QStringList & | mustHave, | |
| const QStringList & | notHave = QStringList() | |||
| ) | const |
Sucht Bilder ueber erweiterte Suche
| mustHave | Liste der Tags, die das Bild haben muss. | |
| notHave | Liste der Tags, die das Bild nicht haben darf. |
Definition at line 192 of file datenbank.cpp.
References getAllImages(), and m_db.
Referenced by Tagsuche::accept().


| QStringList Datenbank::getAllTags | ( | ) | const |
Holt alle Tags, die Bildern zugeordnet wurden.
Definition at line 256 of file datenbank.cpp.
References m_db.
Referenced by MainWin::MainWin(), and Tagsuche::Tagsuche().

| QStringList Datenbank::getAllImages | ( | ) | const |
Definition at line 278 of file datenbank.cpp.
References m_db.
Referenced by findByTagList(), and MainWin::findNewPictures().

QSqlDatabase Datenbank::m_db [private] |
Tagdatenbank.
Definition at line 29 of file datenbank.h.
Referenced by createDatabase(), Datenbank(), findByTag(), findByTagList(), getAllImages(), getAllTags(), getTags(), writeTags(), and ~Datenbank().
1.5.6