Subversion Repositories Scribus

Rev

Rev 17554 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4430 cbradney 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
*/
3 paul 7
#ifndef HYSETTINGS_H
8
#define HYSETTINGS_H
9
 
10170 fschmid 10
#include "ui_hysettingsBase.h"
11
#include <QSet>
12
#include <QHash>
3 paul 13
 
2969 craig 14
#include "scribusapi.h"
5851 subik 15
#include "prefsstructs.h"
6279 fschmid 16
class ScribusDoc;
2969 craig 17
 
10170 fschmid 18
class SCRIBUS_API HySettings : public QWidget, Ui::hysettingsBase
3 paul 19
{
17546 craig 20
        //TODO: Dict license showing, URL background unzipping, checksumming, pkg mgr platforms warning
17542 craig 21
        struct DictData
22
        {
23
                        QString lang;
24
                        QString version;
25
                        QString files;
26
                        QString url;
27
                        QString desc;
28
                        QString license;
17554 craig 29
                        QString filetype;
17542 craig 30
                        bool download;
31
        };
32
 
5851 subik 33
        Q_OBJECT
3 paul 34
 
35
public:
17542 craig 36
        HySettings( QWidget* parent);
5851 subik 37
        ~HySettings() {};
38
        void restoreDefaults(struct ApplicationPrefs *prefsData);
6279 fschmid 39
        void restoreDefaults(ScribusDoc *prefsData);
10170 fschmid 40
        int getWordLen();
41
        int getMaxCount();
42
        bool getVerbose();
43
        bool getInput();
44
        QString getLanguage();
45
        QSet<QString> getIgnoreList();
46
        QHash<QString, QString> getExceptionList();
17542 craig 47
        void setSpellingInvisible();
3 paul 48
 
10170 fschmid 49
private slots:
50
        void addToIgnoreList();
51
        void editIgnoreListEntry();
52
        void removeIgnoreListEntry();
53
        void enableIgnoreButtons();
54
        void addToExceptList();
55
        void editExceptListEntry();
56
        void removeExceptListEntry();
57
        void enableExceptButtons();
17542 craig 58
        void downloadSpellDicts();
59
        void updateDictList();
60
        void updateAvailDictList();
61
        void downloadDictListFinished();
62
        void downloadSpellDictsFinished();
17820 craig 63
        void updateProgressBar();
17542 craig 64
        void setAvailDictsXMLFile(QString availDictsXMLDataFile);
5851 subik 65
 
17542 craig 66
        protected:
67
        QMap<QString, QString> dictionaryMap;
68
        QStringList dictionaryPaths;
69
        QString downloadLocation;
70
        QList <DictData> dictList;
71
        QList <DictData> downloadList;
12787 pierre 72
//      QMap<QString,QString> langsMap;
3 paul 73
};
74
 
75
#endif // HYSETTINGS_H