Subversion Repositories Scribus

Rev

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