Rev 20295 | Rev 20419 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
19822 | craig | 1 | /* |
2 | For general Scribus (>=1.3.2) copyright and licensing information please refer |
||
3 | to the COPYING file provided with the program. Following this notice may exist |
||
4 | a copyright and/or license notice that predates the release of Scribus 1.3.2 |
||
5 | for which a new license (GPL+exception) is in place. |
||
6 | */ |
||
7 | /*************************************************************************** |
||
8 | resourcemanager.h - description |
||
9 | ------------------- |
||
10 | begin : Sun 20150201 |
||
11 | copyright : (C) 2015 by Craig Bradney |
||
12 | email : cbradney@scribus.info |
||
13 | ***************************************************************************/ |
||
14 | |||
15 | /*************************************************************************** |
||
16 | * * |
||
17 | * This program is free software; you can redistribute it and/or modify * |
||
18 | * it under the terms of the GNU General Public License as published by * |
||
19 | * the Free Software Foundation; either version 2 of the License, or * |
||
20 | * (at your option) any later version. * |
||
21 | * * |
||
22 | ***************************************************************************/ |
||
23 | |||
24 | #ifndef RESOURCEMANAGER_H |
||
25 | #define RESOURCEMANAGER_H |
||
26 | |||
27 | #include <QDialog> |
||
28 | #include <QList> |
||
29 | #include <QMap> |
||
30 | #include <QString> |
||
31 | |||
32 | #include "scribusapi.h" |
||
33 | #include "scribusstructs.h" |
||
34 | #include "ui_resourcemanagerbase.h" |
||
35 | |||
36 | |||
37 | |||
38 | class SCRIBUS_API ResourceManager : public QDialog, Ui::ResourceManagerBase |
||
39 | { |
||
40 | Q_OBJECT |
||
41 | |||
42 | enum { |
||
43 | RM_FONTS, |
||
44 | RM_HYPH, |
||
45 | RM_PROFILES, |
||
46 | RM_SPELL, |
||
47 | RM_TEMPLATES |
||
48 | }; |
||
49 | public: |
||
50 | ResourceManager(QWidget* parent); |
||
51 | ~ResourceManager() {}; |
||
52 | |||
53 | //events: |
||
54 | //virtual void changeEvent(QEvent *e); |
||
55 | |||
56 | public slots: |
||
57 | void languageChange(); |
||
58 | |||
59 | protected: |
||
60 | void setFontCategory(); |
||
61 | void setHyphCategory(); |
||
62 | void setSpellCategory(); |
||
63 | void setTemplatesCategory(); |
||
64 | |||
65 | void updateInstalledFonts(); |
||
66 | void updateInstalledHyph(); |
||
67 | void updateInstalledSpell(); |
||
68 | void updateInstalledTemplates(); |
||
69 | void updateAvailableFonts(); |
||
70 | void updateAvailableHyph(); |
||
71 | void updateAvailableSpell(); |
||
72 | void updateAvailableTemplates(); |
||
73 | |||
74 | QString currentCategory; |
||
75 | QMap <int, QString> resourceCategories; |
||
76 | QMap <int, QString> dataFiles; |
||
77 | |||
78 | QMap<QString, QString> dictionaryMap; |
||
79 | QStringList dictionaryPaths; |
||
80 | QList <DownloadItem> dictList; |
||
81 | QList <DownloadItem> fontList; |
||
82 | QList <DownloadItem> templateList; |
||
83 | QList <DownloadItem> profileList; |
||
84 | QList <DownloadItem> downloadList; |
||
85 | QString affixFileName(QStringList files); |
||
86 | QString dictFileName(QStringList files); |
||
20410 | craig | 87 | QString findDestinationFolder(); |
19822 | craig | 88 | |
89 | protected slots: |
||
90 | void categoryChanged(); |
||
91 | void updateDownloadLists(); |
||
92 | void downloadListFinished(); |
||
93 | void downloadFilesFinished(); |
||
94 | void updateProgressBar(); |
||
95 | void startDownload(); |
||
20410 | craig | 96 | void showLicense(); |
19822 | craig | 97 | |
98 | }; |
||
99 | |||
100 | #endif // RESOURCEMANAGER_H |