This singleton class keeps track of all installed applets of Conrol Panel.
More...
#include <dcpappletdb.h>
List of all members.
Detailed Description
This singleton class keeps track of all installed applets of Conrol Panel.
Applet database can be filled with desktop files and then can be queried by category, usage, by applet name.
Constructor & Destructor Documentation
DcpAppletDb::~DcpAppletDb |
( |
|
) |
[virtual] |
DcpAppletDb::DcpAppletDb |
( |
const QString & |
pathName, |
|
|
const QString & |
nameFilter | |
|
) |
| | [protected] |
protected constructor for singleton
DcpAppletDb::DcpAppletDb |
( |
|
) |
[protected] |
Member Function Documentation
bool DcpAppletDb::addFile |
( |
const QString & |
filename |
) |
|
bool DcpAppletDb::addFiles |
( |
const QString & |
path, |
|
|
const QString & |
filter | |
|
) |
| | |
bool DcpAppletDb::addPath |
( |
const QString & |
pathName |
) |
|
adds files at a specified path pathName to the db
Returns the applet found in the database by its name.
- Returns:
- the object of an applet by name
QStringList DcpAppletDb::appletNames |
( |
|
) |
const |
returns all applet names of the db
bool DcpAppletDb::containsFile |
( |
const QString & |
fileName |
) |
|
checks if fileName has already added to the db
bool DcpAppletDb::containsName |
( |
const QString & |
name |
) |
|
checks if an applet with given name is already in the db
void DcpAppletDb::destroy |
( |
void |
|
) |
[static] |
void DcpAppletDb::destroyData |
( |
void |
|
) |
|
destroys all the contents (metadata) of the db
erase metadata from the db
void DcpAppletDb::initEmptyDb |
( |
|
) |
[static] |
Initializes an empty db.
It can be used to avoid parsing the .desktop files on the instance call. If db is already initialized, it just outputs a warning.
Gives back the db instance.
This function has two optional arguments, so the path and the filter can be initialized as the very first step. Pathname can also be a list of paths separated by ':'.
Use this function to get the instance of the DcpAppletDb singleton, by re-using the existing one and initializing it.
bool DcpAppletDb::isAppletLoaded |
( |
const QString & |
name |
) |
|
checks if the applet with this name is loaded already
List all applets.
- Returns:
- the metadata list of the applets
- Parameters:
-
| category | An array of string pointers with the category names. All categories with these names will be added. |
| n_categories | The size of the name array. |
| checkFunction | If not NULL the function will be called with the category name of the metadata items and those that are getting false return value are going to be added too. Used to handle the uncategorized applets. |
Queries the db for a specified applet category.
- Parameters:
-
| category | the name of the category |
- Returns:
- the metadata list of the matching applets
List the four most used applets.
The first element will be the applet used last time, the next three will be the most frequently used ones.
Returns an empty list in case nost used item handling is disabled.
Lists the loaded applets.
- Returns:
- the metadata of an applet by name
Friends And Related Function Documentation
friend class Ut_DcpAppletDb [friend] |
The documentation for this class was generated from the following files: