From 6b77a1cdb9536b1c135eb86d53a6b2c22c19b0a4 Mon Sep 17 00:00:00 2001 From: zecke Date: Tue, 10 Sep 2002 12:09:49 +0000 Subject: Qtopia1-6 merge still to test bic changes to be resolved more changes to be made? --- (limited to 'library/applnk.h') diff --git a/library/applnk.h b/library/applnk.h index 9b5523e..71b62ef 100644 --- a/library/applnk.h +++ b/library/applnk.h @@ -1,7 +1,7 @@ /********************************************************************** -** 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 @@ -47,6 +47,7 @@ public: 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; } @@ -58,6 +59,7 @@ public: const QArray &categories() const; int id() const { return mId; } + bool fileKnown() const { return !mFile.isNull(); } bool linkFileKnown() const { return !mLinkFile.isNull(); } void execute() const; @@ -78,15 +80,24 @@ public: 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; @@ -104,6 +115,9 @@ protected: 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 @@ -115,6 +129,11 @@ public: 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: @@ -141,6 +160,17 @@ public: void add(AppLnk*); bool remove(AppLnk*); + void clear() { + QListIterator it( mApps ); + for ( ; it.current(); ) { + AppLnk* a = *it; + ++it; + a->mId = 0; + delete a; + } + mApps.clear(); + typs.clear(); + } const QList &children() const { return mApps; } void detachChildren(); -- cgit v0.9.0.2