-rw-r--r-- | library/applnk.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/library/applnk.h b/library/applnk.h index 18e20b6..9b5523e 100644 --- a/library/applnk.h +++ b/library/applnk.h | |||
@@ -33,96 +33,101 @@ class AppLnk | |||
33 | { | 33 | { |
34 | public: | 34 | public: |
35 | AppLnk(); | 35 | AppLnk(); |
36 | AppLnk( const QString &file ); | 36 | AppLnk( const QString &file ); |
37 | AppLnk( const AppLnk © ); // copy constructor | 37 | AppLnk( const AppLnk © ); // copy constructor |
38 | virtual ~AppLnk(); | 38 | virtual ~AppLnk(); |
39 | 39 | ||
40 | bool isValid() const { return !mLinkFile.isNull(); } | 40 | bool isValid() const { return !mLinkFile.isNull(); } |
41 | 41 | ||
42 | static void setSmallIconSize(int); | 42 | static void setSmallIconSize(int); |
43 | static void setBigIconSize(int); | 43 | static void setBigIconSize(int); |
44 | static int smallIconSize(); | 44 | static int smallIconSize(); |
45 | static int bigIconSize(); | 45 | static int bigIconSize(); |
46 | 46 | ||
47 | QString name() const { return mName; } | 47 | QString name() const { return mName; } |
48 | const QPixmap& pixmap() const; | 48 | const QPixmap& pixmap() const; |
49 | const QPixmap& bigPixmap() const; | 49 | const QPixmap& bigPixmap() const; |
50 | virtual QString exec() const { return mExec; } | 50 | virtual QString exec() const { return mExec; } |
51 | QString type() const; | 51 | QString type() const; |
52 | QString rotation() const { return mRotation; } | 52 | QString rotation() const { return mRotation; } |
53 | QString comment() const { return mComment; } | 53 | QString comment() const { return mComment; } |
54 | QString file() const; | 54 | QString file() const; |
55 | QString linkFile() const; | 55 | QString linkFile() const; |
56 | QStringList mimeTypes() const { return mMimeTypes; } | 56 | QStringList mimeTypes() const { return mMimeTypes; } |
57 | QStringList mimeTypeIcons() const { return mMimeTypeIcons; } | 57 | QStringList mimeTypeIcons() const { return mMimeTypeIcons; } |
58 | const QArray<int> &categories() const; | 58 | const QArray<int> &categories() const; |
59 | int id() const { return mId; } | 59 | int id() const { return mId; } |
60 | 60 | ||
61 | bool linkFileKnown() const { return !mLinkFile.isNull(); } | 61 | bool linkFileKnown() const { return !mLinkFile.isNull(); } |
62 | 62 | ||
63 | void execute() const; | 63 | void execute() const; |
64 | void execute(const QStringList& args) const; | 64 | void execute(const QStringList& args) const; |
65 | void removeFiles(); | 65 | void removeFiles(); |
66 | void removeLinkFile(); | 66 | void removeLinkFile(); |
67 | 67 | ||
68 | void setName( const QString& docname ); | 68 | void setName( const QString& docname ); |
69 | void setExec( const QString& exec ); | 69 | void setExec( const QString& exec ); |
70 | void setFile( const QString& filename ); | 70 | void setFile( const QString& filename ); |
71 | void setLinkFile( const QString& filename ); | 71 | void setLinkFile( const QString& filename ); |
72 | void setComment( const QString& comment ); | 72 | void setComment( const QString& comment ); |
73 | void setType( const QString& mimetype ); | 73 | void setType( const QString& mimetype ); |
74 | void setIcon( const QString& iconname ); | 74 | void setIcon( const QString& iconname ); |
75 | void setCategories( const QArray<int> &v ); | 75 | void setCategories( const QArray<int> &v ); |
76 | bool writeLink() const; | 76 | bool writeLink() const; |
77 | 77 | ||
78 | void setProperty(const QString& key, const QString& value); | 78 | void setProperty(const QString& key, const QString& value); |
79 | QString property(const QString& key) const; | 79 | QString property(const QString& key) const; |
80 | 80 | ||
81 | //#ifdef QTOPIA_INTERNAL_PRELOADACCESS | ||
82 | bool isPreloaded() const; | ||
83 | void setPreloaded(bool yesNo); | ||
84 | //#endif | ||
85 | |||
81 | protected: | 86 | protected: |
82 | QString mName; | 87 | QString mName; |
83 | QPixmap mPixmap; | 88 | QPixmap mPixmap; |
84 | QPixmap mBigPixmap; | 89 | QPixmap mBigPixmap; |
85 | QString mExec; | 90 | QString mExec; |
86 | QString mType; | 91 | QString mType; |
87 | QString mRotation; | 92 | QString mRotation; |
88 | QString mComment; | 93 | QString mComment; |
89 | QString mFile; | 94 | QString mFile; |
90 | QString mLinkFile; | 95 | QString mLinkFile; |
91 | QString mIconFile; | 96 | QString mIconFile; |
92 | QStringList mMimeTypes; | 97 | QStringList mMimeTypes; |
93 | QStringList mMimeTypeIcons; | 98 | QStringList mMimeTypeIcons; |
94 | int mId; | 99 | int mId; |
95 | static int lastId; | 100 | static int lastId; |
96 | AppLnkPrivate *d; | 101 | AppLnkPrivate *d; |
97 | friend class AppLnkSet; | 102 | friend class AppLnkSet; |
98 | 103 | ||
99 | virtual void invoke(const QStringList& args) const; | 104 | virtual void invoke(const QStringList& args) const; |
100 | bool ensureLinkExists() const; | 105 | bool ensureLinkExists() const; |
101 | void storeLink() const; | 106 | void storeLink() const; |
102 | }; | 107 | }; |
103 | 108 | ||
104 | class DocLnk : public AppLnk | 109 | class DocLnk : public AppLnk |
105 | { | 110 | { |
106 | public: | 111 | public: |
107 | DocLnk(); | 112 | DocLnk(); |
108 | DocLnk( const DocLnk &o ) : AppLnk(o) { } | 113 | DocLnk( const DocLnk &o ) : AppLnk(o) { } |
109 | DocLnk( const QString &file ); | 114 | DocLnk( const QString &file ); |
110 | DocLnk( const QString &file, bool may_be_desktopfile ); | 115 | DocLnk( const QString &file, bool may_be_desktopfile ); |
111 | virtual ~DocLnk(); | 116 | virtual ~DocLnk(); |
112 | 117 | ||
113 | QString exec() const; | 118 | QString exec() const; |
114 | 119 | ||
115 | protected: | 120 | protected: |
116 | void invoke(const QStringList& args) const; | 121 | void invoke(const QStringList& args) const; |
117 | 122 | ||
118 | private: | 123 | private: |
119 | void init(const QString &file); | 124 | void init(const QString &file); |
120 | }; | 125 | }; |
121 | 126 | ||
122 | class AppLnkSet | 127 | class AppLnkSet |
123 | { | 128 | { |
124 | public: | 129 | public: |
125 | AppLnkSet(); | 130 | AppLnkSet(); |
126 | AppLnkSet( const QString &dir ); | 131 | AppLnkSet( const QString &dir ); |
127 | ~AppLnkSet(); | 132 | ~AppLnkSet(); |
128 | 133 | ||