kword

KWInsertPicDia.h
1/* This file is part of the KDE project
2 Copyright (C) 2001 David Faure <faure@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., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef twinsertpicdia_h
21#define twinsertpicdia_h
22
23#include <kdialogbase.h>
24class TQCheckBox;
25class KWInsertPicPreview;
26class KFileDialog;
27class KWDocument;
28
29class KWInsertPicDia : public KDialogBase
30{
31 TQ_OBJECT
32
33public:
34 KWInsertPicDia( TQWidget *parent, bool _inline, bool _keepRatio, KWDocument *_doc, const char *name = 0 );
35
36 bool makeInline() const;
37
38 bool keepRatio() const;
39
44 static KoPicture selectPictureDia( const TQString & _path, TQWidget* parent );
45
46 KoPicture picture ( void ) const;
47
48protected slots:
49 void slotChooseImage();
50
51protected:
52 static KoPicture selectPicture( KFileDialog & fd, TQWidget *parent );
53
54private:
55
56 bool m_bFirst;
57 TQCheckBox *m_cbInline, *m_cbKeepRatio;
58 KWInsertPicPreview *m_preview;
59 KWDocument *m_doc;
60 KoPicture m_picture;
61};
62
63#endif