Diffstat (limited to 'noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.h b/noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.h new file mode 100644 index 0000000..6907dbe --- a/dev/null +++ b/noncore/applets/keyhelper/keyhelperapplet/anylnk/AppLnkWrapper.h @@ -0,0 +1,44 @@ +#ifndef _APPLNK_WRAPPER_H_ +#define _APPLNK_WRAPPER_H_ + +#include <qpe/qpeapplication.h> +#include <qpe/applnk.h> +#include "AnyLnk.h" + +class AppLnkWrapper : public AnyLnk +{ +public: + AppLnkWrapper(){} + AppLnkWrapper(const QStringList& params) + : AnyLnk(params) + { + m_pLnk = new AppLnk(QPEApplication::qpeDir() + + "apps/" + m_params[0] + ".desktop"); + } + virtual ~AppLnkWrapper(){ + delete m_pLnk; + } + + virtual bool isValid() { + return(m_pLnk->isValid()); + } + virtual void execute(){ + parseText(); + m_pLnk->execute(m_params[1]); + } + virtual QString name() { + return(m_pLnk->name()); + } + virtual const QPixmap& pixmap(){ + if(m_pixmap.isNull()){ + return(m_pLnk->pixmap()); + } else { + return(m_pixmap); + } + } +protected: + AppLnk* m_pLnk; +}; + +#endif /* _APPLNK_WRAPPER_H_ */ + |