lib
KoCompletionDia.h
00001 /* This file is part of the KDE project 00002 Copyright (C) 2005 Thomas Zander <zander@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 * Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef kocompletiondia_h 00020 #define kocompletiondia_h 00021 00022 #include "KoCompletionBase.h" 00023 #include <kdialogbase.h> 00024 #include <KoAutoFormat.h> 00025 00029 class KoCompletion : public KoCompletionBase { 00030 Q_OBJECT 00031 00032 public: 00033 KoCompletion(QWidget *parent, KoAutoFormat *autoFormat ); 00034 void saveSettings(); 00035 00036 protected slots: 00037 void changeButtonStatus(); 00038 void slotResetConf(); 00039 void slotAddCompletionEntry(); 00040 void slotRemoveCompletionEntry(); 00041 void slotCompletionWordSelected( const QString & ); 00042 void slotSaveCompletionEntry(); 00043 00044 protected: 00045 KoAutoFormat m_autoFormat; // The copy we're working on 00046 KoAutoFormat * m_docAutoFormat; // Pointer to the real one (in KWDocument) 00047 QStringList m_listCompletion; // The copy of the completion items - don't use m_autoFormat.getCompletion()! 00048 }; 00049 00053 class KOTEXT_EXPORT KoCompletionDia : public KDialogBase { 00054 Q_OBJECT 00055 00056 public: 00057 KoCompletionDia( QWidget *parent, const char *name, KoAutoFormat * autoFormat ); 00058 00059 protected slots: 00060 virtual void slotOk(); 00061 00062 protected: 00063 void setup(); 00064 00065 private: 00066 KoCompletion *m_widget; 00067 }; 00068 #endif