lib

KoCompletionDia.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 Thomas Zander <zander@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 version 2 as published by the Free Software Foundation.
7
8 This library is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 Library General Public License for more details.
12
13 You should have received a copy of the GNU Library General Public License
14 along with this library; see the file COPYING.LIB. If not, write to
15 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
17*/
18
19#ifndef kocompletiondia_h
20#define kocompletiondia_h
21
22#include "KoCompletionBase.h"
23#include <kdialogbase.h>
24#include <KoAutoFormat.h>
25
29class KoCompletion : public KoCompletionBase {
30 TQ_OBJECT
31
32
33public:
34 KoCompletion(TQWidget *parent, KoAutoFormat *autoFormat );
35 void saveSettings();
36
37protected slots:
38 void changeButtonStatus();
39 void slotResetConf();
40 void slotAddCompletionEntry();
41 void slotRemoveCompletionEntry();
42 void slotCompletionWordSelected( const TQString & );
43 void slotSaveCompletionEntry();
44
45protected:
46 KoAutoFormat m_autoFormat; // The copy we're working on
47 KoAutoFormat * m_docAutoFormat; // Pointer to the real one (in KWDocument)
48 TQStringList m_listCompletion; // The copy of the completion items - don't use m_autoFormat.getCompletion()!
49};
50
54class KOTEXT_EXPORT KoCompletionDia : public KDialogBase {
55 TQ_OBJECT
56
57
58public:
59 KoCompletionDia( TQWidget *parent, const char *name, KoAutoFormat * autoFormat );
60
61protected slots:
62 virtual void slotOk();
63
64protected:
65 void setup();
66
67private:
68 KoCompletion *m_widget;
69};
70#endif
KDialogBase(TQWidget *parent=0, const char *name=0, bool modal=true, const TQString &caption=TQString::null, int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok, bool separator=false, const KGuiItem &user1=KGuiItem(), const KGuiItem &user2=KGuiItem(), const KGuiItem &user3=KGuiItem())
virtual void slotOk()
Completion configuration widget.