21#ifndef koautoformatdia_h
22#define koautoformatdia_h
24#include <kdialogbase.h>
25#include <tqlineedit.h>
26#include <KoAutoFormat.h>
35class KoAutoFormatLineEdit :
public TQLineEdit
40 KoAutoFormatLineEdit ( TQWidget * parent,
const char * name=0 );
43 virtual void keyPressEvent ( TQKeyEvent * );
45 void keyReturnPressed();
52class KoAutoFormatExceptionWidget :
public TQWidget
58 KoAutoFormatExceptionWidget(TQWidget *_parent,
const TQString &name,
const TQStringList &_list,
bool _autoInclude,
bool _abbreviation=
false);
60 void setListException(
const TQStringList &list);
61 TQStringList getListException(){
return m_listException;}
63 void setAutoInclude(
bool b );
65 void slotAddException();
66 void slotRemoveException();
67 void textChanged (
const TQString & );
68 void slotExceptionListSelected();
70 TQListBox *exceptionList;
71 KoAutoFormatLineEdit *exceptionLine;
72 TQPushButton *pbAddException,*pbRemoveException;
73 TQCheckBox *cbAutoInclude;
74 TQStringList m_listException;
82class KOTEXT_EXPORT KoAutoFormatDia :
public KDialogBase
88 KoAutoFormatDia( TQWidget *parent,
const char *name, KoAutoFormat * autoFormat );
90 void addEntryList(
const TQString &key, KoAutoFormatEntry *_autoEntry);
91 void editEntryList(
const TQString &key,
const TQString &newFindString, KoAutoFormatEntry *_autoEntry);
99 void refreshEntryList();
106 typedef TQMap<TQString, TQString> KoExceptionLanguageName;
107 KoExceptionLanguageName exceptionLanguageName;
114 TQComboBox *autoFormatLanguage;
116 TQCheckBox *cbTypographicSimpleQuotes, *cbTypographicDoubleQuotes,*cbUpperCase, *cbUpperUpper, *cbDetectUrl,
117 *cbBackgroundSpellCheck, *cbAdvancedAutoCorrection,*cbIgnoreDoubleSpace , *cbRemoveSpaceBeginEndLine, *cbUseBulletStyle, *cbAutoChangeFormat, *cbAutoReplaceNumber, *cbUseNumberStyle, *cbAutoSuperScript, *cbAutoCorrectionWithFormat, *cbCapitalizeDaysName;
118 TQPushButton *pbDoubleQuote1, *pbDoubleQuote2, *pbRemove, *pbAdd, *pbDoubleDefault,
119 *pbSpecialChar1, *pbSpecialChar2, *pbBulletStyle, *pbDefaultBulletStyle;
121 TQPushButton *pbSimpleQuote1, *pbSimpleQuote2, *pbSimpleDefault;
122 TQPushButton *pbChangeFormat, *pbClearFormat;
123 KCharSelect *charselect;
124 KoAutoFormatLineEdit *m_find, *m_replace;
125 TDEListView *m_pListView;
127 TQChar oSimpleBegin, oSimpleEnd;
128 TQChar oDoubleBegin, oDoubleEnd;
131 KoAutoFormat m_autoFormat;
132 KoAutoFormat * m_docAutoFormat;
134 KoAutoFormatExceptionWidget *abbreviation;
135 KoAutoFormatExceptionWidget *twoUpperLetter;
137 KoAutoFormatEntry *newEntry;
139 TQString initialLanguage;
143 bool autocorrectionEntryChanged;
148 void slotBulletStyleToggled(
bool );
149 void slotItemRenamed(TQListViewItem * item,
const TQString & newText,
int column);
150 void slotRemoveEntry();
151 void slotEditEntry();
152 void slotfind(
const TQString & );
153 void slotfind2(
const TQString & );
154 void chooseSpecialChar1();
155 void chooseSpecialChar2();
156 void chooseDoubleQuote1();
157 void chooseDoubleQuote2();
158 void defaultDoubleQuote();
160 void chooseSimpleQuote1();
161 void chooseSimpleQuote2();
162 void defaultSimpleQuote();
164 void slotChangeStateSimple(
bool);
165 void slotChangeStateDouble(
bool);
168 void chooseBulletStyle();
169 void defaultBulletStyle();
170 void slotChangeTextFormatEntry();
171 void slotResetConf();
172 void changeAutoformatLanguage(
const TQString & );
173 void slotClearTextFormatEntry();
174 void slotChangeAdvancedAutoCorrection();
virtual void slotCancel()