Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

AppLnkSet Class Reference

The AppLnkSet class is a set of AppLnk objects. More...

#include </home/clem/local/src/opie/library/applnk.h>

Inheritance diagram for AppLnkSet:

Inheritance graph
[legend]
Collaboration diagram for AppLnkSet:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AppLnkSet ()
 AppLnkSet (const QString &dir)
 ~AppLnkSet ()
const AppLnkfind (int id) const
const AppLnkfindExec (const QString &execname) const
QStringList types () const
QString typeName (const QString &) const
QPixmap typePixmap (const QString &) const
QPixmap typeBigPixmap (const QString &) const
void add (AppLnk *)
bool remove (AppLnk *)
void clear ()
const QList< AppLnk > & children () const
void detachChildren ()

Protected Attributes

QList< AppLnkmApps
QString mFile
QStringList typs
AppLnkSetPrivated

Private Member Functions

 AppLnkSet (const AppLnkSet &)
void findChildren (const QString &, const QString &t, const QString &lt, int depth=0)

Friends

class AppLnk

Detailed Description

The AppLnkSet class is a set of AppLnk objects.

Definition at line 145 of file applnk.h.


Constructor & Destructor Documentation

AppLnkSet::AppLnkSet  ) 
 

Constructs an empty AppLnkSet.

Definition at line 1062 of file applnk.cpp.

AppLnkSet::AppLnkSet const QString directory  ) 
 

Constructs an AppLnkSet that contains AppLnk objects representing all the files in the given directory (and any subdirectories recursively).

The directories may contain ".directory" files which override any AppLnk::type() values for AppLnk objects found in the directory. This allows simple localization of application types.

Definition at line 1078 of file applnk.cpp.

References findChildren(), mFile, and QString::null.

AppLnkSet::~AppLnkSet  ) 
 

Destroys the set, deleting all the AppLnk objects it contains.

See also:
detachChildren()

Definition at line 1106 of file applnk.cpp.

References d, mApps, and AppLnk::mId.

AppLnkSet::AppLnkSet const AppLnkSet  )  [private]
 


Member Function Documentation

void AppLnkSet::add AppLnk f  ) 
 

Adds AppLnk f to the set. The set takes responsibility for deleting f.

See also:
remove()

Definition at line 1183 of file applnk.cpp.

References AppLnk::lastId, mApps, AppLnk::mId, and qWarning().

Referenced by DocLnkSet::DocLnkSet(), DocLnkSet::findChildren(), findChildren(), DocumentListPrivate::store(), and Doc_DirLister::systemMsg().

const QList< AppLnk > & AppLnkSet::children  )  const [inline]
 

Returns the members of the set.

Reimplemented in DocLnkSet.

Definition at line 174 of file applnk.h.

References mApps.

Referenced by DocumentList::DiffAppLnks(), find(), findExec(), MagicTextBrowser::generateQpe(), DocumentList::reloadAppLnks(), AppLnkSearch::search(), and MimeType::updateApplications().

void AppLnkSet::clear  )  [inline]
 

Definition at line 162 of file applnk.h.

References QValueList< T >::clear(), mApps, AppLnk::mId, and typs.

Referenced by DocumentListPrivate::initialize(), and FileSelector::reread().

void AppLnkSet::detachChildren  ) 
 

Detaches all AppLnk objects from the set. The set become empty and the caller becomes responsible for deleting the AppLnk objects.

Definition at line 1090 of file applnk.cpp.

References mApps, and AppLnk::mId.

Referenced by PlayListFileView::scanFiles(), PlayListWidget::scanForAudio(), and PlayListWidget::scanForVideo().

const AppLnk * AppLnkSet::find int  id  )  const
 

Returns the AppLnk with the given id.

Definition at line 1250 of file applnk.cpp.

References app, children(), and AppLnk::id().

void AppLnkSet::findChildren const QString ,
const QString t,
const QString lt,
int  depth = 0
[private]
 

Definition at line 1118 of file applnk.cpp.

References add(), app, QValueList< T >::append(), AppLnk, d, QDir::entryInfoList(), AppLnk::exec(), QDir::exists(), QFileInfo::extension(), FALSE, Config::File, QFileInfo::fileName(), QFileInfo::filePath(), QDict< type >::insert(), Global::isBuiltinCommand(), QFileInfo::isDir(), QString::isEmpty(), QString::isNull(), list, Config::readEntry(), Config::setGroup(), AppLnk::setType(), TRUE, AppLnkSetPrivate::typName, AppLnkSetPrivate::typPix, and typs.

Referenced by AppLnkSet().

const AppLnk * AppLnkSet::findExec const QString exec  )  const
 

Returns the AppLnk with the given exec attribute.

Definition at line 1266 of file applnk.cpp.

References app, children(), and AppLnk::exec().

Referenced by TaskSelector::buildMenu(), and AppLauncher::sigStopped().

bool AppLnkSet::remove AppLnk f  ) 
 

Removes AppLnk f to the set. The caller becomes responsible for deleting f. Returns TRUE if f was in the set; otherwise returns FALSE.

See also:
add()

Definition at line 1201 of file applnk.cpp.

References FALSE, mApps, AppLnk::mId, and TRUE.

Referenced by DocumentList::linkChanged(), and Doc_DirLister::systemMsg().

QPixmap AppLnkSet::typeBigPixmap const QString t  )  const
 

Returns the large pixmap associated with type t.

For applications, games and settings the type is Application; for documents the type is the document's MIME type.

Definition at line 1241 of file applnk.cpp.

References AppLnkImagePrivate::big(), d, QDict< type >::find(), and AppLnkSetPrivate::typPix.

Referenced by DocumentList::DiffAppLnks(), and DocumentList::reloadAppLnks().

QString AppLnkSet::typeName const QString t  )  const
 

Returns the localized name for type t.

For applications, games and settings the type is Application; for documents the type is the document's MIME type.

Definition at line 1217 of file applnk.cpp.

References d, QDict< type >::find(), QString::null, and AppLnkSetPrivate::typName.

Referenced by DocumentList::DiffAppLnks(), and DocumentList::reloadAppLnks().

QPixmap AppLnkSet::typePixmap const QString t  )  const
 

Returns the small pixmap associated with type t.

For applications, games and settings the type is Application; for documents the type is the document's MIME type.

Definition at line 1229 of file applnk.cpp.

References d, QDict< type >::find(), AppLnkImagePrivate::small(), and AppLnkSetPrivate::typPix.

Referenced by DocumentList::DiffAppLnks(), and DocumentList::reloadAppLnks().

QStringList AppLnkSet::types  )  const [inline]
 

Returns the list of types in the set.

For applications, games and settings the type is Application; for documents the type is the document's MIME type.

See also:
AppLnk::type(), typeName(), typePixmap(), typeBigPixmap()

Definition at line 155 of file applnk.h.

References typs.

Referenced by DocumentList::DiffAppLnks(), and DocumentList::reloadAppLnks().


Friends And Related Function Documentation

friend class AppLnk [friend]
 

Definition at line 178 of file applnk.h.

Referenced by findChildren().


Member Data Documentation

AppLnkSetPrivate* AppLnkSet::d [protected]
 

Definition at line 182 of file applnk.h.

Referenced by findChildren(), typeBigPixmap(), typeName(), typePixmap(), and ~AppLnkSet().

QList<AppLnk> AppLnkSet::mApps [protected]
 

Definition at line 179 of file applnk.h.

Referenced by add(), DocLnkSet::appendFrom(), DocLnkSet::children(), children(), clear(), detachChildren(), remove(), and ~AppLnkSet().

QString AppLnkSet::mFile [protected]
 

Definition at line 180 of file applnk.h.

Referenced by AppLnkSet(), and DocLnkSet::DocLnkSet().

QStringList AppLnkSet::typs [protected]
 

Definition at line 181 of file applnk.h.

Referenced by clear(), findChildren(), and types().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:26:37 2005 for OPIE by  doxygen 1.4.2