~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to kword/autoformatdia.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* This file is part of the KDE project
2
 
   Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3
 
 
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.
8
 
 
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.
13
 
 
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.
18
 
*/
19
 
 
20
 
#ifndef autoformatdia_h
21
 
#define autoformatdia_h
22
 
 
23
 
#include <kdialogbase.h>
24
 
#include "autoformat.h"
25
 
 
26
 
class QPushButton;
27
 
class QCheckBox;
28
 
class QVBox;
29
 
class QHBox;
30
 
class KCharSelect;
31
 
class KListView;
32
 
class QLineEdit;
33
 
class QListBox;
34
 
 
35
 
 
36
 
/******************************************************************/
37
 
/* Class: KWAutoFormatExceptionWidget                             */
38
 
/******************************************************************/
39
 
 
40
 
class KWAutoFormatExceptionWidget : public QWidget
41
 
{
42
 
    Q_OBJECT
43
 
 
44
 
public:
45
 
    KWAutoFormatExceptionWidget(QWidget *_parent, const QString &name,const QStringList &_list,bool _abbreviation=false);
46
 
 
47
 
 
48
 
    QStringList getListException(){return m_listException;}
49
 
protected slots:
50
 
    void slotAddException();
51
 
    void slotRemoveException();
52
 
    void textChanged ( const QString & );
53
 
 
54
 
 private:
55
 
    QListBox *exceptionList;
56
 
    QLineEdit *exceptionLine;
57
 
    QPushButton *pbAddException,*pbRemoveException;
58
 
 
59
 
    QStringList m_listException;
60
 
    bool m_bAbbreviation;
61
 
};
62
 
 
63
 
/******************************************************************/
64
 
/* Class: KWAutoFormatDia                                         */
65
 
/******************************************************************/
66
 
 
67
 
class KWAutoFormatDia : public KDialogBase
68
 
{
69
 
    Q_OBJECT
70
 
 
71
 
public:
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);
75
 
protected:
76
 
    bool applyConfig();
77
 
    void setupTab1();
78
 
    void setupTab2();
79
 
    void setupTab3();
80
 
    void refreshEntryList();
81
 
 
82
 
    QWidget *tab1;
83
 
    QWidget *tab2;
84
 
    QWidget *tab3;
85
 
    QCheckBox *cbTypographicQuotes, *cbUpperCase, *cbUpperUpper;
86
 
    QPushButton *pbQuote1, *pbQuote2, *pbEdit, *pbRemove, *pbAdd, *pbDefault;
87
 
    KCharSelect *charselect;
88
 
    KListView * m_pListView;
89
 
 
90
 
    QChar oBegin, oEnd;
91
 
 
92
 
    KWAutoFormat m_autoFormat; // The copy we're working on
93
 
    KWAutoFormat * m_docAutoFormat; // Pointer to the real one (in KWDocument)
94
 
 
95
 
    KWAutoFormatExceptionWidget *abbreviation;
96
 
    KWAutoFormatExceptionWidget *twoUpperLetter;
97
 
 
98
 
protected slots:
99
 
    virtual void slotOk();
100
 
    void slotItemRenamed(QListViewItem * item, const QString & newText, int column);
101
 
    void slotRemoveEntry();
102
 
    void slotEditEntry();
103
 
    void chooseQuote1();
104
 
    void chooseQuote2();
105
 
    void defaultQuote();
106
 
    void slotChangeState(bool);
107
 
    void slotAddEntry();
108
 
    void slotChangeItem( QListViewItem * );
109
 
 
110
 
};      
111
 
 
112
 
/******************************************************************/
113
 
/* Class: KWAutoFormatEditDia                                     */
114
 
/******************************************************************/
115
 
class KWAutoFormatEditDia : public QDialog
116
 
{
117
 
    Q_OBJECT
118
 
public:
119
 
    KWAutoFormatEditDia( KWAutoFormatDia *parent, const char *name, const QString &title,const QString &findStr,const QString &replaceStr, bool _replaceEntry=false,const QString &_str="" );
120
 
 
121
 
protected slots:
122
 
    void slotOk();
123
 
    void slotCancel();
124
 
    void chooseSpecialChar1();
125
 
    void chooseSpecialChar2();
126
 
    void textChanged ( const QString & );
127
 
private:
128
 
    QLineEdit *lineEditFind;
129
 
    QLineEdit *lineEditReplace;
130
 
 
131
 
    QPushButton* m_pOk;
132
 
    QPushButton* m_pClose;
133
 
    QPushButton *pbSpecialChar1, *pbSpecialChar2;
134
 
    KWAutoFormatDia *parentWidget;
135
 
    bool replaceEntry;
136
 
    QString replaceEntryString;
137
 
};
138
 
#endif
139
 
 
140