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

AppLnk Class Reference

The AppLnk class represents an application available on the system. More...

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

Inheritance diagram for AppLnk:

Inheritance graph
[legend]
Collaboration diagram for AppLnk:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AppLnk ()
 AppLnk (const QString &file)
 AppLnk (const AppLnk &copy)
virtual ~AppLnk ()
bool isValid () const
QString name () const
const QPixmap & pixmap () const
const QPixmap & bigPixmap () const
QString icon () const
virtual QString exec () const
QString type () const
QString rotation () const
QString comment () const
QString file () const
QString linkFile () const
QStringList mimeTypes () const
QStringList mimeTypeIcons () const
const QArray< int > & categories () const
int id () const
bool fileKnown () const
bool linkFileKnown () const
void execute () const
void execute (const QStringList &args) const
void removeFiles ()
void removeLinkFile ()
void setName (const QString &docname)
void setExec (const QString &exec)
void setFile (const QString &filename)
void setLinkFile (const QString &filename)
void setComment (const QString &comment)
void setType (const QString &mimetype)
void setRotation (const QString &rot)
void setIcon (const QString &iconname)
void setCategories (const QArray< int > &v)
bool writeLink () const
void setProperty (const QString &key, const QString &value)
QString property (const QString &key) const
AppLnkoperator= (const AppLnk &other)

Static Public Member Functions

static void setSmallIconSize (int)
static void setBigIconSize (int)
static int smallIconSize ()
static int bigIconSize ()

Protected Member Functions

virtual void invoke (const QStringList &args) const
bool ensureLinkExists () const
void storeLink () const

Protected Attributes

QString mName
QPixmap mPixmap
QPixmap mBigPixmap
QString mExec
QString mType
QString mRotation
QString mComment
QString mFile
QString mLinkFile
QString mIconFile
QStringList mMimeTypes
QStringList mMimeTypeIcons
int mId
AppLnkPrivated

Static Protected Attributes

static int lastId = 5000

Private Member Functions

const QPixmap & pixmap (int pos, int size) const

Friends

class AppLnkSet

Detailed Description

The AppLnk class represents an application available on the system.

Every Qtopia application app has a corresponding app.desktop file. When one of these files is read its data is stored as an AppLnk object.

The AppLnk class introduces some Qtopia-specific concepts, and provides a variety of functions, as described in the following sections.

Types

Every AppLnk object has a \e type. For applications, games and settings the type is \c Application; for documents the type is the document's MIME type. \target files-and-links @section Files and Links When you create an AppLnk (or more likely, a \link doclnk.html DocLnk\endlink), you don't deal directly with filenames in the filesystem. Instead you do this: @code DocLnk d; d.setType("text/plain"); d.setName("My Nicely Named Document / Whatever"); // Yes, "/" is legal. \endcode At this point, the file() and linkFile() are unknown. Normally this is uninteresting, and the names become automatically known, and more importantly, becomes reserved, when you ask what they are: @code QString fn = d.file(); \endcode This invents a filename, and creates the file on disk (an empty reservation file) to prevent the name being used by another application. In some circumstances, you don't want to create the file if it doesn't already exist (e.g. in the Document tab, some of the \link doclnk.html DocLnk\endlink objects represented by icons are DocLnk's created just for that view - they don't have corresponding \c .desktop files. To avoid littering empty reservation files around, we check in a few places to see whether the file really needs to exist). @section Functionality AppLnk objects are created by calling the constructor with the name of a \e .desktop file. The object can be checked for validity using isValid(). The following functions are used to set or retrieve information about the application: \table \header \i Get Function \i Set Function \i Short Description \row \i \l name() \i \l setName() \i application's name \row \i \l pixmap() \i \e none \i application's icon \row \i \l bigPixmap() \i \e none \i application's large icon \row \i \e none \i setIcon() \i sets the icon's filename \row \i \l type() \i \l setType() \i see \link #Types Types\endlink above \row \i \l rotation() \i \e none \i 0, 90, 180 or 270 degrees \row \i \l comment() \i \l setComment() \i text for the Details dialog \row \i \l exec() \i \l setExec() \i executable's filename \row \i \l file() \i \e none \i document's filename \row \i \l linkFile() \i \l setLinkFile() \i \e .desktop filename \row \i \l mimeTypes() \i \e none \i the mime types the application can view or edit \row \i \l categories() \i \l setCategories() \i \e{see the function descriptions} \row \i \l fileKnown() \i \e none \i see \link #files-and-links Files and Links\endlink above \row \i \l linkFileKnown() \i \e none \i see \link #files-and-links Files and Links\endlink above \row \i \l property() \i \l setProperty() \i any AppLnk property can be retrieved or set (if writeable) using these \endtable To save an AppLnk to disk use writeLink(). To execute the application that the AppLnk object refers to, use execute(). AppLnk's can be deleted from disk using removeLinkFile(). To remove both the link and the application's executable use removeFiles(). Icon sizes can be globally changed (but only for AppLnk objects created after the calls) with setSmallIconSize() and setBigIconSize(). Definition at line 32 of file applnk.h.


Constructor & Destructor Documentation

AppLnk::AppLnk  ) 
 

Creates an invalid AppLnk.

See also:
isValid()

Definition at line 354 of file applnk.cpp.

References d, and mId.

AppLnk::AppLnk const QString file  ) 
 

Loads file (e.g. app.desktop) as an AppLnk.

See also:
writeLink()

Definition at line 365 of file applnk.cpp.

References Categories::addCategory(), QValueList< T >::begin(), categoryFileName(), QValueList< T >::count(), d, QValueList< T >::end(), Config::File, QString::findRev(), i, Categories::id(), QString::isNull(), Config::isValid(), QString::left(), Categories::load(), AppLnkPrivate::mCat, AppLnkPrivate::mCatList, mComment, mExec, mFile, mIconFile, mId, mLinkFile, mMimeTypeIcons, mMimeTypes, mName, mRotation, mType, QString::null, Config::readEntry(), Config::readListEntry(), Config::setGroup(), and AppLnkPrivate::updateCatListFromArray().

AppLnk::AppLnk const AppLnk copy  ) 
 

Copies copy.

Definition at line 630 of file applnk.cpp.

References d, mBigPixmap, AppLnkPrivate::mCat, AppLnkPrivate::mCatList, mComment, mExec, mFile, mIconFile, mId, mLinkFile, mMimeTypeIcons, mMimeTypes, mName, mPixmap, AppLnkPrivate::mPixmaps, mRotation, and mType.

AppLnk::~AppLnk  )  [virtual]
 

Destroys the AppLnk. Note that if the AppLnk is currently a member of an AppLnkSet, this will produce a run-time warning.

See also:
AppLnkSet::add() AppLnkSet::remove()

Definition at line 657 of file applnk.cpp.

References d, mId, and qWarning().


Member Function Documentation

int AppLnk::bigIconSize  )  [static]
 

Returns the size used for large icons.

See also:
setBigIconSize() setIcon()

Definition at line 258 of file applnk.cpp.

References bigSize.

Referenced by Appearance::createAdvancedTab(), Opie::Core::OResource::loadImage(), MimeTypeData::loadPixmaps(), LauncherIconView::requestEyePix(), LauncherIconView::setBusy(), and LauncherIconView::setEyePixmap().

const QPixmap & AppLnk::bigPixmap  )  const
 

Returns a large pixmap associated with the application.

See also:
pixmap() setIcon()

Definition at line 508 of file applnk.cpp.

References AppLnkPrivate::Big, bigSize, d, AppLnkPrivate::mPixmaps, and pixmap().

Referenced by LauncherItem::animateIcon(), MimeTypeData::loadPixmaps(), and LauncherItem::resetIcon().

const QArray< int > & AppLnk::categories  )  const
 

Returns the Categories property.

See the CategoryWidget for more details.

See also:
setCategories()

Definition at line 311 of file applnk.cpp.

References d, AppLnkPrivate::ensureCatArray(), and AppLnkPrivate::mCat.

Referenced by LnkProperties::done(), Doc_DirLister::matchCat(), and DocumentList::sendAllDocLinks().

QString AppLnk::comment  )  const [inline]
 

Returns the Comment property.

See also:
setComment()

Definition at line 54 of file applnk.h.

References mComment.

Referenced by LnkProperties::beamLnk(), TabManager::editItem(), Gutenbrowser::setDocument(), DocLnkItem::toRichText(), and AppLnkItem::toRichText().

bool AppLnk::ensureLinkExists  )  const [protected]
 

Attempts to ensure that the link file for this AppLnk exists, including creating any required directories. Returns TRUE if successful; otherwise returns FALSE.

You should not need to use this function.

Definition at line 842 of file applnk.cpp.

References linkFile(), and prepareDirectories().

Referenced by setProperty(), and writeLink().

QString AppLnk::exec  )  const [inline, virtual]
 

Returns the Exec property. This is the name of the executable program associated with the AppLnk.

See also:
setExec()

Reimplemented in DocLnk.

Definition at line 51 of file applnk.h.

References mExec.

Referenced by RunningAppBar::addTask(), LnkProperties::done(), TabManager::editItem(), DocLnk::exec(), AppLnkSet::findChildren(), AppLnkSet::findExec(), MagicTextBrowser::generateQpe(), invoke(), LauncherItem::LauncherItem(), RunningAppBar::removeTask(), Launcher::select(), AppLauncher::sigStopped(), and AppLnkItem::toRichText().

void AppLnk::execute const QStringList args  )  const
 

Executes the application associated with this AppLnk, with args as arguments.

See also:
exec()

Definition at line 682 of file applnk.cpp.

References QPEApplication::defaultRotation(), driver, QCString::find(), invoke(), QString::isEmpty(), QCString::left(), mRotation, and QString::toInt().

void AppLnk::execute  )  const
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Executes the application associated with this AppLnk.

See also:
exec()

Definition at line 671 of file applnk.cpp.

References property(), and QStringList::split().

Referenced by DocLnkItem::action(), AppLnkItem::action(), DocLnkWrapper::execute(), AppLnkWrapper::execute(), DocLnk::invoke(), FileItem::launch(), and AdvancedFm::runThis().

QString AppLnk::file  )  const
 

Returns the file associated with the AppLnk.

See also:
exec() name()

Definition at line 540 of file applnk.cpp.

References QString::contains(), QFile::exists(), f, IO_WriteOnly, QString::isEmpty(), QString::isNull(), QString::latin1(), QString::left(), QString::length(), mExec, mFile, mLinkFile, mName, mType, QString::null, QString::number(), QFile::open(), prepareDirectories(), qDebug(), QString::right(), and safeFileName().

Referenced by DocLnkItem::action(), DocumentList::add(), Attachment::Attachment(), LauncherIconView::changeItem(), LauncherIconView::compare(), LnkProperties::copyFile(), FileManager::copyFile(), PlayListWidget::currentEntry(), DocLnkSet::findChildren(), Attachment::getFileName(), ImageFileSelectorItem::ImageFileSelectorItem(), DocLnk::invoke(), LauncherItem::LauncherItem(), DocumentList::linkChanged(), linkFile(), FileManager::loadFile(), PlayListWidget::loadList(), ImageViewer::loadSelected(), TinyKate::open(), ImageViewer::openFile(), QTReaderApp::openFile(), FileManager::openFile(), TextEdit::openFile(), VideoWidget::playFile(), AudioWidget::playFile(), ImportDialog::preview(), removeFiles(), LauncherIconView::removeLink(), AddAtt::returnattachedFiles(), TextEdit::save(), FileManager::saveFile(), DocLnkSearch::searchFile(), Launcher::select(), Ir::send(), DocumentList::sendAllDocLinks(), MainView::setDocument(), ZSafe::setDocument(), Gutenbrowser::setDocument(), PMainWindow::setDocument(), MediaPlayer::setPlaying(), LnkProperties::setupLocations(), Composer::slotAddAttach(), PlaylistView::slotAddFile(), MainWindow::slotImportExcel(), storeLink(), DocLnkItem::toRichText(), AppLnkItem::toRichText(), type(), and LnkProperties::unlinkLnk().

bool AppLnk::fileKnown  )  const [inline]
 

If the with the AppLnk associated file is not equal to QString::null

Definition at line 62 of file applnk.h.

References QString::isNull(), and mFile.

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

QString AppLnk::icon  )  const [inline]
 

Returns the Icon property.

See also:
setIcon()

Definition at line 50 of file applnk.h.

References mIconFile.

Referenced by StartMenu::createAppEntry(), MagicTextBrowser::generateQpe(), and OpieObex::OtherHandler::handle().

int AppLnk::id  )  const [inline]
 

Returns the id of the AppLnk. If the AppLnk is not in an AppLnkSet, this value is 0, otherwise it is a value that is unique for the duration of the current process.

See also:
AppLnkSet::find()

Definition at line 60 of file applnk.h.

References mId.

Referenced by AppLnkSet::find().

void AppLnk::invoke const QStringList args  )  const [protected, virtual]
 

Invokes the application associated with this AppLnk, with args as arguments. Rotation is not taken into account by this function, so you should not call it directly.

See also:
execute()

Reimplemented in DocLnk.

Definition at line 707 of file applnk.cpp.

References exec(), Global::execute(), QStringList::join(), and property().

Referenced by execute().

bool AppLnk::isValid  )  const [inline]
 

Returns TRUE if this AppLnk is valid; otherwise returns FALSE.

Definition at line 40 of file applnk.h.

References QString::isNull(), and mLinkFile.

Referenced by DocLnkItem::action(), AppLnkItem::action(), StartMenu::createAppEntry(), MainWindow::documentOpen(), AdvancedFm::doDelete(), TabManager::editItem(), DocLnk::init(), AppLnkWrapper::isValid(), TableViewerWindow::openDocument(), PlayListWidget::readConfig(), removeFiles(), LauncherIconView::removeLink(), removeLinkFile(), MainWindow::saveCurrentFile(), ZSafe::setDocument(), PMainWindow::setDocument(), and ImageViewer::show().

QString AppLnk::linkFile  )  const
 

Returns the desktop file corresponding to this AppLnk.

See also:
file() exec() name()

Definition at line 585 of file applnk.cpp.

References FileSystem::disk(), QFile::exists(), file(), StorageInfo::fileSystemOf(), QString::isNull(), FileSystem::isRemovable(), mFile, mLinkFile, mName, QString::number(), FileSystem::path(), safeFileName(), storeLink(), and type().

Referenced by AppLnkItem::action(), Launcher::applicationRemoved(), LauncherIconView::changeItem(), LauncherIconView::compare(), Launcher::documentRemoved(), ensureLinkExists(), DocLnk::invoke(), DocumentList::linkChanged(), property(), removeFiles(), LauncherIconView::removeLink(), removeLinkFile(), NotesControl::save(), DocumentList::sendAllDocLinks(), setProperty(), Doc_DirLister::systemMsg(), DocLnkItem::toRichText(), AppLnkItem::toRichText(), and writeLink().

bool AppLnk::linkFileKnown  )  const [inline]
 

The filename of the AppLnk

Definition at line 63 of file applnk.h.

References QString::isNull(), and mLinkFile.

Referenced by LauncherIconView::compare(), DocLnk::invoke(), DocumentList::linkChanged(), removeFiles(), LauncherIconView::removeLink(), removeLinkFile(), and DocumentList::sendAllDocLinks().

QStringList AppLnk::mimeTypeIcons  )  const [inline]
 

Returns the MimeTypeIcons property of the AppLnk.

Definition at line 58 of file applnk.h.

References mMimeTypeIcons.

QStringList AppLnk::mimeTypes  )  const [inline]
 

Returns the MimeTypes property. This is the list of MIME types that the application can view or edit.

Definition at line 57 of file applnk.h.

References mMimeTypes.

Referenced by MimeType::registerApp(), and DocLnkItem::toRichText().

QString AppLnk::name  )  const [inline]
 

Returns the Name property. This is the user-visible name for the document or application, not the filename.

See Files and Links.

See also:
setName()

Definition at line 47 of file applnk.h.

References mName.

Referenced by ComposeMail::addAttachment(), RunningAppBar::addTask(), AppLnkItem::AppLnkItem(), TaskSelector::buildMenu(), LauncherIconView::compare(), StartMenu::createAppEntry(), PlayListWidget::currentEntry(), DocumentList::DiffAppLnks(), DocLnkItem::DocLnkItem(), LnkProperties::done(), LnkProperties::duplicateLnk(), TabManager::editItem(), FileItem::FileItem(), FileSelectorItem::FileSelectorItem(), MagicTextBrowser::generateQpe(), Attachment::getName(), ImageFileSelectorItem::ImageFileSelectorItem(), PlayListWidget::loadList(), ImageViewer::loadSelected(), DocLnkWrapper::name(), AppLnkWrapper::name(), ImageViewer::openFile(), RunningAppBar::paintEvent(), AudioWidget::playFile(), PlayListSelectionItem::PlayListSelectionItem(), RunningAppBar::removeTask(), TypeCombo::reread(), TabManager::rescanFolder(), TextEdit::save(), DocumentList::sendAllDocLinks(), MediaPlayer::setPlaying(), FileView::showFileMenu(), AdvancedFm::showFileMenu(), AppLauncher::sigStopped(), Composer::slotAddAttach(), PlaylistView::slotAddFile(), OFileSelector::slotDocLnkBridge(), Opie::Ui::OFileSelector::slotDocLnkBridge(), MainWindow::slotFileSaveAs(), DocLnkItem::toRichText(), AppLnkItem::toRichText(), LnkProperties::unlinkLnk(), TextEdit::updateCaption(), and LauncherView::updateTools().

AppLnk & AppLnk::operator= const AppLnk other  ) 
 

Definition at line 424 of file applnk.cpp.

References d, mBigPixmap, AppLnkPrivate::mCat, AppLnkPrivate::mCatList, mComment, mExec, mFile, mIconFile, mId, mLinkFile, mMimeTypeIcons, mMimeTypes, mName, mPixmap, AppLnkPrivate::mPixmaps, mRotation, mType, and qWarning().

const QPixmap & AppLnk::pixmap int  pos,
int  size
const [private]
 

protected internally to share code should I document that at all? I don't know the TT style for that

Definition at line 461 of file applnk.cpp.

References MimeType::bigPixmap(), bigSize, d, QString::isEmpty(), Resource::loadImage(), mIconFile, AppLnkPrivate::mPixmaps, MimeType::pixmap(), smallSize, and type().

const QPixmap & AppLnk::pixmap  )  const
 

Returns a small pixmap associated with the application.

See also:
bigPixmap() setIcon()

Definition at line 495 of file applnk.cpp.

References d, AppLnkPrivate::mPixmaps, AppLnkPrivate::Normal, and smallSize.

Referenced by AddAtt::addattachment(), LauncherItem::animateIcon(), AppLnkItem::AppLnkItem(), bigPixmap(), TaskSelector::buildMenu(), DocLnkItem::DocLnkItem(), FileItem::drawThumbnail(), TabManager::editItem(), FileSelectorItem::FileSelectorItem(), Attachment::getPixmap(), ImageFileSelectorItem::ImageFileSelectorItem(), MimeTypeData::loadPixmaps(), RunningAppBar::paintEvent(), DocLnkWrapper::pixmap(), AppLnkWrapper::pixmap(), PlayListSelectionItem::PlayListSelectionItem(), TabManager::rescanFolder(), LauncherItem::resetIcon(), FileView::showFileMenu(), and AdvancedFm::showFileMenu().

QString AppLnk::property const QString key  )  const
 

Returns the property named key.

See also:
setProperty()

Definition at line 917 of file applnk.cpp.

References QFile::exists(), Config::File, linkFile(), QString::null, and Config::readEntry().

Referenced by LnkProperties::done(), execute(), and invoke().

void AppLnk::removeFiles  ) 
 

Deletes both the linkFile() and the file() associated with this AppLnk.

See also:
removeLinkFile()

Definition at line 954 of file applnk.cpp.

References file(), isValid(), linkFile(), linkFileKnown(), QFile::remove(), and writeLink().

Referenced by TextEdit::editDelete(), LnkProperties::moveLnk(), NotesControl::slotDeleteButton(), and LnkProperties::unlinkLnk().

void AppLnk::removeLinkFile  ) 
 

Deletes the linkFile(), leaving any file() untouched.

See also:
removeFiles()

Definition at line 978 of file applnk.cpp.

References isValid(), linkFile(), linkFileKnown(), and QFile::remove().

Referenced by AdvancedFm::doDelete().

QString AppLnk::rotation  )  const [inline]
 

Returns the Rotation property. The value is 0, 90, 180 or 270 degrees.

Definition at line 53 of file applnk.h.

References mRotation.

Referenced by LnkProperties::done(), and storeLink().

void AppLnk::setBigIconSize int  big  )  [static]
 

Sets the size used for large icons to big pixels. Only affects AppLnk objects created after the call.

See also:
bigIconSize() setIcon()

Definition at line 248 of file applnk.cpp.

References bigSize.

Referenced by QPEApplication::QPEApplication().

void AppLnk::setCategories const QArray< int > &  c  ) 
 

Sets the Categories property to c.

See the CategoryWidget for more details.

See also:
categories()

Definition at line 823 of file applnk.cpp.

References d, AppLnkPrivate::mCat, and AppLnkPrivate::updateCatListFromArray().

Referenced by LnkProperties::done(), and VMemo::startRecording().

void AppLnk::setComment const QString comment  ) 
 

Sets the Comment property to comment.

This text is displayed in the 'Details Dialog', for example if the user uses the 'press-and-hold' gesture.

See also:
comment()

Definition at line 775 of file applnk.cpp.

References mComment.

Referenced by TabManager::editItem(), LibraryDialog::getEtext(), and OpenEtext::open().

void AppLnk::setExec const QString exec  ) 
 

Sets the Exec property to exec.

See also:
exec() name()

Definition at line 720 of file applnk.cpp.

References mExec.

Referenced by RunningAppBar::addTask(), TabManager::editItem(), LibraryDialog::getEtext(), and OpenEtext::open().

void AppLnk::setFile const QString filename  ) 
 

Sets the File property to filename.

See also:
file() name()

Definition at line 752 of file applnk.cpp.

References mFile.

Referenced by PlayListWidget::addFileToPlaylist(), PlayListWidget::addSelected(), AdvancedFm::addToDocs(), FileView::addToDocuments(), PlayListWidget::addToSelection(), DocLnkSet::DocLnkSet(), LibraryDialog::getEtext(), DocLnk::init(), ViewAtt::install(), DocumentListPrivate::iterate(), NotesControl::load(), OpenEtext::open(), PlayListWidget::openFile(), TextEdit::openFile(), PlayListWidget::openURL(), InstallDlgImpl::optionsSelected(), PlayListWidget::qcopReceive(), PlayListWidget::readListFromFile(), PlayListWidget::readm3u(), PlayListWidget::readPls(), PlayListWidget::readpodcast(), NotesControl::save(), TextEdit::saveAs(), MainWindow::saveCurrentFile(), Output::saveOutput(), ScreenshotControl::savePixmap(), PlayListWidget::setDocumentEx(), InstallDlg::slotBtnOptions(), MainWindow::slotFileSaveAs(), VMemo::startRecording(), and PlayListWidget::writem3u().

void AppLnk::setIcon const QString iconname  ) 
 

Sets the Icon property to iconname. This is the filename from which the pixmap() and bigPixmap() are obtained.

See also:
icon() setSmallIconSize() setBigIconSize()

Definition at line 808 of file applnk.cpp.

References bigSize, d, Resource::loadImage(), mIconFile, AppLnkPrivate::mPixmaps, and smallSize.

Referenced by TabManager::editItem(), LibraryDialog::getEtext(), OpenEtext::open(), PlayListWidget::openFile(), PlayListWidget::readListFromFile(), PlayListWidget::readm3u(), PlayListWidget::setDocumentEx(), and PlayListWidget::writem3u().

void AppLnk::setLinkFile const QString filename  ) 
 

Sets the LinkFile property to filename.

See also:
linkFile()

Definition at line 762 of file applnk.cpp.

References mLinkFile.

Referenced by MainWindow::saveCurrentFile(), and MainWindow::slotFileSaveAs().

void AppLnk::setName const QString docname  ) 
 

Sets the Name property to docname.

See also:
name()

Definition at line 742 of file applnk.cpp.

References mName.

Referenced by PlayListWidget::addFileToPlaylist(), PlayListWidget::addSelected(), AdvancedFm::addToDocs(), FileView::addToDocuments(), PlayListWidget::addToSelection(), LnkProperties::beamLnk(), DocLnkSet::DocLnkSet(), LnkProperties::done(), LnkProperties::duplicateLnk(), TabManager::editItem(), DrawPadCanvas::exportPage(), LibraryDialog::getEtext(), DocLnk::init(), ViewAtt::install(), DocumentListPrivate::iterate(), LnkProperties::moveLnk(), TableViewerWindow::newDocument(), OpenEtext::open(), PlayListWidget::openFile(), TextEdit::openFile(), PlayListWidget::openURL(), InstallDlgImpl::optionsSelected(), PlayListWidget::qcopReceive(), PlayListWidget::readListFromFile(), PlayListWidget::readm3u(), PlayListWidget::readPls(), PlayListWidget::readpodcast(), NotesControl::save(), TextEdit::save(), TextEdit::saveAs(), MainWindow::saveCurrentFile(), Output::saveOutput(), ScreenshotControl::savePixmap(), PlayListWidget::setDocumentEx(), InstallDlg::slotBtnOptions(), MainWindow::slotFileSaveAs(), VMemo::startRecording(), TableViewerWindow::TableViewerWindow(), and PlayListWidget::writem3u().

void AppLnk::setProperty const QString key,
const QString value
 

Sets the property named key to value.

See also:
property()

Definition at line 904 of file applnk.cpp.

References ensureLinkExists(), Config::File, linkFile(), and Config::writeEntry().

Referenced by LnkProperties::done().

void AppLnk::setRotation const QString rot  )  [inline]
 

The default rotation of the associated application. This function is included inline for binary compatible issues

Definition at line 76 of file applnk.h.

References mRotation.

void AppLnk::setSmallIconSize int  small  )  [static]
 

Sets the size used for small icons to small pixels. Only affects AppLnk objects created after the call.

See also:
smallIconSize() setIcon()

Definition at line 226 of file applnk.cpp.

References smallSize.

Referenced by QPEApplication::QPEApplication().

void AppLnk::setType const QString type  ) 
 

Sets the Type property to type.

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

See also:
type()

Definition at line 789 of file applnk.cpp.

References mType.

Referenced by DrawPadCanvas::exportPage(), AppLnkSet::findChildren(), LibraryDialog::getEtext(), ViewAtt::install(), NotesControl::load(), TabManager::moveApplication(), TableViewerWindow::newDocument(), TextEdit::newFile(), OpenEtext::open(), TextEdit::openFile(), InstallDlgImpl::optionsSelected(), PlayListWidget::readPls(), PlayListWidget::readpodcast(), NotesControl::save(), TextEdit::saveAs(), Output::saveOutput(), InstallDlg::slotBtnOptions(), VMemo::startRecording(), and TableViewerWindow::TableViewerWindow().

int AppLnk::smallIconSize  )  [static]
 

Returns the size used for small icons.

See also:
setSmallIconSize() setIcon()

Definition at line 236 of file applnk.cpp.

References smallSize.

Referenced by AutoRotate::AutoRotate(), BatteryMeter::BatteryMeter(), OpieTooth::BluezApplet::BluezApplet(), BrightnessApplet::BrightnessApplet(), ButtonSettings::ButtonSettings(), CardMonitor::CardMonitor(), DrawPad::changeBrushColor(), DrawPad::changePenColor(), ClipboardApplet::ClipboardApplet(), Appearance::createAdvancedTab(), DialWidget::DialWidget(), EntryDlg::EntryDlg(), Checkbook::initCharts(), OIpkgConfigDlg::initDestinationWidget(), OpieFtp::initializeGui(), OIpkgConfigDlg::initOptionsWidget(), OIpkgConfigDlg::initServerWidget(), Checkbook::initTransactions(), InputDialog::InputDialog(), InstallDlg::InstallDlg(), IRCTab::IRCTab(), IrdaApplet::IrdaApplet(), KeyHelperWidget::KeyHelperWidget(), ListEdit::ListEdit(), Opie::Core::OResource::loadImage(), MimeTypeData::loadPixmaps(), OTabWidget::loadSmooth(), MailApplet::MailApplet(), MemoryMeter::MemoryMeter(), NetworkApplet::NetworkApplet(), NewDocItem::NewDocItem(), NotesApplet::NotesApplet(), NTPTabWidget::NTPTabWidget(), MailApplet::paintEvent(), DateBookDayWidget::paintEvent(), RunningAppBar::paintEvent(), BatteryMeter::paintEvent(), PcmciaManager::PcmciaManager(), LauncherIconView::requestEyePix(), RunningAppBar::RunningAppBar(), ScreenshotApplet::ScreenshotApplet(), LauncherIconView::setBusy(), LauncherIconView::setEyePixmap(), SimpleApplet::SimpleApplet(), MemoryMeter::sizeHint(), RunningAppBar::sizeHint(), BatteryMeter::sizeHint(), StartMenu::StartMenu(), TimeTabWidget::TimeTabWidget(), ButtonSettings::updateLabels(), VolumeApplet::VolumeApplet(), Wait::Wait(), and ZkbWidget::ZkbWidget().

void AppLnk::storeLink  )  const [protected]
 

For internal use only.

Definition at line 868 of file applnk.cpp.

References d, f, file(), Config::File, QString::find(), i, QString::isNull(), QString::length(), AppLnkPrivate::mCatList, mComment, mIconFile, QString::mid(), mLinkFile, mName, Config::removeEntry(), rotation(), Config::setGroup(), type(), and Config::writeEntry().

Referenced by linkFile(), and writeLink().

QString AppLnk::type  )  const
 

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

Definition at line 521 of file applnk.cpp.

References f, file(), MimeType::id(), QString::isNull(), and mType.

Referenced by AddAtt::addattachment(), LauncherIconView::addCatsAndMimes(), Launcher::applicationAdded(), LauncherIconView::compare(), StartMenu::createAppEntry(), DocumentList::DiffAppLnks(), DocLnkSet::DocLnkSet(), DocLnk::exec(), DocLnkSet::findChildren(), Attachment::getMimeType(), OpieObex::OtherHandler::handle(), DocLnk::invoke(), LauncherItem::LauncherItem(), linkFile(), MimeType::MimeType(), TableViewerWindow::openDocument(), pixmap(), Launcher::properties(), DocumentList::reloadAppLnks(), TableViewerWindow::saveDocument(), DocLnkSearch::searchFile(), Launcher::select(), Ir::send(), DocumentList::sendAllDocLinks(), storeLink(), and DocLnkItem::toRichText().

bool AppLnk::writeLink  )  const
 

Commits the AppLnk to disk. Returns TRUE if the operation succeeded; otherwise returns FALSE.

In addition, the "linkChanged(QString)" message is sent to the "QPE/System" QCop channel.

Definition at line 855 of file applnk.cpp.

References ensureLinkExists(), FALSE, linkFile(), storeLink(), and TRUE.

Referenced by OpieObex::OtherHandler::accept(), AdvancedFm::addToDocs(), FileView::addToDocuments(), FileManager::copyFile(), LnkProperties::done(), TabManager::editItem(), LibraryDialog::getEtext(), ViewAtt::install(), TabManager::moveApplication(), OpenEtext::open(), PlayListWidget::readPls(), PlayListWidget::readpodcast(), removeFiles(), FileManager::saveFile(), Output::saveOutput(), ScreenshotControl::savePixmap(), VMemo::startRecording(), and PlayListWidget::writem3u().


Friends And Related Function Documentation

friend class AppLnkSet [friend]
 

Definition at line 112 of file applnk.h.


Member Data Documentation

AppLnkPrivate* AppLnk::d [protected]
 

Definition at line 111 of file applnk.h.

Referenced by AppLnk(), bigPixmap(), categories(), operator=(), pixmap(), setCategories(), setIcon(), storeLink(), and ~AppLnk().

int AppLnk::lastId = 5000 [static, protected]
 

Definition at line 42 of file applnk.cpp.

Referenced by AppLnkSet::add().

QPixmap AppLnk::mBigPixmap [protected]
 

Definition at line 98 of file applnk.h.

Referenced by AppLnk(), and operator=().

QString AppLnk::mComment [protected]
 

Definition at line 103 of file applnk.h.

Referenced by AppLnk(), comment(), operator=(), setComment(), and storeLink().

QString AppLnk::mExec [protected]
 

Definition at line 100 of file applnk.h.

Referenced by AppLnk(), exec(), file(), DocLnk::init(), operator=(), and setExec().

QString AppLnk::mFile [protected]
 

Definition at line 104 of file applnk.h.

Referenced by AppLnk(), file(), fileKnown(), linkFile(), operator=(), and setFile().

QString AppLnk::mIconFile [protected]
 

Definition at line 106 of file applnk.h.

Referenced by AppLnk(), icon(), operator=(), pixmap(), TabAppLnk::pixmapString(), setIcon(), and storeLink().

int AppLnk::mId [protected]
 

Definition at line 109 of file applnk.h.

Referenced by AppLnkSet::add(), AppLnk(), AppLnkSet::clear(), AppLnkSet::detachChildren(), id(), operator=(), AppLnkSet::remove(), ~AppLnk(), and AppLnkSet::~AppLnkSet().

QString AppLnk::mLinkFile [protected]
 

Definition at line 105 of file applnk.h.

Referenced by AppLnk(), file(), isValid(), linkFile(), linkFileKnown(), operator=(), setLinkFile(), and storeLink().

QStringList AppLnk::mMimeTypeIcons [protected]
 

Definition at line 108 of file applnk.h.

Referenced by AppLnk(), mimeTypeIcons(), and operator=().

QStringList AppLnk::mMimeTypes [protected]
 

Definition at line 107 of file applnk.h.

Referenced by AppLnk(), mimeTypes(), and operator=().

QString AppLnk::mName [protected]
 

Definition at line 92 of file applnk.h.

Referenced by AppLnk(), file(), linkFile(), name(), operator=(), setName(), and storeLink().

QPixmap AppLnk::mPixmap [protected]
 

Definition at line 95 of file applnk.h.

Referenced by AppLnk(), and operator=().

QString AppLnk::mRotation [protected]
 

Definition at line 102 of file applnk.h.

Referenced by AppLnk(), execute(), operator=(), rotation(), and setRotation().

QString AppLnk::mType [protected]
 

Definition at line 101 of file applnk.h.

Referenced by AppLnk(), file(), DocLnk::init(), operator=(), setType(), and type().


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