Subversion Repositories Scribus

Rev

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

Rev Author Line No. Line
3 paul 1
#include "hysettings.h"
2
#include "hysettings.moc"
161 Franz 3
 
795 fschmid 4
HySettings::HySettings( QWidget* parent, QMap<QString,QString>* langs ) : QWidget( parent, "Settings" )
3 paul 5
{
161 Franz 6
        QStringList lada;
1878 cbradney 7
        layout3 = new QGridLayout( this, 1, 1, 0, 5, "Layout3");
795 fschmid 8
        layout3->setAlignment( Qt::AlignTop );
9
        verbose = new QCheckBox(tr("&Hyphenation Suggestions"), this, "Verbose");
10
        layout3->addMultiCellWidget(verbose, 0, 0, 0, 1);
341 Franz 11
 
795 fschmid 12
        input = new QCheckBox(tr("Hyphenate Text Automatically &During Typing"), this, "inp");
13
        layout3->addMultiCellWidget(input, 1, 1, 0, 1);
341 Franz 14
 
795 fschmid 15
        language = new QComboBox( true, this, "Language" );
161 Franz 16
        QMap<QString,QString>::Iterator it;
249 Franz 17
        for (it = langs->begin(); it != langs->end(); ++it)
369 Franz 18
                lada.append(it.data());
161 Franz 19
        lada.sort();
795 fschmid 20
        language->insertStringList(lada);
21
        language->setEditable(false);
22
        text1 = new QLabel( language, tr( "&Language:" ), this, "Text1" );
23
        layout3->addWidget( text1, 2, 0 );
24
        layout3->addWidget( language, 2, 1, Qt::AlignLeft );
341 Franz 25
 
795 fschmid 26
        wordLen = new QSpinBox( this, "WordLen" );
27
        wordLen->setMinValue( 3 );
28
        text2 = new QLabel( wordLen, tr( "&Smallest Word:" ), this, "Text2" );
29
        layout3->addWidget( text2, 3, 0 );
30
        layout3->addWidget( wordLen, 3, 1, Qt::AlignLeft );
341 Franz 31
 
795 fschmid 32
        maxCount = new QSpinBox( this, "MaxCount" );
33
        maxCount->setMinValue( 0 );
34
        text3 = new QLabel(maxCount, tr("Consecutive Hyphenations &Allowed:"), this, "Text3");
35
        layout3->addWidget( text3, 4, 0 );
36
        layout3->addWidget( maxCount, 4, 1, Qt::AlignLeft);
341 Franz 37
 
795 fschmid 38
        QToolTip::add( verbose, tr( "A dialog box showing all possible hyphens for each word will show up when you use the Extras, Hyphenate Text option." ) );
39
        QToolTip::add( input, tr("Enables automatic hyphenation of your text while typing."));
40
        QToolTip::add( wordLen, tr( "Length of the smallest word to be hyphenated." ) );
41
        QToolTip::add( maxCount, tr( "Maximum number of Hyphenations following each other.\nA value of 0 means unlimited hyphenations." ) );
3 paul 42
}
43