summaryrefslogtreecommitdiff
path: root/library/applnk.cpp
Side-by-side diff
Diffstat (limited to 'library/applnk.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/applnk.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index 35822dd..00030e8 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -287,97 +287,113 @@ int AppLnk::bigIconSize()
Returns the Rotation property. The value is 0, 90, 180 or 270
degrees.
*/
/*!
\fn QString AppLnk::comment() const
Returns the Comment property.
\sa setComment()
*/
/*!
\fn QStringList AppLnk::mimeTypes() const
Returns the MimeTypes property. This is the list of MIME types
that the application can view or edit.
*/
/*!
\fn const QArray<int>& AppLnk::categories() const
Returns the Categories property.
See the CategoryWidget for more details.
\sa setCategories()
*/
const QArray<int>& AppLnk::categories() const
{
d->ensureCatArray();
return d->mCat;
}
/*!
\fn int AppLnk::id() const
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.
\sa AppLnkSet::find()
*/
/*!
\fn bool AppLnk::isValid() const
Returns TRUE if this AppLnk is valid; otherwise returns FALSE.
*/
+/*!
+ \fn bool AppLnk::fileKnown() const
+
+ If the with the AppLnk associated file is not equal to QString::null
+*/
+/*!
+ \fn bool AppLnk::linkFileKnown()const
+
+ The filename of the AppLnk
+*/
+/*!
+ \fn void AppLnk::setRotation( const QString& )
+
+ The default rotation of the associated application. This
+ function is included inline for binary compatible issues
+*/
/*!
Creates an invalid AppLnk.
\sa isValid()
*/
AppLnk::AppLnk()
{
mId = 0;
d = new AppLnkPrivate();
}
/*!
Loads \a file (e.g. \e app.desktop) as an AppLnk.
\sa writeLink()
*/
AppLnk::AppLnk( const QString &file )
{
QStringList sl;
d = new AppLnkPrivate();
if ( !file.isNull() ) {
Config config( file, Config::File );
if ( config.isValid() ) {
config.setGroup( "Desktop Entry" );
mName = config.readEntry( "Name", file );
mExec = config.readEntry( "Exec" );
mType = config.readEntry( "Type", QString::null );
mIconFile = config.readEntry( "Icon", QString::null );
mRotation = config.readEntry( "Rotation", "" );
mComment = config.readEntry( "Comment", QString::null );
// MIME types are case-insensitive.
mMimeTypes = config.readListEntry( "MimeType", ';' );
for (QStringList::Iterator it=mMimeTypes.begin(); it!=mMimeTypes.end(); ++it)
*it = (*it).lower();
mMimeTypeIcons = config.readListEntry( "MimeTypeIcons", ';' );
mLinkFile = file;
mFile = config.readEntry("File", QString::null);
if ( !mExec. isEmpty ( )) {
mFile = QString::null;
}
else if ( mFile[0] != '/' ) {
int slash = file.findRev('/');
if ( slash >= 0 ) {
mFile = file.left(slash) + '/' + mFile;
}
}