-rw-r--r-- | library/applnk.h | 38 |
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,6 +1,6 @@ /********************************************************************** -** 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 @@ -48,4 +48,5 @@ public: const QPixmap& pixmap() const; const QPixmap& bigPixmap() const; + QString icon() const { return mIconFile; } virtual QString exec() const { return mExec; } QString type() const; @@ -59,4 +60,5 @@ public: int id() const { return mId; } + bool fileKnown() const { return !mFile.isNull(); } bool linkFileKnown() const { return !mLinkFile.isNull(); } @@ -79,13 +81,22 @@ public: 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; @@ -105,4 +116,7 @@ protected: bool ensureLinkExists() const; void storeLink() const; + +private: + const QPixmap& pixmap(int pos, int size) const; }; @@ -116,4 +130,9 @@ public: virtual ~DocLnk(); + +#ifdef QTOPIA_INTERNAL_APPLNKASSIGN + DocLnk &operator=(const DocLnk &other) { AppLnk::operator=(other); return *this; } +#endif + QString exec() const; @@ -142,4 +161,15 @@ public: 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; } |