Subversion Repositories Scribus

Rev

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

Rev Author Line No. Line
3 paul 1
#ifndef HYPLUG_H
2
#define HYPLUG_H
3
 
4
#include <qobject.h>
106 Franz 5
#include <qtextcodec.h>
2969 craig 6
 
7
#include "scribusapi.h"
3 paul 8
#include "hyphen.h"
9
class ScribusDoc;
10
class ScribusApp;
11
class PageItem;
12
 
159 Franz 13
/*!
14
This class is the core of the Scribus hyphenation system.
15
*/
16
 
2969 craig 17
class SCRIBUS_API Hyphenator : public QObject
3 paul 18
{
19
    Q_OBJECT
20
 
21
public:
22
    Hyphenator(QWidget* parent, ScribusDoc *dok, ScribusApp* app);
23
    ~Hyphenator();
159 Franz 24
    /*! There are languages having rule not to hyphen word shorter than
25
    MinWordLen */
168 Franz 26
        int MinWordLen;
249 Franz 27
        /*! Maximum number of hyphenations allowed following each other */
28
        int HyCount;
159 Franz 29
    /*! Language in use */
168 Franz 30
        QString Language;
159 Franz 31
    /*! Flag - if user set auto hyphen processing.*/
168 Franz 32
        bool Automatic;
159 Franz 33
    /*! Flag - obsolete? */
168 Franz 34
        bool AutoCheck;
159 Franz 35
    /*! Reference to the hyphen dictionary structure. */
168 Franz 36
        HyphenDict *hdict;
159 Franz 37
    /*! Embeded reference to the \see ScribusDoc filled by \a dok */
168 Franz 38
        ScribusDoc *doc;
159 Franz 39
    /*! Embeded reference to the \see ScribusApp filled by \a app */
168 Franz 40
        ScribusApp *Sap;
159 Franz 41
    /*! Flag - if is the dictionary without errors etc. If is it 'false'
42
        hyphen aborted. */
168 Franz 43
        bool useAble;
159 Franz 44
    /*! Qt text codec which handles local characters. */
168 Franz 45
        QTextCodec *codec;
3 paul 46
 
47
public slots:
168 Franz 48
        void slotNewDict(QString name);
249 Franz 49
        void slotNewSettings(int Wordlen, bool Autom, bool ACheck, int Num);
168 Franz 50
        void slotHyphenateWord(PageItem* it, QString text, int firstC);
51
        void slotHyphenate(PageItem *it);
2621 fschmid 52
        void slotDeHyphenate(PageItem *it);
3 paul 53
};
54
#endif