1
/* This file is part of the KDE project
2
Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
4
This library is free software; you can redistribute it and/or
5
modify it under the terms of the GNU Library General Public
6
License as published by the Free Software Foundation; either
7
version 2 of the License, or (at your option) any later version.
9
This library is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
Library General Public License for more details.
14
You should have received a copy of the GNU Library General Public License
15
along with this library; see the file COPYING.LIB. If not, write to
16
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
Boston, MA 02111-1307, USA.
20
#ifndef autoformatdia_h
21
#define autoformatdia_h
23
#include <kdialogbase.h>
24
#include "autoformat.h"
36
/******************************************************************/
37
/* Class: KWAutoFormatExceptionWidget */
38
/******************************************************************/
40
class KWAutoFormatExceptionWidget : public QWidget
45
KWAutoFormatExceptionWidget(QWidget *_parent, const QString &name,const QStringList &_list,bool _abbreviation=false);
48
QStringList getListException(){return m_listException;}
50
void slotAddException();
51
void slotRemoveException();
52
void textChanged ( const QString & );
55
QListBox *exceptionList;
56
QLineEdit *exceptionLine;
57
QPushButton *pbAddException,*pbRemoveException;
59
QStringList m_listException;
63
/******************************************************************/
64
/* Class: KWAutoFormatDia */
65
/******************************************************************/
67
class KWAutoFormatDia : public KDialogBase
72
KWAutoFormatDia( QWidget *parent, const char *name, KWAutoFormat * autoFormat );
73
void addEntryList(const QString &key, KWAutoFormatEntry &_autoEntry);
74
void editEntryList(const QString &key,const QString &newFindString, KWAutoFormatEntry &_autoEntry);
80
void refreshEntryList();
85
QCheckBox *cbTypographicQuotes, *cbUpperCase, *cbUpperUpper;
86
QPushButton *pbQuote1, *pbQuote2, *pbEdit, *pbRemove, *pbAdd, *pbDefault;
87
KCharSelect *charselect;
88
KListView * m_pListView;
92
KWAutoFormat m_autoFormat; // The copy we're working on
93
KWAutoFormat * m_docAutoFormat; // Pointer to the real one (in KWDocument)
95
KWAutoFormatExceptionWidget *abbreviation;
96
KWAutoFormatExceptionWidget *twoUpperLetter;
99
virtual void slotOk();
100
void slotItemRenamed(QListViewItem * item, const QString & newText, int column);
101
void slotRemoveEntry();
102
void slotEditEntry();
106
void slotChangeState(bool);
108
void slotChangeItem( QListViewItem * );
112
/******************************************************************/
113
/* Class: KWAutoFormatEditDia */
114
/******************************************************************/
115
class KWAutoFormatEditDia : public QDialog
119
KWAutoFormatEditDia( KWAutoFormatDia *parent, const char *name, const QString &title,const QString &findStr,const QString &replaceStr, bool _replaceEntry=false,const QString &_str="" );
124
void chooseSpecialChar1();
125
void chooseSpecialChar2();
126
void textChanged ( const QString & );
128
QLineEdit *lineEditFind;
129
QLineEdit *lineEditReplace;
132
QPushButton* m_pClose;
133
QPushButton *pbSpecialChar1, *pbSpecialChar2;
134
KWAutoFormatDia *parentWidget;
136
QString replaceEntryString;