Changeset View
Changeset View
Standalone View
Standalone View
plugins/uachanger/uachangerplugin.h
Show All 17 Lines | 1 | /* | |||
---|---|---|---|---|---|
18 | Boston, MA 02110-1301, USA. | 18 | Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef __UACHANGER_PLUGIN_H | 21 | #ifndef __UACHANGER_PLUGIN_H | ||
22 | #define __UACHANGER_PLUGIN_H | 22 | #define __UACHANGER_PLUGIN_H | ||
23 | 23 | | |||
24 | #include <qmap.h> | 24 | #include <qmap.h> | ||
25 | #include <qstringlist.h> | 25 | #include <qstringlist.h> | ||
26 | #include <qurl.h> | ||||
26 | 27 | | |||
27 | #include <kurl.h> | | |||
28 | #include <klibloader.h> | | |||
29 | #include <kparts/plugin.h> | 28 | #include <kparts/plugin.h> | ||
29 | #include <kparts/readonlypart.h> | ||||
30 | 30 | | |||
31 | class KActionMenu; | 31 | class KActionMenu; | ||
32 | class QAction; | 32 | class QAction; | ||
33 | class QActionGroup; | 33 | class QActionGroup; | ||
34 | class KConfig; | 34 | class KConfig; | ||
35 | 35 | | |||
36 | namespace KIO | 36 | namespace KIO | ||
37 | { | 37 | { | ||
38 | } | 38 | } | ||
39 | 39 | | |||
40 | class UAChangerPlugin : public KParts::Plugin | 40 | class UAChangerPlugin : public KParts::Plugin | ||
41 | { | 41 | { | ||
42 | Q_OBJECT | 42 | Q_OBJECT | ||
43 | 43 | | |||
44 | public: | 44 | public: | ||
45 | explicit UAChangerPlugin(QObject *parent, | 45 | explicit UAChangerPlugin(QObject *parent, const QVariantList &args); | ||
46 | const QVariantList &); | 46 | virtual ~UAChangerPlugin(); | ||
47 | ~UAChangerPlugin(); | | |||
48 | 47 | | |||
49 | protected slots: | 48 | protected slots: | ||
50 | void slotDefault(); | 49 | void slotDefault(); | ||
51 | void parseDescFiles(); | 50 | void parseDescFiles(); | ||
52 | 51 | | |||
53 | void slotConfigure(); | 52 | void slotConfigure(); | ||
54 | void slotAboutToShow(); | 53 | void slotAboutToShow(); | ||
55 | void slotApplyToDomain(); | 54 | void slotApplyToDomain(); | ||
Show All 16 Lines | 63 | private: | |||
72 | 71 | | |||
73 | KParts::ReadOnlyPart *m_part; | 72 | KParts::ReadOnlyPart *m_part; | ||
74 | KActionMenu *m_pUAMenu; | 73 | KActionMenu *m_pUAMenu; | ||
75 | KConfig *m_config; | 74 | KConfig *m_config; | ||
76 | QAction *m_applyEntireSiteAction; | 75 | QAction *m_applyEntireSiteAction; | ||
77 | QAction *m_defaultAction; | 76 | QAction *m_defaultAction; | ||
78 | QActionGroup *m_actionGroup; | 77 | QActionGroup *m_actionGroup; | ||
79 | 78 | | |||
80 | KUrl m_currentURL; | 79 | QUrl m_currentURL; | ||
81 | QString m_currentUserAgent; | 80 | QString m_currentUserAgent; | ||
82 | 81 | | |||
83 | QStringList m_lstAlias; // menu entry names | 82 | QStringList m_lstAlias; // menu entry names | ||
84 | QStringList m_lstIdentity; // UA strings | 83 | QStringList m_lstIdentity; // UA strings | ||
85 | 84 | | |||
86 | // A little wrapper around tag names so that other always goes to the end. | 85 | // A little wrapper around tag names so that other always goes to the end. | ||
87 | struct MenuGroupSortKey { | 86 | struct MenuGroupSortKey { | ||
88 | QString tag; | 87 | QString tag; | ||
Show All 27 Lines |