Subversion Repositories Scribus

Rev

Rev 936 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
464 subik 1
/*! This is the Scribus Short Words configuratin specification.
2
There will be interface for the future Scribus central plugin
3
config center. maybe :)
4
 
5
This code is based on the Scribus-Vlna plug in rewritten for
6
international use.
7
 
8
2004 Petr Vanek <petr@yarpen.cz>
9
with contributions by good people listed in AUTHORS file
10
 
11
This program is free software - see LICENSE file in the distribution
12
or documentation
13
*/
14
 
15
#ifndef _SCRIBUS_SHORTCFG_H_
16
#define _SCRIBUS_SHORTCFG_H_
17
 
18
#include <qstring.h>
19
#include <qstringlist.h>
20
#include <scribus.h>
21
 
22
class QString;
23
class QStringList;
24
 
25
class Config : public QObject
26
{
27
        Q_OBJECT
28
 
29
public:
30
        /** reads config from the ui cfg file */
31
        Config();
32
        /** writes config into the ui cfg file */
33
        ~Config();
34
 
35
        /** id of the UI radiobutton  */
36
        uint action;
37
        /** UI checkbox */
38
        uint userConfig;
39
 
40
        /** returns all options for specified language */
41
        QStringList getShortWords(QString lang);
42
        /** available configs for UI about */
43
        QString getAvailableLanguages();
44
        /** get lang code (en, cs, pl) from Scribus hyphenator configuration
45
        structure */
46
        QString getLangCodeFromHyph(QString hyphenCode);
1181 subik 47
        /** Save cfg. */
48
        void saveConfig();
464 subik 49
 
50
private:
936 subik 51
        /** Configuration structure */
52
        PrefsContext* prefs;
464 subik 53
        /** getShortWords use this one. for each case from GUI select
54
        the right config file (or both) */
55
        QStringList getShortWordsFromFile(QString lang, QString filename);
56
        /** getAvailableLanguages use this one. available config in
57
        the specified file for UI about */
58
        QString getAvailableLanguagesFromFile(QString filename);
59
        /** returns full lang name by lang code (en -> English) */
60
        QString getLangFromCode(QString code);
61
};
62
 
63
#endif