summaryrefslogtreecommitdiff
path: root/library/applnk.h
authorzecke <zecke>2002-09-10 12:09:49 (UTC)
committer zecke <zecke>2002-09-10 12:09:49 (UTC)
commit6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4 (patch) (side-by-side diff)
tree6ebc93c6432f4ed9d00ef1448b6a047ef522a79a /library/applnk.h
parentd10cddb3c9ce75bc90b14add14bc133737fe35aa (diff)
downloadopie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.zip
opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.gz
opie-6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4.tar.bz2
Qtopia1-6 merge
still to test bic changes to be resolved more changes to be made?
Diffstat (limited to 'library/applnk.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/applnk.h38
1 files changed, 34 insertions, 4 deletions
diff --git a/library/applnk.h b/library/applnk.h
index 9b5523e..71b62ef 100644
--- a/library/applnk.h
+++ b/library/applnk.h
@@ -1,10 +1,10 @@
/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qtopia Environment.
+** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
@@ -44,23 +44,25 @@ public:
static int smallIconSize();
static int bigIconSize();
QString name() const { return mName; }
const QPixmap& pixmap() const;
const QPixmap& bigPixmap() const;
+ QString icon() const { return mIconFile; }
virtual QString exec() const { return mExec; }
QString type() const;
QString rotation() const { return mRotation; }
QString comment() const { return mComment; }
QString file() const;
QString linkFile() const;
QStringList mimeTypes() const { return mMimeTypes; }
QStringList mimeTypeIcons() const { return mMimeTypeIcons; }
const QArray<int> &categories() const;
int id() const { return mId; }
+ bool fileKnown() const { return !mFile.isNull(); }
bool linkFileKnown() const { return !mLinkFile.isNull(); }
void execute() const;
void execute(const QStringList& args) const;
void removeFiles();
void removeLinkFile();
@@ -75,21 +77,30 @@ public:
void setCategories( const QArray<int> &v );
bool writeLink() const;
void setProperty(const QString& key, const QString& value);
QString property(const QString& key) const;
-//#ifdef QTOPIA_INTERNAL_PRELOADACCESS
+#ifdef QTOPIA_INTERNAL_PRELOADACCESS
bool isPreloaded() const;
void setPreloaded(bool yesNo);
-//#endif
+#endif
+
+#ifdef QTOPIA_INTERNAL_APPLNKASSIGN
+ AppLnk &operator=(const AppLnk &other);
+#endif
protected:
QString mName;
+
+ /* remove for Qtopia 3.0 -zecke */
QPixmap mPixmap;
+
+ /* remove for Qtopia 3.0 -zecke */
QPixmap mBigPixmap;
+
QString mExec;
QString mType;
QString mRotation;
QString mComment;
QString mFile;
QString mLinkFile;
@@ -101,23 +112,31 @@ protected:
AppLnkPrivate *d;
friend class AppLnkSet;
virtual void invoke(const QStringList& args) const;
bool ensureLinkExists() const;
void storeLink() const;
+
+private:
+ const QPixmap& pixmap(int pos, int size) const;
};
class DocLnk : public AppLnk
{
public:
DocLnk();
DocLnk( const DocLnk &o ) : AppLnk(o) { }
DocLnk( const QString &file );
DocLnk( const QString &file, bool may_be_desktopfile );
virtual ~DocLnk();
+
+#ifdef QTOPIA_INTERNAL_APPLNKASSIGN
+ DocLnk &operator=(const DocLnk &other) { AppLnk::operator=(other); return *this; }
+#endif
+
QString exec() const;
protected:
void invoke(const QStringList& args) const;
private:
@@ -138,12 +157,23 @@ public:
QString typeName( const QString& ) const;
QPixmap typePixmap( const QString& ) const;
QPixmap typeBigPixmap( const QString& ) const;
void add(AppLnk*);
bool remove(AppLnk*);
+ void clear() {
+ QListIterator<AppLnk> it( mApps );
+ for ( ; it.current(); ) {
+ AppLnk* a = *it;
+ ++it;
+ a->mId = 0;
+ delete a;
+ }
+ mApps.clear();
+ typs.clear();
+ }
const QList<AppLnk> &children() const { return mApps; }
void detachChildren();
protected:
friend class AppLnk;