kword

KWImportStyleDia.h
1/* This file is part of the KDE project
2 Copyright (C) 2002 Montel Laurent <lmontel@mandrakesoft.com>
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., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __KWImportStyleDia__
21#define __KWImportStyleDia__
22
23#include <kdialogbase.h>
24#include <KoImportStyleDia.h>
25#include <tqstringlist.h>
26
27#include "KWFrameStyle.h"
28#include "KWTableStyle.h"
29
30class TQLineEdit;
31class TQListBox;
32class KWDocument;
33class TQPushButton;
34class KoParagStyle;
35
36class KWImportStyleDia : public KoImportStyleDia
37{
38 TQ_OBJECT
39
40public:
41 KWImportStyleDia( KWDocument *_doc, KoStyleCollection* currentCollection, TQWidget *parent, const char *name = 0 );
42 ~KWImportStyleDia();
43
44protected:
45 virtual void loadFile();
46
47private:
48 KWDocument *m_doc;
49};
50
51
52class KWImportFrameTableStyleDia : public KDialogBase
53{
54 TQ_OBJECT
55
56public:
57 enum StyleType { frameStyle, TableStyle};
58 KWImportFrameTableStyleDia( KWDocument *_doc, const TQStringList & _list, StyleType _type , TQWidget *parent, const char *name );
59 ~KWImportFrameTableStyleDia();
60 TQPtrList<KWFrameStyle> listOfFrameStyleImported() const { return m_frameStyleList;}
61 TQPtrList<KWTableStyle> listOfTableStyleImported() const { return m_tableStyleList;}
62
63protected slots:
64 virtual void slotOk();
65
66protected:
67 TQString generateStyleName( const TQString & templateName );
68 void loadFile();
69 void initList();
70 TQListBox *m_listStyleName;
71 KWDocument *m_doc;
72 TQPtrList<KWFrameStyle> m_frameStyleList;
73 TQPtrList<KWTableStyle> m_tableStyleList;
74 TQStringList m_list;
75 StyleType m_typeStyle;
76};
77
78#endif