#include <database.h>
Public Methods | |
database () | |
contructor with empty parameters | |
database (const QString qs_Location) | |
contructor with a string param | |
~database () | |
destructor | |
QPtrVector< QString > | search_software (const QString qs_String) |
searches for software matching the search term | |
QPtrVector< QString > | search_class (const QString qs_String) |
searches for all classes that match the given term | |
QPtrVector< QString > | get_software (const QString qs_Software) |
returns the information on a piece of software | |
QPtrVector< QString > | get_class (const QString qs_Class) |
returns the various pieces of software for a given class | |
QPtrVector< QString > | get_all_classes () |
returns an array of all classes | |
QPtrVector< QString > | get_all_software (QString qs_Class) |
returns an array of all pieces for the given course | |
bool | update (const QString qs_Url) |
updates the xml database with one pulled from a server | |
Private Attributes | |
QDomDocument | qdd_Xml |
needed crap for the xml stuffs |
The database class allows for simple, easy, access to the xml database that stores information on various classes and the software that would nicely complement them.
Definition at line 16 of file database.h.
|
contructor with empty parameters If no params are passed, it will use the default locations for the xml, looking in ~/.class-soft/class.xml and then /etc/class-soft/class.xml Definition at line 12 of file database.cpp. References qdd_Xml. |
|
contructor with a string param
Definition at line 52 of file database.cpp. References qdd_Xml. |
|
destructor Really just here because it should be. Definition at line 71 of file database.cpp. |
|
returns an array of all classes Returned data will be of the form:
Definition at line 252 of file database.cpp. References qdd_Xml. Referenced by Listing::Listing(). |
|
returns an array of all pieces for the given course Returned data will be of the form:
Definition at line 279 of file database.cpp. References qdd_Xml. Referenced by Listing::Listing(). |
|
returns the various pieces of software for a given class Returned data will be of the form:
Definition at line 128 of file database.cpp. References qdd_Xml. Referenced by fShowClass(), and TextView::showInfo(). |
|
returns the information on a piece of software Returned data will be of the form:
Definition at line 76 of file database.cpp. References qdd_Xml. Referenced by fShowSoftware(), and TextView::showInfo(). |
|
searches for all classes that match the given term search_class will return an array of string containing the course names (in the department number form) of all matching classes.
Definition at line 175 of file database.cpp. References qdd_Xml. Referenced by fSearchClass(). |
|
searches for software matching the search term search_software will return an array of strings containing the name of all matching pieces of software
Definition at line 210 of file database.cpp. References qdd_Xml. Referenced by fSearchSoftware(). |
|
updates the xml database with one pulled from a server It will attempt to save the new file in /etc/class-soft/class.xml. If that fails it next tries ~/.class-soft/class.xml If anything doesn't work, false will be returned, otherwise true is.
Definition at line 245 of file database.cpp. |